Ticket #5656 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Guest "Saved" state does not persist accross VirtualBox sessions (non-standard installation directory) => Fixed in 3.2.6

Reported by: mcnaz Owned by:
Component: other Version: VirtualBox 3.2.4
Keywords: Cc:
Guest type: Windows Host type: Windows


Host: XP SP2 Guest: XP SP2

I have an issue with an XP guest that is closed down via "Save State". The Guest shuts down correctly and I am able to restore the Guest state from Virtualbox.

The problem occurs when Virtualbox is exited. Upon returning, a Guest with state "Saved" now appears as "Powered Off" and the save state is lost, despite the snapshot file still existing in the Snapshots directory.

Some more background info available here:

Please also note that I have attempted to disable 2D acceleration as suggested in the last post but that did not fix the issue.


VBox.log Download (54.8 KB) - added by mcnaz 13 years ago.
Delphi 7 - 2.xml Download (9.1 KB) - added by mcnaz 13 years ago.
VBox-3.2.0-XP-x64.log Download (55.9 KB) - added by CaptainFlint 13 years ago.
1- before.jpg Download (96.8 KB) - added by Snolen 13 years ago.
2- after.jpg Download (113.7 KB) - added by Snolen 13 years ago.

Change History

Changed 13 years ago by mcnaz

Changed 13 years ago by mcnaz

comment:1 Changed 13 years ago by FuturePilot

I've got the same problem. After saving the state of a guest, it shows as "Saved" in the list but after quiting and restarting VirtualBox it forgets that it saved the state and shows up as "Powered Off" even though the .sav file still exists. Ubuntu 9.04 on the host. I was able to reproduce this with a Windows 7 guest and an Ubuntu guest.

comment:2 Changed 13 years ago by hasinasi

Is this by any chance related to this: In my case (kubuntu 9.10-32bit host, VB 3.1.2), this did the trick.

comment:3 Changed 13 years ago by sandervl73

  • priority changed from minor to critical
  • Version changed from VirtualBox 3.1.0 to VirtualBox 3.1.2
  • Summary changed from Guest "Saved" state does not persist accross VirtualBox sessions to Guest "Saved" state does not persist accross VirtualBox sessions (non-standard installation directory)

#6027 has been marked a duplicate of this one

comment:4 Changed 13 years ago by vipr1ab

I observed this as well. I had been using VB on two physical systems but wanted to be able to transport my virtual machines from one system to the other. So, I moved the .vdi files to a portable hard drive and changed the Default Hard Disk Folder and Default Machine Folder in Preferences on both systems to point to the appropriated folders on the external drive. I then created new virtual machines on each system and attached the .vdi to them. Then I modified the settings in each virtual machine and set the Snapshot Folder to the appropriate folder on the external drive. This worked well, except that I noticed my saved machine states were getting lost after closing VirtualBox. After some investigating, I noticed in the VirtualBox.xml file in the local .VirtualBox folder that the src= attribute in the MachineEntry node was pointing to the local path, not the one on the portable drive. Once I modified the src= path to point to the machine's .xml file on the portable drive, VirtualBox was able to load my saved states successfully. Hopefully, this information will help track down and fix the bug.

comment:5 Changed 13 years ago by OrdinaryAverageGuy

vipr1ab hit it spot on. I have been experiencing the same defect since 3.1.2. Not sure if it exists in 3.1.0, but it still exists in 3.1.4.

comment:6 Changed 13 years ago by itairaz

Just in case this helps someone, there seems to be a workaround for this that works for me -

I've been having the same issue - whenever I'd close the virtual box management UI, any previously saved session in XP would get lost, and the machine state would become "Powered off" Host: Windows 7 x64 Guest: Windows XP SP2 (performance edition) Machines and HDs stored on D:\VM. State files stored there as well (D:\VM\Snapshots)

What I did in order to resolve this temporarily is moved the snapshot folder back to the default (c:\users\...\.virtualbox\...). If you go to "settings" of the vm, in the "advanced" tab, you go to the "snapshot folder" drop box, and select "reset". This should set the folder back to VBox's default, and so far it seems like my state remains intact after the VBox session is closed with this change.

Good luck to all.

comment:7 Changed 13 years ago by aog2000a

Same problem here, currently VirtualBox 3.1.4 on Debian testing/Linux 2.6.33.

This is in any case a regression, i started noticing the problem a while ago, probably with the update to 3.1 but i can't really say anymore.

I can't use the trick by vipr1ab, in my case i am not using any removable device for the images and the all paths in the VirtualBox.xml file are fine.

itairaz's trick helps though, thanks!

comment:8 in reply to: ↑ description ; follow-up: ↓ 9 Changed 13 years ago by trevort

I have a similar problem. I run a dual boot box (Ubuntu 9.1 64-bit / Vista 32-bit) running VirtualBox 3.1.4 on both. I keep my VMs on an external drive - but I would do that anyway due to performance reasons.

When I switch (host) OSs, I lose save state. I think it is related to the XML file. On Ubuntu I have the VMs configured to use a directory on the external drive, but the VMs individual machine .xml file stays in the .VirtualBox/Machine/<VM> folder. If I copy the VMs .xml file to the external drive, and modify the .VirtualBox/VirtualBox.xml file to use the vile on the external drive, but do NOT change host operating systems, that will work.

When I change the host operating system, I have issues. I think one of them is that the GUID for the VMs in the virtualbox.xml files are different. I could be wrong. Also, the savestate folder on the Vista VMs was set to the default path.

At this point I've kinda given up on being able to keep the save state. It seems like if the .xml format was made more reliable, it could work though.

Also, I think that the machine's .xml file should be able to be used to import the virtual machine. There's issues with this, since you still need to import/add virtual media. But, a menu driven 'import VM' could take care of that fairly easy I think.

comment:9 in reply to: ↑ 8 Changed 13 years ago by trevort

After doing some more testing, I can get it closer to working, but it will fail.

  • I must have the virtualbox.xml file pointing to the machine specific xml file on the external hard drive prior to saving the state of the machine. This way it will put the .sav file in the folder where the machine .xml file is.
  • The machine .xml file must be in the same folder with the .save file. This happens by default, but when I started using 2 xml files I ran into this issue.
  • The GUID for the machine xml file must be the same on both systems
    • I wonder if other people have that issue?

Problems set in here. Microsoft and Linux use different drivers, and name the network hardware differently. The save state doesn't like this. So, I created a different machine .xml file for both systems. At this point, implementing save states between different host OS systems is unreasonable I think. I just wanted to see if it could be done.

  • The memory for the VM must be configured the same for both systems (same between systems)
  • The NIC must be names something that the HOST will recognize (i.e. different on the linux vs MS system)
  • I didn't test, but I assume the audio system must be something that the HOST will recognize (again, different between systems)

At this point the system is trying to start up the VM from it's saved state. But it crashes. If I knew what device this meant I might be able to adjust the xml file, but perhaps not. I thought it was a processor error, and some of the processer settings were different, but I changed them and the error persisted. Here's the error:

pci#0 New Device is slot 0x28, icha97 (vendor=0x8086 device=0x2415) [ver=3 pass=fail] VER_SSM_LOAD_CONFIG_MISMATCH

Result Code: E_FAIL (0x80004005) Component: Console Interface: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

comment:10 Changed 13 years ago by trevort

I see that there's a 'register' and 'unregister' command using the vboxmanage command for "importing" a VM using it's .xml file - that may be the way to go. I also saw the vboxmanage 'adoptstate' and 'discardstate', which may do the trick. I have not played with these commands.

I would request that fuctionality of those commands be added to the gui. That way, even if there is some confusion about the .xml files, you can tell virtualbox what files to use for the savestate and can resume your machine.

comment:11 Changed 13 years ago by arangas

I've had this same problem for the last few months, currently on 3.1.4 r57640. Host is Windows 7 64-bit, guests are Windows 2003/2008/2008 R2 (mix of 32- and 64-bit).

VHDs and snapshots have been configured to save on an external hard drive. I have not changed the default location of the machine config XML file so that is still on the C: drive.

As already reported, saving and restoring states works fine until VirtualBox is restarted.

I no longer use the save state feature due to this bug.

comment:12 Changed 13 years ago by trevort

More test results:

Linux (Ubuntu 9.1) 64 - savestates seem to work fine: when snapshots are on localdisk or on ext USB drive.

Windows Vista 32:

  • savestates work when snapshot is in default location
  • if snapshot is moved, savestate fails
  • I used the "VBoxManage adoptstate <machine name> <savefile>" command,

but the savestate didn't show up in the .xml file even though the .xml file timestamp was updated.

  • when I moved the machine .xml file to the external drive, and put it

in the same directory as the savestate file, and changed the virtualbox.xml file to reference the machine file in the new location, it, then the savestate WORKED.

comment:13 Changed 13 years ago by snopok

The workaround described above works (Host: Win7, guest: Ubuntu). A word of caution though: be careful when you play with machine properties later on, since the VirtualBox.xml might get rewritten to point to the default location of the snapshot file. Most of the time it is not a problem, since as long as the machine state is "saved" it is not possible to change the properties.

It would be great to see a proper fix though!

comment:14 Changed 13 years ago by CaptainFlint

Version 3.2.0: I have similar problems. But on my system all the snapshot directories are default, I never changed them, but nevertheless saved state is dropped sometimes. What I did customize is location of Default Hard Disk Folder and Default Machine Folder in global VirtualBox preferences.

