Monday, February 23, 2009

Moving Virtual Box VM to another host

I have Windows XP running in a Virtual Box VM. The iMac it was running on is getting intermittent screen artifacts, so time to switch machines.

I found this, which led me to believe that moving hosts is possible. The VM is named "Win XP" and has one snapshot. I mucked up the transfer the first time. These are the steps I followed the second time, which worked.

  1. Moved ~/Library/VirtualBox/HardDisks/Win XP.vdi to the same location on the new host.

  2. Copied ~/Library/VirtualBox/Machines/Win XP to the same location on the new host.

  3. In the old VirtualBox.xml there was a HardDisk tag with the attribute location="HardDisks/Win XP.vdi" that contained a child HardDisk tag (I had one snapshot). Copied these into the new VirtualBox.xml.

  4. Copied the appropriate MachineEntry tag from the old VirtualBox.xml to the new one.

The VM started up on the new host with no problems.

Also stumbled across a site with downloadable Virtual Box images.

1 comment:

bakar said...

"Following closely behind the mid-November 2.06 release of VirtualBox, Sun Microsystems has released version 2.1. This has a number of new features, but one of the most interesting is the ability to run a 64-bit VM inside a 32-bit host. Another useful feature is integrated host-based networking; no more fiddling around with network bridges. Sun is really giving VMWare a run for their money."