Migrating from VMware to VirtualBox (Part 2): Windows

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:

  1. Pre-migration tasks - uninstall VMware tools and drivers
  2. Export from VMware - we'll use OVF as the mechanism to transfer the disk and vm configuration
  3. Import to VirtualBox - the VirtualBox import wizard makes this very easy;
  4. 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:

VMware Workstation

Pre-Migration Tasks

Uninstalling VMware Tools is straightforward in Windows by choosing Add/Remove Programs in the Windows Control Panel and clicking on Remove:

Uninstall VMware Tools

Once you have removed VMware Tools you can shutdown Windows and Close the VM.

Export from VMware 

From the VMware Workstation File... menu we can now Export the vm:

Export

In the Conversion Wizard, the Source type should be "Other" because this is a Workstation vm:

Source Type

...and select the VMware vmx configuration file:

Select the vmx file

At this point, the Conversion Wizard warned me that it cannot configure the source image, but this can be safely ignored:

Warning

 ...and you can continue selecting which disks to export:

Disks

 When we reach the point in the Conversion Wizard where we select the destination type, we should choose "Virtual Appliance":

Virtual Appliance

...before choosing the filesystem location for the exported appliance. Here, I am just calling it "MyXPPC" and dropping it on my Desktop:

Name of destination appliance

If required you can describe a few more details about this virtual appliance:

Appliance details

 ...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).

Packaging choices

The network dialog is the last stage:

Network

Then we confirm our selections and the export process starts: 

Exporting...

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:

Folder of files

Importing into VirtualBox

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:

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:

Choose appliance

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) 

Windows XP guest type

So here are my final settings:

Import settings

Clicking on Finish starts the Import process:

Importing...

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":

VirtualBox GUI

Post-Migration Tasks

 If you start up the vm at this point you'll see something like this:

VirtualBox without Additions

But for best results you now need to install the Guest Additions. To do this, choose Device...Install Guest Additions:

Install Guest Additions

And follow your nose:

Guest Additions

After installing the Guest Additions you will need to reboot:

Reboot after Guest Additions

 But after you've done this you have a fully migrated Windows XP vm!

Windows XP running under VirtualBox

Easy, right? 


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:

new VM

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:

Existing Disk

Before you turn this vm on, be sure to change a setting in the System...MotherBoard tab, to enable IO APIC:

IO-APIC

Now start up the VM. Don't forget to install the post-migration step of installing the Guest Additions.

- FB 

Comments:

Fat Bloke I owe you a beer for this post! I need to prepare just such a document to show to my management that this migration is even possible so this really helps me out.

Posted by Craig on June 04, 2010 at 09:48 AM BST #

Craig,

Just added an Epilogue to this blog for people who know what they're doing.
Does this qualify for a 2nd beer?

- FB

Posted by Fat Bloke on June 04, 2010 at 09:57 AM BST #

Great post, very helpful.
Thanks!

Posted by RC on June 27, 2010 at 04:14 AM BST #

VMWare workstation no longer offers the option of "Virtual Appliance" in the Destination Type :-(

Posted by Iyal Carmen on June 29, 2010 at 06:07 AM BST #

Sorry but it only works if you have a monolitic VMDK file.
If you have a split disk, you are stuck...

Posted by Vincenzo on July 23, 2010 at 07:27 AM BST #

Vincenzo,

I have migrated a split file vm using the Epilogue route.
When you choose the existing vm, select the "index" file of the vmdk.

-FB

Posted by Fat Bloke on July 23, 2010 at 08:03 AM BST #

Post a Comment:
Comments are closed for this entry.
About

Fat Bloke

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today