It’s always a bit difficult to test your webapplications in Internet Explorer if you are developing on Ubuntu. Your default test browser there will most likely be firefox.
But with with VirtualBox and Microsoft’s “Internet Explorer Application Compatibility VPC Image” it’s possible to test your website in a native IE6, IE7, IE8, IE9 and so on. Even on different platforms like Windows XP, Windows Vista or Windows 7!

It’s a bit hard to set it up, but let me show you how!

UPDATE: Testing IE with VirtualBox on linux has become easier with the xdissent ievms project!

Step 1

Download the desired IE compatability VPC image. Let’s download for example Windows_XP_IE6.exe. This image contains download links to install native IE7 or IE8 to overwrite the installed IE6. So if you want to test on different browsers, you’ll have to create a couple of VPC images.
Because it’s a exe file you’ll have to execute it on a Windows platform, than it will extract and give you one .vhd file. This file is compatible with VirtualBox, so you can even have hardware virtualization if your machine supports it! Copy the .vhd file somewhere on the disk where your VirtualBox on Ubuntu has access to it.

Step 2

Download this ethernet card driver to gain access to the internet in your virtual image and active your image. Extract the file and go inside the folder and execute:

mkisofs -o WinXP_SignedDriver.iso -J --rock WinXP_SignedDriver/

In your VM, go to “Devices > CD/DVD Devices > Choose a Virtual CD/DVD Disk file…” and find the ISO you made in the previous step.

Once the driver ISO is mounted, click “Start” and then right click on “My Computer” and choose “Properties”. Click on the “Hardware” tab, then open “Device Manager”. Find your non-functioning ethernet card and right click on it and choose “Update driver…”

In the window that pops up, choose “No, not this time”, then “Install from a list or specific location”, then “Don’t search. I will choose the driver to install.” You will then be asked to select the network adapter. There should only be one in the list, so just click “Next” to start the installation.
When the installation is interrupted with an “Insert Disk” nag window, click “Ok”, then “Browse”. Navigate to D:\V451 or wherever your driver ISO mounted to. Then, go into the WinXP_SignedDriver folder and choose the PCNTPCI5 file. Click “Open” and then “Ok”. Repeat for each “Insert Disk” window that pops up. When the installation finishes, you should be connected to the internet.

Click the key icon in the task bar to start activation. Choose “Yes, let’s active Windows over the internet now”, then “No, I don’t want to register now; let’s just activate Windows” and it should be successful.

Click the blue star in the task bar and choose “Validation Failure Details (online)” to start the genuine verification process. It will open up a browser window and ask you if you want to install something. Click “Install”. In a few moments, you’ll see a webpage with a green banner that says something like “Welcome to Windows”

Step 3

After this you maybe still have a problem with an error like “CmBatt.sys and compbatt.sys missing”.

Download the disc image file of Service Pack 3 here. You now have an .iso file that you can mount inside the virtual machine. When the virtual machine is your focused app, you can choose Devices > Mount CD / DVD-Rom. Do this and choose the Service Pack 3 ISO file. If it doesn’t show an autorun screen, go to “My Computer” and double-click the disc.

Start the installation process. At one point it’s extracting all SP3 files. When it’s done, leave the screen alone, don’t choose “Next” or whatever. Make sure the “Missing files” dialog box from the hardware detection is visible (you may have to manually pop it up by going to “Add Hardware” under “Control Panel”). When it complains about the aforementioned files, point it to a directory like c:\a819b0059e04c1755\i386. This is where that installer from before extracted all its files, and the missing files will be there.

So now that’s out of the way, cancel out the Service Pack 3 installer, you don’t need it anymore.

Sound and USB

Sound and USB weren’t working for me. Then again, I don’t need sound and USB in a virtual machine.
In Virtual Box, right-click on your machine, choose “Settings”, and under “Audio”, uncheck “Enable audio”. Also, under “Ports”, uncheck “Enable USB controller”. This should get rid of those annoying messages.

You’re done! You can now install VirtualBox Guest Additions and restart the VM.

Resources I found on the internet that helped me get to the working solution described above: