How to recover a VM with snapshots... ?

This is for discussing general topics about how to use VirtualBox.
Post Reply
mikebo
Posts: 10
Joined: 8. Sep 2008, 21:09

How to recover a VM with snapshots... ?

Post by mikebo »

The root disk of my Solaris server died and had to be replaced and the OS reloaded from scratch. The partition holding my VirtualBox VMs was on another drive, so they were saved. However, my Red Hat RHEL 5 VM won't open. The VM was shut down at the time the disk failed, but it was running with two snapshots. When I point VB to the XML file, I now get this error.


Failed to open virtual machine located in /vbox/Machines/vmredhat/vmredhat.xml.
A differencing image of snapshot {blah-blah-blah} could not be found.
Could not find an open hard disk with UUID {meh-meh-meh}.


This is a little aggravating. I have backups, but VirtualBox apparently isn't smart enough to figure out a VMs state from its own configuration files. That is, without someone mucking about in XML files with an editor.

From poking around with Google, I understand it is possible to stitch this back together. I don't care if it's convoluted, I'd really like to give it a shot. Do comprehensive instructions exist for sorting this out?

Any suggestions or pointers would be appreciated. Thanks!
mikebo
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How to recover a VM with snapshots... ?

Post by mpack »

Without knowing exactly how the xml was damaged, there is little I can do to help there.

I suggest you put copies of the base VDI plus both snapshot files into a single folder, and then use the CloneVDI tool to clone the most recent snapshot (you should be able to tell from creation date of the file). Do NOT tell CloneVDI to clone the base VDI. Cloning the latest snapshot should result in a clone which is a merger of all the data from the three files, which you can use to recreate the VM.

CloneVDI can be downloaded from the sticky in "Windows Hosts". Wine works if you want to run it on a non-Windows host.

I also recommend that you upgrade VirtualBox to v4, as the v4 way of organising files is much better able to cope with scenarios such as yours.
mikebo
Posts: 10
Joined: 8. Sep 2008, 21:09

Re: How to recover a VM with snapshots... ?

Post by mikebo »

Thanks very much for suggesting CloneVDI... the VM is back up and running.

BTW, already running VB 4.1.6.

Regards,
mikebo
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How to recover a VM with snapshots... ?

Post by mpack »

mikebo wrote:BTW, already running VB 4.1.6.
Then it may pay you to convert any other VMs you have to v4 format (this forum has advice on how - cloning is easiest). That way in future if you have a VM you want to add to the GUI you just use the Machine|Add menu item. The latter can't work with v3 format VMs because v3 format is not self contained.

As regards the VM you just got working, I assume you created a new VM and mounted the clone VDI within it, hence that VM is already now in v4 format. So the above para only applies to other VMs you might have.
Post Reply