Host OS is Windows XP x64 SP2. Guest OS is openSUSE 11.2 x86.

Changed 13 years ago by CaptainFlint

comment:15 Changed 13 years ago by rxt

I run Ubuntu 10.4 (64-bit) as host and run a Windows XP as client on Virtualbox. I've changed the preferences in VB to use another partition for machines and harddisks and snapshots. Everytime I restart Ubuntu this setting is there but does not work. VB reports that volumes are lost, which is not the case. I have to go to preferences and set this again while the correct path strings are in the corresponding fields.

When I quit VB without restarting Ubuntu, this doesn't happen.

comment:16 Changed 13 years ago by phil_ayres

I am also running Ubuntu 10.04 as a host and XP as a client. Virtual Box 3.2.4. The saved state of the VM is lost every time I shut the VirtualBox 'control panel' app. This is leaving me with broken files in my guest machine and I'm waiting for the VM to get completely corrupted...

What is new for me since previously being very happy with the software? A new version, on a completely new Ubuntu installation, with my profile stored on an encrypted home directory (Ubuntu standard ecryptfs).

What other information can I provide?

comment:17 Changed 13 years ago by mcnaz

Can this ticket's version be updated to VB 3.2.x?

This is still an issue that is stopping me moving from VB 3.0.12 onto any later issue as this is a major show stopper for me.

I also find it hard to believe that this issue has not been addressed since first reported in December 2009. Can we please have an update on this?

comment:18 Changed 13 years ago by michael

  • Version changed from VirtualBox 3.1.2 to VirtualBox 3.2.4

Sorry that this is causing you trouble. You must understand though that a piece of software as complex as VirtualBox must be to do its job necessarily picks up a number of issues which we address as our available development staff time permits.

And just to be boring, one of the reasons that we publish our source code is so that users who can't wait for us to fix an issue can have a shot at it themselves.

comment:19 Changed 13 years ago by frank

This problem could be fixed by the upcoming 3.2.6 release. Any chance to test  this test build?

comment:20 Changed 13 years ago by mcnaz

Hi Michael.

I very much appreciate your feedback to my post. Again, thank you.

I've gone ahead and downloaded VB3.2.6 source and have been reading the VB Linux Build wiki. Whilst I was doing that I stumbled onto r30379, which does sound like it addresses this issue.

I will tinker through the code and see if I can find anything (highly unlikely but I will try).

comment:21 Changed 13 years ago by mcnaz

Hi Frank.

Sorry.. missed your post. I've downloaded the beta 3.2.6, will give it a test and report back.

Again, thank you.

comment:22 Changed 13 years ago by frank

mcnaz: To be sure: Please use the above link, not the official Beta 2 (which misses a related fix).

comment:23 Changed 13 years ago by mcnaz

Hi Frank.

I can confirm that VB3.2.6.b2, downloaded via your  link, fixes the issue on Windows XP3 Host.

Thanks and Wohooo!! \o/

comment:24 Changed 13 years ago by frank

  • Summary changed from Guest "Saved" state does not persist accross VirtualBox sessions (non-standard installation directory) to Guest "Saved" state does not persist accross VirtualBox sessions (non-standard installation directory) => Fixed in 3.2.6

Thanks for the feedback!

comment:25 Changed 13 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:26 Changed 13 years ago by Snolen


I can also confirm that the saved state for the current machine state is restored correctly, but I think there is still a problem related.

I've a VM with various snapshots branches and several snapshots has been taken with the machine running. The fact is that the saved states for the snapshots are still losing across VBox sessions, and as far as I can see, it happens when I save the state of the VM.

I've edited the VM's xml to get the saved states again (I did this for all the snapshots):

<Snapshot uuid="{c7038475-a620-4299-98e1-f379a7506feb}" name="Created DB" timeStamp="2010-06-23T15:25:11Z" stateFile="N:\WinXP-snapshots\{c7038475-a620-4299-98e1-f379a7506feb}.sav">

Start the VM and save the state, close VBox and start it again and all the snapshot tags loss the stateFile attribute.

I've attached two screen caps to ilustrate a bit more the scenario.

Am I doing something wrong?

Thanks. Regards.

Changed 13 years ago by Snolen

Changed 13 years ago by Snolen

comment:27 Changed 12 years ago by anat

  • Status changed from closed to reopened
  • Resolution fixed deleted

I'm facing exactly the same issue on 4.0.10. It only happens with my CentOS client. As the host system I have XP. And yes, every time the saving hangs, I can't use copy-past even on the host system.

comment:28 Changed 12 years ago by anat

Errrr, sorry guys. This was wrong thread :( You may close this again :)

comment:29 Changed 12 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use