Cross browser testing with Internet Explorer and Windows just got a whole lot easier. In this article I'll walk you through the full process of downloading, installing, and configuring a Windows Virtual Machine.

Get the Virtual Machine

Since this is a rather large file, you may want to limit the download speed for this particular download, so that it doesn't use up all of your bandwidth. From terminal run the following:

cd ~/Downloads
wget --limit-rate=500k http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/Linux/IE9_Win7.zip

If the direct download link above does not work, you can get a fresh one here.

Once the download is complete, you'll need to "unzip" the zip archive. I use quotes there because I had issues using unzip on the file. I had to use 7z to extract it. If you don't have this command, you'll need to install p7zip-full:

sudo apt-get install p7zip-full

Now you should be able to extract the zip file:

7z e IE9\ -\ Win7.zip

Once that's done, you should have a file named IE9 - Win7.ova

Install VirtualBox

First you will need to download VirtualBox. Then you'll need to install it by running the .deb.

Alternatively, you can get any previous version of VirtualBox and for many different platforms here.

Set Up the Virtual Machine

  1. Start up VirtualBox
  2. Go to File
  3. Then Import Appliance
  4. Click Open Appliance
  5. Select the IE9 - Win7.ova file
  6. Click Next

This should take a little while. Once it's done, start the Virtual Machine.

Fitting the VM to Your Screen Resolution

To make using the Virtual Machine bearable, you'll want to have it fit your screen resolution. To do this, you'll need to install Guest Additions in the Guest OS.

Download the guest additions ISO for your version of VirtualBox. It should be in the directory for your version. If you do not know what version of VirtualBox you're running:

  1. Open VirtualBox
  2. Go to Help
  3. Then About VirtualBox

Installing Guest Additions

  1. In VirtualBox, click on the IE9 - Win7 virtual machine.
  2. Go to Settings
  3. Go to Storage
  4. Under Controller: IDE Controller, click Add CD/DVD Device
  5. Select the Guest Additions ISO you just downloaded
  6. Click OK to save the settings
  7. Start the Virtual Machine, if it isn't already
  8. In Windows, go to Start
  9. Then, Computer
  10. You should see the VirtualBox Guest Additions CD under Devices with Removable Storage
  11. Open the VirtualBox Guest Additions CD
  12. Run the VBoxWindowsAdditions installer
  13. Follow the instructions in the installer
  14. When the installation is complete, you'll need to restart the virtual machine

After the virtual machine reboots, it should now utilize the full resolution of your screen when in full screen mode.

Extras

These are solutions for some edge use-cases that you may find useful.

Disabling Mouse Integration Mode

You may need to disable "Mouse Integration Mode" in order to use your mouse in the Virtual Machine. You can do this simply with your keyboard while in the VM window: Host Key + I. The Host Key is usually the right Ctrl key.

Accessing Your Host Machine's Web Root

If you've got a local environment set up for your projects, you'll probably want to be able to access those projects locally while on your Virtual Machine. To accomplish this, you will have to modify Windows 7's hosts file; which is located at:

C:\Windows\System32\drivers\etc\hosts

You'll have to open NotePad as Administrator in order to modify the hosts file.

If you only need to be able to access localhost, just add the following line:

10.0.2.2   outer

If you want to be able to use your virtual hosts too, follow the pattern below for each of your virtual hosts:

10.0.2.2   domain-name.local

That's it!