Note: This article is a work in progress, specifically it provides  steps so I can easily test local sites in IE on my Mac. I’ll be adding more screenshots and updated instructions eventually. In the mean time, feel free to comment with your own notes and helpful tips!

Using VirtualBox on my Mac for IE browser testing has been wonderful. Grabbing test Virtual Machines from modern.ie makes the process incredibly easy, and running the VM and checking out sites that are live on the web is a breeze.

That said, I occasionally need to check out a site that I’m running on my local machine. This means I need to add the locally hosted site to the VM’s hosts file. Sounds simple (provided you know the IP that will point to your local machine from the VM), but every time I download a new VM I forget how to properly set the permissions of the hosts file.

The first part, finding the hosts file, is easy: C -> Windows ->System32 -> drivers -> etc -> hosts

Once I’ve located the file (and created a shortcut to it on the desktop) I need to adjust the permissions.

  1. Setting VM Hosts File Permissions
  2. Right click on hosts and open the properties
  3. Select the Security tab and click the Edit button below “Group or user names”
  4. In the Permissions for hosts dialogue box, select Users, and then ensure that all “Allow” boxes are checked (save for “Special permissions”)
  5. Click the Apply button and then Yes in the Windows Security dialogue that pops up
  6. Click OK to close those dialogue boxes and now open the hosts file with Notepad to edit!

Depending on what server I’m trying to point at, I either need 10.0.2.2 (MAMP) or 192.168.50.4 for sites on my Vagrant install (this is the default for my Varying Vagrant Vagrants installation but the IP can be configured in the Vagrantfile so yours may be different).

Now that you’ve got the IP addresses you need and the hosts file open, edit with the local site(s) you’ll need access to and save!

IE VM Hosts File

Got Something To Say?

Your email address will not be published. Required fields are marked *