Though I have heard good things about Parallels and VirtualBox, I have always been a user of VMware. In particular, VMware Workstation. Workstation is great for firing up multiple Linux instances and testing out load-balancing or proxying scenarios. I haven’t really figured out any use for Windows VM’s other than testing IE6.
While there are a few Virtual PC hard disk images (.vhd) for Windows XP around, VMware cannot directly import .vhd files. It needs the actual Virtual PC virtual machine file (.vmc). After again losing my Windows XP virtual machine that I use for IE6 testing, I thought I’d document the process of running Windows XP in VMware so I don’t have to figure it out again the next time it happens.
Note: though these instructions are for VMware Workstation, some of this may apply to the free VMware Player.
- Download the IE6 Virtual PC Virtual Hard Disk (.vhd) image from Microsoft.
- Download and install Virtual PC from Microsoft, if you don’t have it already.
- Start Virtual PC. If you have no virtual machines, you will get the New Virtual Machine Wizard. Click Next.
- Select “Use default settings to create a new virtual machine”. Click Next.
- Pick a location to save your Virtual PC virtual machine. This should be the location you will create the VMware virtual machine. I keep all my VM’s in the same directory with meaningful names.
- Click Finish to create the new virtual machine.
- If you selected “When I click Finish, open Settings,” in the previous step, you will see the settings dialog. If you did not, select the new VM and click Settings. Select “Virtual hard disk file:” and find the .vhd file you downloaded in step 1. After finding it, click OK.
- You should see your VM in the Virtual PC Console.
- Select your VM and click Start. Your Windows XP virtual machine should boot in its own window.
- Shut down the virtual machine using the Start button. Then exit out of Virtual PC. Start VMware Workstation. Once it’s started, select “Import or Export…” from the “File” menu. You should see the Conversion Wizard. Click Next.
- You are at Step 1 of the conversion. Click Next to select a Source Type. Under “Select the type of source you want to use:”, select Other. Click Next.
- Under “Source VM or image:”, find the Virtual PC (.vmc) file you created earlier. Click Next.
- Select “Convert all disks and maintain size.” Click Next.
- You are at Step 2 of the conversion. Click Next to select a destination type. Under “Select the destination type,” select “Other Virtual Machine.” Click Next.
- Under “Virtual machine name,” fill in a meaningful name. Under “Location:”, find the place you want to store your virtual machine. Click Next.
- The wizard tells you that the source files are in Microsoft virtual disk (.vhd) format. Under “How do you want to convert them?”, select “Import and convert (full-clone).” Under “Disk Allocation,” Select “Allow virtual disk files to expand.” Click Next.
- The next step allows you to configure your VM networking. You should probably stick to the default of 1 NIC, bridged, that connects at power on. Click Next.
- Step 3 allows for some VMware customisation. You definitely want to install the VMware Tools. Click Next.
- You’re Virtual PC image is ready to be converted to VMware. Click Finish to begin the conversion!
- Get up from your desk and take a walk around. Go get a cup of coffee.
- After the conversion is completed, you should see your new Windows XP virtual machine in VMware Workstation.
- Click on “Power on this virtual machine” and your Windows XP VM should boot inside of VMware Workstation. You can uninstall Virtual PC at this point, if you want (which is likely, since you’re running VMware).