How do you test your website in Internet Explorer if you don't have a Windows install? In a virtual machine of course! Traditionally this meant buying virtualisation software, getting a Windows license and then installing. Microsoft allows an alternative approach. For compatibility testing they provide time limited VPC images (Microsoft's Virtual PC). However VPC only runs on Windows. How can you use these on Linux?
The answer lies in converting the VPC image into a Virtualbox one. This then allows you to run the compatitbility images direcly from your Linux development environment.
This is not a beginners guide. You'll need some experience dealing with Windows and the Linux command line. You will also need more then 64GB of space free on Linux (temporarily). The following dependacies need to be installed:
- VirtualBox (http://www.virtualbox.org/).
- qemu-img (sudo yum install qemu-img)
- unrar (sudo yum install unrar)
Now the IE compatibility images need to be downloaded from:
If the URL has changed try a Google search:
Conversion to Virtualbox
In my case I downloaded the IE8 image archives IE8-VIS1.exe...IE8-VIS4.rar and put these in a directory with lots of space. You'll need more the 64GB for the conversion! This is only temporary and the final image will reduce down to ~6GB when converted to "vdi" format.
Decompress the VPC image from the downloaded archives. The IE8-VIS2,3,4 need to be in the same directory when you run the following command:
unrar e IE8-VIS1.exe
This will take a few minutes depending on the speed of you machine. Now convert to a raw drive image:
qemu-img convert Vista\ SP1\ x86\ with\ IE8\ 2009-Apr.vhd -O raw IE8Testing.bin
The final step is to use the Virtualbox "VBoxManage":
qVBoxManage convertfromraw IE8Testing.bin IE8Testing.vdi -variant standard
Start Virtualbox and create a new machine for Vista. Use an existing drive and select "IE8Testing.vdi". Don't use SATA controller for the disk. Use the IDE controller instead. I found with SATA it "blue screened" on boot. IDE is a bit more reliable. If it does blue screen reboot and select "last known working configuration". This worked for me most of the time when it crashed.
Try starting and if successfull install the Virtualbox Additions to pickup the "new" hardware present. Vista complains about most of the drivers which it can't find. I ignore all of these except the Network card.
I had to install the Ethernet driver manually as networking did not work in Vista out of the box. I selected Intel Pro MT 1000 desktop device via Virtualbox. I then downloaded the driver ProWin32.exe from Intel:
You can delete the vhd, bin and rar files to reduce the space.
I can now test and debug my web applications for Windows / Internet Explorer. Running the converted images is not a 100% reliable. It can take a few reboots to get Vista running. The process needs to be repeated every few months as the machine expires.
I found the following blog article very useful: