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.
-
Download VirtualBox
First download VirtualBox for OSX hosts. Latest version at the time of writing this article is VirtualBox 5.0.10 (x86/amd64) and I tried it on Mac OS X 10.10.5 (Yosemite). Install it with default options.
-
IE virtual machine images
IE virtual machine images are available at modern.ie site (provided by Microsoft) and can be directly downloaded from there and loaded in VirtualBox.
-
ievms script
The easier option is to use awesome ievms script developed by Greg Thornton. Assuming you have curl installed on you Mac, run this to setup IE virtual machines:
curl -L -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash
This will install IE6 to IE 10 virtual machines on your virtual box.
-
VirtualBox UI with images
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). -
Install specific IE
In case you want to install specific machines e.g. IE8 and IE9 then use this command:
curl -L -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="8 9" bash
-
Installing Windows 10 and IEs withot ievms script
In case you run into problems with ievms script, you can follow these following instruction to install Windows 10 (or older IEs) without ievms script.
How to run windows 10 on Mac using VirtualBox -
Recover or re-install an IE image
To recover (or to re-install an IE version) from a failed installation you may have to delete appropriate IE version files from
~/.ievms
dir (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:
-
Starting IE Virtual Machine
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:
-
VirtualBox IE viewing modes
Virtual Box has options to run virtual machine in these three modes (can be selected from “View” menu of VirtualBox window):
- Fullscreen ([Command] + F)
- Seamless [Command] + L
- Scale mode [Command] + C
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.