Hi All,
I am using VirtualBox 4.0.8 (in Ubuntu 11.04) and have recently corrupted my VM settings files in "~/VirtualBox VMs" and "~/.VirtualBox". So I backup and delete the files in these two directories and want to re-create a set of new VMs from scratch which uses my existing virtual disks (with snapshots).
My usual practice for the snapshots is to config VirtualBox to store them in a directory under the virtual disk directory. For example, if my virtual disk is named "My WinXP 1.vdi", then the file structure of this virtual disk and its snapshots would be :
/path/to/My WinXP 1/My WinXP 1.vdi
/path/to/My WinXP 1/snapshots/{0ab3ddf8-1bd5-48ec-b296-1e462a6a8a02}.vdi (for example)
/path/to/My WinXP 1/snapshots/{3f5357dc-3b6b-4033-82f0-556f0d98a4e1}.sav (for example)
/path/to/My WinXP 1/snapshots/{98cb744f-bfde-4785-9825-1dd748f4be43}.vdi (for example)
/path/to/My WinXP 1/snapshots/{2392c3b0-f3bb-4a31-b683-8229480a680e}.sav (for example)
When I create a new VM (say "My WinXP 1 VM") from scratch, I could instruct VirtualBox to use my existing "My WinXP 1.vdi" virtual disk and then later change the VirtualBox settings to point the "snapshot folder" to "/path/to/My WinXP 1/snapshots". However, when I click on the "snapshots" tab in the top right corner of VirtualBox, I could not see my previously stored snapshot states and I am afraid that I could only start this VM in a state represented by "My WinXP 1.vdi".
Does anyone know how to re-register back all the snapshots and the saved states into the new VM.
Thanks for any suggestion.
Regards
Lawrence
Re-register existing virtual disk (with snapshots) to a VM
-
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: Re-register existing virtual disk (with snapshots) to a
I'm afraid it isn't that easy. A snapshot tree relies on control information stored in the VM settings xml (the <vmname>.xml or .vbox file, depending on which version created it). That control information is fairly complex and cannot easily be reconstructed if you separate the drive from the VM.
Better to restore the damaged xml/vbox file from a backup. Note that VBox automatically creates backups when it modifies the xml/vbox file. The backup is saved in the same folder, with a name like <settings_name>"-prev". You can rename this back to the standard naming to restore the damaged control file.
Better to restore the damaged xml/vbox file from a backup. Note that VBox automatically creates backups when it modifies the xml/vbox file. The backup is saved in the same folder, with a name like <settings_name>"-prev". You can rename this back to the standard naming to restore the damaged control file.
-
tkwinfo
- Posts: 2
- Joined: 10. Oct 2011, 05:15
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP
Re: Re-register existing virtual disk (with snapshots) to a
Hi mpack and All,
Thanks for your suggestion. I am lucky that in this case I could restore the backup configuration files to register back my snapshots.
However, it would be great if VirtualBox could handle this case in its future versions.
Regards
Lawrence
Thanks for your suggestion. I am lucky that in this case I could restore the backup configuration files to register back my snapshots.
However, it would be great if VirtualBox could handle this case in its future versions.
Regards
Lawrence