Restore Virtualbox snapshot from backup
After much exploration I have found that this is possible!
NB I don’t have any experience with XML so please excuse the terminology......also please backup any configuration files before making any of the changes suggested..
I could not find any references to this in the VirtualBox documentation or on any websites. In case anyone ever has the same problem here are the steps I went through to resolve the problem:
- I Turned off the virtual machines and took a copy of the VirtualBox directory, which contains all of the virtual machine folders and configuration files.
- Created a new snapshot of the machine in question
- Compared the copy of the VirtualBox folder with the original after the snapshot was created to see what changes were made.
I was happy to see the changes were fairly simple. To restore the snapshot from the backup I:
- Opened the VirtualBox.xml file from the VirtualBox folder and found the node named
- Under the node I located the child node of the virtual machine I wanted to add the snapshot to - which you can tell by the name of the VHD file.
- As the temporary snapshot I added to compare the directories was no longer needed I found the folder where it was created and replaced it with the snapshot from the backups.
- I then amended the line which contained the information about the temporary snapshot by changing the uuid of the temporary snapshot with the uuid of the snapshot from backup as well as changing the name of the snapshot file. The section looked like:
Notice that the uuid is the same as the snapshot file name, if you need to find out what the uuid is just copy and paste the snapshot filename without the extension.
- That’s it for the VirtualBox.xml file, save it and close it. Now open the MachineName.xml file from within the virtual machines directory
- Scroll down to the section that looks similar to this:
- Replace the uuid of the temporary snapshot with the uuid of the snapshot from backups.
- Save the file and close it
That worked for me. The machine booted up fine with the snapshot restored from backup and all the data back!