Moving VirtualBoxes

by cw Email

Tonight I had to move my VirtualBox guest from one host to another. The guest had a snapshot that it was working from. This caused me a little grief due to ambiguous wording in the Virtual box documentation, and from the look of the forums, others are having a similar problem. So, here's how to do it:

Be very careful that you have enough harddisk space to perform copy operations. If you don't then you will lose you snapshot data. You have been warned. Happened to me :-(

On the current system open VirtualBox Management window. Select the VM you want to move. Click Snapshots. Choose to discard the current snapshot. DISCARD, yes that's right. It doesn't actually delete data, and it should be called "MERGE", because that is what it does. It then merges the snapshot to the base image VDI. Once all the snapshots are merged, you can go to command line, and do:

VBoxManage clonevdi /path/to/vdifile.vdi /path/to/backup.vdi

Usually you will find the original VDI file in /home/username/.VirtualBox/VDI.

Then you can copy the backup.vdi to another machine, store it away, whatever, for adding to a new VM.

Trackback address for this post

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

3 comments

Comment from: Marc Janssen [Visitor]
*****
Thanks for this tip. It was very helpfull!

Greetings.
26/06/08 @ 02:06
Comment from: rado [Visitor]
I had options on my snapshot to revert to the current snapshot or to discard the snapshot and state. I discarded as the post says to and it destroyed my virtual machine. I couldn't start it after that so I don't think it it merges it.
06/02/09 @ 20:04
Comment from: cw [Member] Email
Rado:

Sorry, it may well do so now. This is an old post, and Virtualbox has moved on a lot since then. I no longer use it, as KVM is superior, so I cannot confirm or deny current versions handling of this.
09/02/09 @ 23:10

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Details

CombatWombat Speaks is a personal blog about Computing, Faith, and Life.
It is deliberately anonymous, as it doesn't really matter who I am.
What matters is the quality of the information within, and how
relevant it is to you.

There is a heavy emphasis here on technical computing, especially Linux, Ubuntu, Mint, Microsoft, VirtualBox, Networking, and Usability.

Please drop a comment in if you would like to have more details, or wish to learn about something specifically.

Close Details
CombatWombat speaks
2 Corinthians 10:4