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
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
- Start up VirtualBox
- Go to File
- Then Import Appliance
- Click Open Appliance
- Select the IE9 - Win7.ova file
- 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:
- Open VirtualBox
- Go to Help
- Then About VirtualBox
Installing Guest Additions
- In VirtualBox, click on the IE9 - Win7 virtual machine.
- Go to Settings
- Go to Storage
- Under Controller: IDE Controller, click Add CD/DVD Device
- Select the Guest Additions ISO you just downloaded
- Click OK to save the settings
- Start the Virtual Machine, if it isn't already
- In Windows, go to Start
- Then, Computer
- You should see the VirtualBox Guest Additions CD under Devices with Removable Storage
- Open the VirtualBox Guest Additions CD
- Run the VBoxWindowsAdditions installer
- Follow the instructions in the installer
- 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.
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:
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:
If you want to be able to use your virtual hosts too, follow the pattern below for each of your virtual hosts: