VM crash after host hard-drive run out of memory

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Oemes
Posts: 4
Joined: 2. Mar 2012, 14:50
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Win7 Home

VM crash after host hard-drive run out of memory

Post by Oemes »

Few days ago my hard-driver run out of memory where the VMs are stored while my VM (Win7 Home) was running. The VM got frozen and I had to shut it down. Next day I want to restart it after I emptied my hard drive but all I got is an error message starting with "Start tag expected, '<' not found...." . The VM description is not visible anymore in VB, no details about the configuration of VM, the according vdi-drive also does not appear in the drive manager. I looked at the location where the VM is stored, all the snapshots, logfiles and the vdi-drive are there, only the file ending with *.vbox is empty.

Unfortunately I have got no idea how to solve this problem and therefore asking you for some help. Any suggestions what to do?

My host is Ubuntu 10.04 and the guest is Win7 Home. I tried to replace the *.vbox file with an backup. The VM starts but with a very old version so I really need the snapshots.

Thanks for help
- Oemes
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM crash after host hard-drive run out of memory

Post by mpack »

Looks like the VM settings file (<vmname>.vbox) has been corrupted.

Look for a file with the extension ".vbox-new" (or similar, this is from memory, as I don't encounter this issue often). If you find it then rename it to ".vbox".

Only if that file doesn't exist then look for one called ".vbox-prev", and rename that to ".vbox". The "-prev" variant is from an older session, but usually is close enough.

All of the above with VirtualBox shut down of course...
Oemes
Posts: 4
Joined: 2. Mar 2012, 14:50
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Win7 Home

Re: VM crash after host hard-drive run out of memory

Post by Oemes »

Thanks for the quick answer. I found the file with ending .vbox-prev but it is has the same content like the .vbox file I have update from an old backup. The backup file has only tow snapshots out of eight. Are there other possibilities to get the VM running again?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM crash after host hard-drive run out of memory

Post by mpack »

Well, that's snapshots for you. Why people persist in using them escapes me. If you want a restore point, make a backup. Put a 2nd drive in the PC if you want to do the backups conveniently.

Ok, typical snapshot related disaster recovery mode: download the CloneVDI tool from the Windows hosts forum. As the location implies, this is a Windows tool, so you'll need to borrow a Windows PC or install Wine to run it on a Linux host.

Copy the base VDI and all the snapshot files into one folder. Use CloneVDI to clone the most recent snapshot file (do not make the mistake of cloning only the base VDI, as the clone will contain nothing since the first snapshot). The output of CloneVDI is a single VDI which is a merge of everything from the most recent snapshot backwards. Build a new VM around the clone VDI - do not attempt to mount the clone VDI in the old VM, at least not unless you know enough about xml editing to delete all remnants of snapshot use from the settings xml file.

We know that the file contents are suspect - at least 2 files are corrupted from what you have said - in which case there is no guarantee of success with CloneVDI either. The only technique that guarantees success is a proper backup.
Oemes
Posts: 4
Joined: 2. Mar 2012, 14:50
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Win7 Home

Re: VM crash after host hard-drive run out of memory

Post by Oemes »

I merged my snapshots with the tool and set up a new VM. Everything get fine and I can use Win7 as usual :D .

Thanks to you for support and the nice tool!!!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM crash after host hard-drive run out of memory

Post by mpack »

Thanks for reporting back, and I'm glad you are up and running again.
Post Reply