Page 1 of 1

[Solved] Associating snapshot files to a restored VM

Posted: 7. Nov 2013, 14:52
by Satpaul
Hi,

I've just restored a VM (VHD file in particular) from backup into both VirtualBox-4.1.8-75467-Win plus also the latest version VirtualBox-4.3.2-90405-Win and cannot re-associate the snapshot files even though I have I believe placed them in the correct folders. The VM starts up fine but it is in fact the base VM i.e. without any changes. The changes exist in the snapshots. I've seen some forums talking about checking the virtualbox.xml file to ensure that the snapshot files are located in the same place specified in this file which they are. Can anyone please help? Otherwise it will require a whole lot of work for me to get the VM back to its original state :(

Satpaul

Re: Associating snapshot files to a restored VM

Posted: 7. Nov 2013, 19:50
by socratis
Satpaul wrote:Otherwise it will require a whole lot of work for me to get the VM back to its original state
It will require a LOT of work, none the less. IF you want to go down this road (editing the .xml and .vbox files), it is difficult, error prone and (this is true) it is going to hurt your eyes! It hurt mine...

Take a VM with a snaphshot, and text-edit the <VM>.vbox file. Check the snapshot files on your HD, their names and their UUIDs. You'll see them referenced in the <VM>.vbox and/or in the VirtualBox.xml. Study and understand their structure.

THEN, modify your VM's .vbox file. Get psychologically ready for a failure. Try again. You might succeed...

I know it's not real help, but (unless I'm missing something really important) nobody can help you with that...

Re: Associating snapshot files to a restored VM

Posted: 8. Nov 2013, 13:23
by Satpaul
Thanks! :-)

Re: Associating snapshot files to a restored VM

Posted: 8. Nov 2013, 13:33
by mpack
The easiest fix is to merge all the bits back into one VDI.

Put the base VHD plus all snapshots into one folder. Use CloneVDI (see sticky at the top of this forum) to clone the most recent snapshot (NOT the base VHD). Build a compatible VM around the resulting VDI. Delete old VM(s) once new one is tested.

And, VHD and snapshots are both best avoided anyway.

Re: Associating snapshot files to a restored VM

Posted: 14. Nov 2013, 13:35
by Satpaul
Thanks MPACK, this utility worked and saved me a lot of time.

S