Page 1 of 1

Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 09:45
by jambor
My Host OS Win2003 Server was giving me lots of problems and had to reinstall it. My VirtualBox and guest machines with snapshots were all installed on another drive D: so they were not effected.

Once I reinstalled host Win2003, I reinstalled VirtualBox on drive D: on top of the old VirtualBox installation. When I started VB it started bare (ie no guest machines).
I pointed the hardisks and snapshots to proper location on D: but still guest machines even when i restarted VB.

I understand that I can manually recreate my machines and add the old vdi harddisks but that would loose the snapshots (and since my old host crashed I did not have time to merge snapshots).

There has to be a way to manually edit something to make everything at same state as on old system. Or maybe there is a way to reintegrate snapshots.

Please Help.

James

Re: Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 11:31
by mpack
I suspect that VirtualBox.xml was still stored in the <userdata>\.VirtualBox folder on your old C drive. The internal GUI folder preferences can't be used to change the location of that file - and I suspect you have deleted it. VirtualBox.xml contains the hard disks and virtual machine registries.

SInce you made the mistake of using snapshots, recovery will be tricky. Silly question: I don't suppose you made a backup of your old C drive before you wiped the contents? If you did then you could easily extract the VirtualBox.xml file and store it in the right place.

A last resort is to use my CloneVDI tool to merge your snapshots into a flat file before creating a new VM around it: read the CloneVDI release notes and find out about how to use the CloneVDI_Media.xml feature.

Re: Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 11:50
by jambor
Thanks for reply. Unfortunately the old C: had to be reformatted as couldnt boot at all so any xml on it is lost. I will try your utility and see how it goes.
SInce you made the mistake of using snapshots
Why is using snapshots a mistake? I find them very usful for when I am attempting something new and risk messing up everything, and in fact they came in handy a few times.
Is there an alternative to snapshots that you can suggest.

Thanks

James

Re: Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 14:14
by mpack
jambor wrote:Why is using snapshots a mistake?
That's my sly dig at the unreliability of snapshots: people keep risking their data in them, even though 1001 different ways have been found to mess them up (yours is method 73). Be grateful my utility exists, otherwise you would be dead out of luck. You may still be.

Clones give you all of the security of a snapshot, but none of the unreliability. The only difference is that the VBox GUI doesn't provide a simple one-click method of creating a clone.

Re: Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 18:59
by jambor
Can you please verify this:

In order to make a clone including all my snapshots, in your utility I have to enter:
D:\.VirtualBox\Machines\Windows XP\SnapShots\{cb7a10c7-17c4-40ae-857b-afb0ed1e75a9}.vdi
[this is listed as the most recent file, there are other similar older vdi's but i am assuming these are for previous snapshots.]

NOT this:
D:\.VirtualBox\HardDisks\Windows XP.vdi
[this would only make a clone of my original Windows version]


Thanks
James

Re: Host OS Failed need to recover guest machines with snapshots

Posted: 1. Sep 2010, 22:42
by mpack
If you are talking about the contents of CloneVDI_Media.xml, you have to enter the UUID and path/filename for all files in the chain, not just one of them. So both the files you mention would be included.

If you are asking which file you choose for the "Source" textbox in the dialog then you pick the latest snapshot file (unless you deliberately don't want the latest state), which will have a name similar to the first one you suggest, yes. Obviously I can't know if that is actually the correct file - usually you go with the one having the latest creation date, as you seem to have done.