Testing with IE6, IE7 and IE8 on VirtualBox
I've recently moved from using Parallels for browser testing to Sun's Open Source VirtualBox. Here's a walkthrough on how to get a browser testing suite for free on OSX or Ubuntu.
Microsoft’s Virtual Hard Drives ¶
Microsoft make a series of downloads available for web developers to ensure browser compatibility. Currently you can download IE6-8 on XP and IE7 on Vista. The good news is that they are also free so there is no need to buy a Windows license if all you want to do is browser test. The images generally expire at the end of each quarter but it is fairly trivial to download a new version.
Extracting the .exe ¶
The downloads are available as .exe files so you will need to extract them first. On OSX I use Stuffit which extracts .exe files on the free version. Andrew Odri also has a write up on this and he recommends using The Unarchiver although this didn’t work for me.
On Ubuntu you can use Wine:
sudo apt-get install wine
Once installed you can use Wine to extract the exe:
Get VirtualBox ¶
Next download and install VirtualBox. On OSX you can download a .dmg file. On Ubuntu the following will install it for you:
sudo apt-get install virtualbox
Fixing Microsoft’s duplicate identifiers ¶
The Microsoft images all share the same Hard Disk Identifier which means that VirtualBox will only let you add one of the hard drives to the Media Manager. So we need to fix that. Hat tip to Andrew Odri for documenting this.
For OSX Download Q and then for each vhds we need to convert it to a vdi. This will allow us to test in parallel. On OSX run:
/Applications/Q.app/Contents/MacOS/qemu-img convert -O raw -f vpc yourVHD.vhd RAWimage.raw VBoxManage convertdd RAWimage.raw NewVDIImage.vdi
For Ubuntu get QEMU:
sudo apt-get install qemu
Once installed on Ubuntu you can then convert the .vhd to a .vdi
qemu-img convert -O raw -f vpc yourVHD.vhd RAWimage.raw VBoxManage convertdd RAWimage.raw NewVDIImage.vdi
Fixing drivers ¶
Once you have set up your Virtual Machine and booted you will see a blue screen of death. This is because we still need to install some drivers. When booting hold down F8 and boot into Safe Mode with Command Prompt. Cancel any prompts that come up and at the DOS prompt enter
cd \WINDOWS\system32\drivers ren processr.sys processr.old
Restart the machine and then in the VirtualBox menu go to Devices > Install Guest Additions. Follow the prompts and install the additions. On Ubuntu I found I had to manually download the iso from the link supplied, then mount it in the machine settings before booting. Reboot when you are done.
Once rebooted at the DOS prompt type
D:\VBoxWindowsAdditions-x86.exe /extract /D=C:\Drivers
This will extract the VirtualBox drivers
Then within Windows do
- Start > Administrative Tools > Computer Management
- Select Device Manager.
- Select Batteries, Unknown Device -> Disable
- Select Network Adapters, Ethernet Controller -> Update Driver
- Select Yes, now and every time, click Next
- Select Install from a list or specific location, click Next
- Enter location “C:\Drivers\x86\Network\AMD”
- Click Finish
All done - repeat this method on the other vhds and you will then have a full IE6-8 testing suite that you can run side-by-side if you wish.
This article draws on knowledge gained from the following posts and I’m very grateful to the authors
- IE8 in Ubuntu Intrepid with VirtualBox
- HOWTO: Running IE6, IE7 and IE8 On Ubuntu Intrepid (8.10) Using VirtualBox
- IE6, IE7 And IE8 On Mac OS X Step By Step
- Running IE6, IE7 and IE8 on your Mac
Can you help make this article better? You can edit it here and send me a pull request.
Ubuntu v OSX smackdown
In the left corner is my beloved OSX. In the right corner is Ubuntu, the Open Source upstart. Let battle commence..
Chroot SFTP users on Ubuntu Intrepid
Newer versions of OpenSSH come with the ChrootDirectory directive that makes it easy to jail SFTP users to a directory. I've written about <a href="/journal/adding_sftp_users_with_a_limited_shell_in_centos_5.2/">giving users a limited shell with older versions of OpenSSH</a> but if you can run OpenSSH 4.9 or greater I recommend using this method.
IE7 one year on
Today is the launch of Leopard, Apple's latest version of the OSX operating system. With it comes Safari 3, a product that almost a year on from the launch of Vista highlights the stagnant performance of Internet Explorer 7.