For people who use Macbook as their primary machine, testing a site on Internet explorer (IE8, IE9, IE10) can be really painful. If you want to test your site on IE then these are the options:
- Have a windows machine and work on two machines.
- Use some cloud based tool which provides IE on cloud.
- Install IE on your mac using Virtualbox.
Installing and using internet explorer on Mac is pretty convenient and can increase your productivity. Here are the steps to setup IE on Mac using virtual box.
- First download VirtualBox for OSX hosts. Latest version at the time of writing this article is VirtualBox 4.2.12 (x86/amd64) and I tried it on Mac OS X 10.7.5 (Lion). Install it with default options and run it.
- IE virtual machine images are available at modern.ie site (provided by Microsoft) and can be directly downloaded from there and loaded in VirtualBox.
- The easier option is to use awesone ievms script developed by Greg Thornton. Assuming you have curl installed on you Mac, run this to setup IE virtual machines:
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
This will install IE6 to IE 10 virtual machines on your virtual box. Here is how virtualbox will look like with IE virtual machines installed:
Note that the images are pretty large its better to download only if you are on high speed broadband (With 8Mbps broadband it took me 2-3 hours).
- In case you want to install specific machines e.g. IE8 and IE9 then use this command:
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="8 9" bash
- To recover (or to re-install an IE version) from a failed installation you may have to delete appropriate IE version files from
~/.ievmsdir (assuming it is installed location) and remove corresponding entry from virtualbox ui tool (with “Delete all files” option). Deleting an entry from virtualbox ui tool with “Delete all files” should remove corresponding IE version file from
~/"VirtualBox VMs"/directory. This also removes the entry from VirtualBox registry xml file
~/Library/VirtualBox/VirtualBox.xml. Here is how remove entry looks like in virtualbox ui tool:
- To start a specific virtual machine (e.g. IE8 Win XP), double click on it from VirtualBox. This will start the restricted windows in virtualbox. IE can be started just like you do in windows ui. It looks like this:
- Virtual Box has options to run virtual machine in these three modes (can be selected from “View” menu of VirtualBox window):
- Scale mode
All these modes makes working with IE virtual machine pretty convenient. When I’m working only in IE only then I prefer fullscreen mode. When I need to switch between IE and Mac then I use seamless or scale mode.