Page 1 of 2

VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 12:43
by mcnaz
Hi there.

I've just stumbled onto a problem since upgrading from 3.0.12 to 3.1.0 on XP Host.

When a guest is shutdown using "Save Guest State", the state is lost once the virtualbox executable/service is closed and terminated. Restarting VBox shows guests that should have state of "Saved" as "Powered Off" instead.

This is happening to Win2k, XP and Ubuntu guests. All guests have GA 3.1.0 installed.

Anybody else seeing this? Please advise if you wish me to submit further information.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 12:47
by Sasquatch
If there would be a bug with Saved State, and it doesn't work properly, the state wouldn't be 'Powered Off', but 'Aborted' instead. Picked the right option (top)?

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 13:03
by mcnaz
Picked the right option (top)?
Indeed. It is saved correctly when I close the Guest using "Save State". When the guest powers off, it is marked with status"Saved" in the list of Virtual Machines. I can restore the Guest from the State correctly.

The problem occurs when the guest is saved and the VirtualBox application is terminated. When VirtualBox application is restarted, all virtual machines with state "Saved" now show as "Powered Off".

Hope that clarifies it.

Cheers.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 13:34
by Sasquatch
No idea about your end, but I just saved state a VM, closed the main GUI, waited a few minutes, then opened the GUI again and the VM is still shown in saved state. And it resumes without error.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 14:01
by mcnaz
Thanks for checking it out on your end Sasquatch. Could be a combination of settings on my end.

If anybody stumbles onto this post then my settings:

* Guest lived inside VMDK as opposed to VDI file (imported successfully from VMware). This also occurred on Ubuntu Guest living inside a VDI file.
* Custom snapshot directory.
* Guest had an active snapshot
* 2D acceleration was enabled (at least on Win2k and XP guests).


Reverted back to 3.0.12 for the time being.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 14:46
by mcnaz
Attached log file and configuration file for a VBox Guest that losses its "Saved" state when virtualbox executable terminates,

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 14:57
by mcnaz
Okay. Last post. I promise! :lol:

I think I've narrowed down what the problem is. In order to reproduce this a version 1.7 XML configuration file must be present (i.e prior to VBox 3.1.0). VBox migrates this to a version 1.8 XML file. I.e create a Guest in VBox 3.0.12, then install VBox 3.1.0.

It is in these instances (i.e 1.7 -> 1.8 XML conf Guests) that the problem stated in my first post occurs.

If I were to create a new Guest under 3.1.0 then assigned it the PRI disk from the problem Guest, the state is saved and persists correctly across virtualbox sessions.

Hope this helps someone.

Cheers.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 2. Dec 2009, 15:41
by Sasquatch
Maybe, just maybe, it's caused by the 2D acceleration, as was already discussed in the beta section: http://forums.virtualbox.org/viewtopic. ... 69&start=0
It should have been fixed, so it's strange that you have the error. Btw, it also states that 2D is only for XP and newer, so your 2K Guest has no benefit from it.

I changed the settings on a Windows VM to have 2D available, alongside 3D, updated the GA to 3.1.0 (still had 2.1.0 installed :shock:). No problems whatsoever. Attached is my XML file too, so you can compare it. It is in saved state.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 4. Dec 2009, 07:37
by jruv
Yes, I have the same issue as yours. When I upgrade to 3.1.0, my guest XP will show "Powered Off" instead of "Saved" if I restart the VB main window. And then I disable the 2D-acc, the issue is gone.
Thanks for the suggestion of Sasquatch.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 14. Dec 2009, 17:41
by larryr
I have the same issue with the save state changing to powered off on a reboot. On 2 different servers that are at 3.1.0 - no issues when it was 3.0.12 or eariler.

Will remove the 2D / 3D acceleration to see it that is the cause.

Re: VB 3.1.0 - Save Guest State bug?

Posted: 17. Dec 2009, 13:20
by BlackTr
This is happening if 'Snapshots folder' is set to different of default.
Seems like 'Snapshots folder' must be nested below of 'Machine folder'
E.g. (values of 'Snapshots folder'):
Machines\Suse10\Snapshots - OK
Machines\Suse10\sn\Snap - OK
Machines\Snapshots - FAILED to save state (don't have attribute 'stateFile' inside machine config *.xml)

To VB Team:
Seems the issue is in function calculateFullPath

Re: VB 3.1.0 - Save Guest State bug?

Posted: 25. Jan 2010, 21:33
by Jits
Is there any progress on a fix for this bug?

I'm having to revert to the default snapshots folder in order to get saved state to work. Although this isn't a major deal it is annoying.

Thanks,
Jits

Re: VB 3.1.0 - Save Guest State bug?

Posted: 20. Feb 2010, 06:47
by eddsouza
Adding some data on this issue, since I have the same problem in (currently running version) VB 3.1.4 r57640.

Host OS: Ubuntu 9.04 x86_64
Guest OS: Ubuntu 9.10 with Guest Additions installed (updated to v 3.1.4).
VM (and VDI) created in: VB 3.1.2 (installed from virtualbox-3.1_3.1.2-56127_Ubuntu_jaunty_amd64.deb) (though I don't remember exactly, I have no 1.7 XML config backup file in the VM definition folder and I do remember having to upgrade Guest Additions once in this VM, which would be after installing VB 3.1.4.).
VM definition file: (default location) ~/.VirtualBox/Machines/Ubuntu910/Ubuntu910.xml
VDI file: custom location on separate ext3 partition, /new-storage/VM_ubuntu910/ubuntu910_dev.vdi
VM has snapshot active: No.

Snapshot folder: was manually changed to /new-storage/VM_ubuntu910/ soon after guest installation.
(Saved-state file is created there when suspending the VM; last file (still there, not removed by VB) is: {ce4c1ff2-c46d-4023-9b66-9e92acfab301}.sav. There is plenty of space available on the partition.)

I tried playing with plenty of settings, including PAE/NX, 3D acceleration, IO APIC etc, but that did not solve the issue - the VM's saved state was lost every time, the guest OS was booting from scratch. (Since 2D acceleration is ignored for non-Windows guests, that was disabled anyway.)

I change the VM's Snapshot Folder back to ("reset to default") .VirtualBox/Machines/Ubuntu910/Snapshots and then start the VM, open some programs in it, and close it, with the save state option. I then close the VB GUI. I then suspend my host OS (laptop) and resume it after a while. I re-launch the VB GUI, and start the VM, which still shows as 'Saved' ==> the VM resumes perfectly from saved state. Yay!

Confirmation of issue: if the saved-state file is created in the default location (as mentioned above) then resume from saved state works. If it is created in a custom location, the saved-state file is ignored by VB 3.1.x and the VM is booted from scratch. The saved-state file created in the custom location is left there, and not deleted after switching back to the default Snapshot Folder.

Thanks very much to BlackTr for pointing out the fix for this, and to mcnaz for starting the thread and identifying a set of possible causes, including "custom snapshot folder" :o - I was beginning to get really annoyed at losing saved state every single time. As Jits says, it's no big deal to revert to the default snapshot location to solve this, as long as one knows that that is what solves it! :-)

Re: VB 3.1.0 - Save Guest State bug?

Posted: 10. Mar 2010, 09:19
by redhat
I am having the exact same problem.Very annoying if our working in a big IDE and like to continue were you left off.

Didn't have this bug before i upgraded, is it possible to just downgrade my virtual box version without uninstalling it?

Since i have about 100gigabyte off snapshots i can't just go and restore it to default.

Grtz
Redhat

Re: VB 3.1.0 - Save Guest State bug?

Posted: 12. Mar 2010, 15:57
by mcnaz
I reverted back to 3.0.12 since first encountering and reporting this as a VirtualBox ticket a few months ago.

I have the same issue as my VB hosts all my development environments, which take quite a few minutes to startup/setup. It is much quick to create a snapshot then continue as I am continually switching from VM to VM multiple times per day.

I am worried that this issue, which seems trivial to fix on the surface, has not been fixed for so long.

I am hoping that this is not due to changes from Sun -> Oracle.....