Migrating from VMware to VirtualBox (Part 2): Windows
By Fat Bloke on Jun 04, 2010
In part 1 of this mini-series about how to move from VMware to VirtualBox we described how to move an Oracle Enterprise Linux vm. In this instalment we'll look at moving a Windows XP vm. It's worth noting that the same basic process will be followed:
- Pre-migration tasks - uninstall VMware tools and drivers
- Export from VMware - we'll use OVF as the mechanism to transfer the disk and vm configuration
- Import to VirtualBox - the VirtualBox import wizard makes this very easy;
- Post-migration tasks - finally we'll install the VirtualBox Guest Additions (analogous to VMware tools)
OK so here is our starting point: A Windows XP vm running inside VMware Workstation 7.1:
Uninstalling VMware Tools is straightforward in Windows by choosing Add/Remove Programs in the Windows Control Panel and clicking on Remove:
Once you have removed VMware Tools you can shutdown Windows and Close the VM.
From the VMware Workstation File... menu we can now Export the vm:
In the Conversion Wizard, the Source type should be "Other" because this is a Workstation vm:
...and select the VMware vmx configuration file:
At this point, the Conversion Wizard warned me that it cannot configure the source image, but this can be safely ignored:
...and you can continue selecting which disks to export:
When we reach the point in the Conversion Wizard where we select the destination type, we should choose "Virtual Appliance":
...before choosing the filesystem location for the exported appliance. Here, I am just calling it "MyXPPC" and dropping it on my Desktop:
If required you can describe a few more details about this virtual appliance:
...before choosing how to package the appliance. Here I chose a "Folder of Files" and did not create a manifest file, which is a digest or checksum file. (With Workstation 7.1 and VirtualBox 3.2 there seems to be a disagreement on the SHA1 digest so we're not using one here).
The network dialog is the last stage:
Then we confirm our selections and the export process starts:
This time it takes to complete this stage is a function of the size of your disk but can take some time. But on completion you have a folder which contains:
- .ovf file - an XML description of the vm (e.g. number of CPUs, amount of RAM, etc.)
- .vmdk - a Compressed VMDK file containing the contents of the vm's hard drive(s)
Here are the results of my export process:
Having exported the vm we can now import it into VirtualBox. BTW you can move this vm onto a totally different physical machine at this point, but I'm going to simply pull it into VirtualBox on the same Windows 7 host.
So close VMware Workstation and start up VirtualBox, and from the File menu choose Import Appliance:
The VirtualBox Appliance Import Wizard will ask you to choose the appliance (.ovf file) you want to import, so let's select MyXPPC.ovf:
The wizard reads the ovf data and shows the settings it is about to use. At this point you can modify the settings by double clicking on a value.
Now this is an important bit....For me, the Guest OS Type was set to "Other/Unknown" but we need to set it to "Windows XP": (for the experts: this instructs VirtualBox to turn on IO-APIC)
So here are my final settings:
Clicking on Finish starts the Import process:
Again, the time this takes depends on your vm's disk size but at the ned of the import process you will have a vm in the VirtualBox GUI window with the name of the appliance, in our case "MyXPPC":
If you start up the vm at this point you'll see something like this:
But for best results you now need to install the Guest Additions. To do this, choose Device...Install Guest Additions:
And follow your nose:
After installing the Guest Additions you will need to reboot:
But after you've done this you have a fully migrated Windows XP vm!
Epilogue (Advanced users only)
For those people who read to the end of a blog before jumping in, here's a bonus ....
There is a faster alternative to step 2 and 3 above for people who know what they are doing.
After performing Step 1 you could simply take the VMware disk image (.vmdk) and plug this into an appropriately configured VirtualBox vm. This effectively relies on the user creating a vm which is similar to the vm configuration in VMware, instead of relying on the ovf export and import (Steps 2 and 3 above) process.
To take this shortcut:
Create a New vm in VirtualBox for Windows XP:
When you asked about a Virtual Hard Disk, tell the Wizard that you want to use an existing disk and specify the original VMware vmdk by clicking on the folder icon and adding it to the Virtual Media registry:
Before you turn this vm on, be sure to change a setting in the System...MotherBoard tab, to enable IO APIC:
Now start up the VM. Don't forget to install the post-migration step of installing the Guest Additions.