Yet Another Programming Blog Rotating Header Image

Running IE on your Mac in VirtualBox (for free!) revisited

I’ve been developing a few rails applications recently and wanted to test them in IE. A quick google search turned up this excellent article. While that writeup (and its comments) has some excellent content, it is a little dated. Thanks to advances in VirtualBox, I was also able to reduce the number of steps required.

This procedure still isn’t for the tech savvy. You will encounter a Windows blue screen of death for example, and have to use the command prompt, but hopefully it’ll be worth it in the end.

What I wanted to achieve is the ability to test my site using licensed versions of IE6, IE7 & IE8, on my Mac, for free. As it turns out, Microsoft supplies free VirtualPC images “for testing websites with different IE versions on Windows XP SP2, Windows XP SP3 and Windows Vista”. Sweet!.

Downloads

You’ll need to download a few things :

  • VirtualBox, an excellent free desktop virtualization solution from Sun. Follow the installation instructions.
  • A VPC image. Don’t let the fact that the download is an exe deter you.
  • Zipeg to extract the image(s) you download.

Steps

Extract the VHD file

  • Rename the .exe image you downloaded to .zip
  • Open Zipeg and extract the zip file. Of the contents of the zip, the only file you need is the .VHD file. I’m extracting it to a VirtualBox specific location, but this could be any folder on your system. This takes a few minutes on my MacBook.
Extract the image

Extract the image

Setup VirtualBox

  • Start VirtualBox and create a new virtual machine
Getting started

Getting started

Naming VM

Give the VM a name

Configure RAM

Give the VM some RAM

Configure the hard disk, choose "Existing" here

Configure the hard disk, choose "Existing" here

Select the VHD you extracted in the first step

Select "Add" and then choose the VHD you extracted in the first step

You are done! Click Finish, and then Start the newly created VM

You are done! Click Finish, and then Start the newly created VM

Get past the Windows Blue Screen of Death (BSOD)

  • At first boot, you’ll likely encounter the infamous BSOD. Here is how you get around it. As soon as you start the VM, press fn + F8. That’ll bring up this options menu
Select Safe mode with Command Prompt

Select Safe mode with Command Prompt

  • You get around the BSOD by renaming the file that is causing the error, in this case processor.sys. (You’ll likely encounter a number of “Files needed” and “Found new hardware wizard” dialog boxes, I just kept pressing cancel until I go to the command prompt)
Rename processor.sys

Rename processor.sys and then restart the machine.

  • After a restart, you’ll finally be rewarded with a Windows desktop, and presented with the EULA. You’ll also still run into a number of “Files needed” and “Found new hardware wizard” dialog boxes. Keep canceling them.

Install VirtualBox Guest Additions

  • With your VM running, select Devices > Install Guest Additions, and follow the wizard. Select Continue Anyway when prompted. Finish the install, and select the option to reboot later.

Configure Networking

  • Finally, we need to get networking working. While VirtualBox used to ship with Windows XP drivers for their network interface, they don’t seem to be included in the guest additions any more (As of 2.1.4?)
  • On your Mac, type the following commands into the terminal to download the drivers from AMD
      $ mkdir VirtualBoxShares
      $ cd VirtualBoxShares
      $ wget http://www.amd.com/us-en/assets/content_type/utilities/V4.51.zip
      $ unzip V4.51.zip -d driver
  • Configure sharing so that you can access the afore extracted drivers from the windows VM.
With the VM running, select "Devices > Shared Folders" to bring up this dialog

With the VM running, select "Devices > Shared Folders" to bring up this dialog

Point this at the VirtualBoxShares directory you made earlier

Point this at the VirtualBoxShares directory you made earlier

Press OK to complete the sharing

Press OK to complete the sharing

  • In the Windows VM, Click Start, click Control Panel, click Performance and Maintenance, and then click System.
  • On the Hardware tab, click Device Manager.
Device Manager.

Device Manager.

networking-2

Right-click on the Ethernet Controller and select Update Driver...

Don't connect to windows update (since we don't have a network yet!)

Don't connect to windows update (since we don't have a network yet!)

We'll tell it where to find the AMD drivers

We'll tell it where to find the AMD drivers

Select "Include this location in the search" and then "Browse"

Select "Include this location in the search" and then "Browse"

Browse to the location of the shared folder.

Browse to the location of the shared folder.

Getting closer!

Getting closer!

Networking is configured!

Networking is configured!

  • Finally, launch IE, and ensure you’ve got connectivity.
Sweet success!

Sweet Success!

Summary

An hour or two of tedium is rewarded with a functional Windows VM, one on which you can browser test to your hearts content. Hopefully  my outlining of the steps will allow you to get through it quickly and with minimum frustration!

I should note I haven’t tried this process with the Vista VPC images yet, so would love to hear your feedback if you have.

26 Comments

  1. guigouz says:

    How can you say “free” if you still need a windows license ?

  2. Deepak says:

    @Guigouz, it is “free as in beer”, gratis, wont cost you a cent! Microsoft supplies those licensed VPC image at no cost.

    If what you are implying is that using Windows isn’t “free as in speech”, I couldn’t agree more!

  3. pbuck says:

    Very cool.

    I got XP IE6 image working fine, but when trying to create virtual machines for XP IE7 and XP IE8, I got error in VirtualBox… When trying to add existing virtual hard disk, I select the VHD file. VirtualBox indicates “Falled to open the hard disk …./XP SP3 with IE8 RC1 2009-Jan.vhd.” with details:

    Cannot register the hard disk ‘/…/IE8RC1XPSP3/XP SP3 with IE8 RC1 2009-Jan.vhd’ with UUID {b6202eec….} because a hard disk ‘/…/IE6.vhd’ with UUID {b6202eec…} already exists in the media registry.

    I assume I’d need to change the UUID associated with the new VHD files… did you do this step? How?

  4. Deepak says:

    @pbuck, you are supposed to be able to change the UUID, using the VBoxManage internalcommands sethduuid command, but I tried it, and ran into this bug in VirtualBox.. Ugh!

    I’ll poke around to see if there is a workaround.

    A really ugly workaround is to completely remove the IE6 VHD from the Virtual Media Manager, and add the IE7. This means you’ll only be able to work in one image at once. What a PITA.

    I’d love to hear if you find a solution.

  5. pbuck says:

    yep, that’s what I’m seeing also. At the moment I unloaded IE6 VHD, and am using only IE8 VHD. It is a PITA, but I _do_ have IE8 running for website testing!

  6. Deepak says:

    @pbuck

    Sweet!

    Did you download the VPC image today? It appears that they’ve updated the IE8 image since that was officially released this morning.

  7. pbuck says:

    downloaded XP/IE8RC1 image last night, and then updated to IE8 this morning via normal MS software update. Found a couple bugs in my site & one in google maps code…. Yet another browser to test against .

  8. Joseph says:

    Deepak
    This was so helpful, Thank you!
    The truly step-by-step process is great. The screenshots are A+.

    The only thing I would add is that I had to restart the Windows VM after sharing the folder with the driver.

    All the best,
    Joseph

  9. Erik says:

    THANKS A LOT!!!
    This helped me a LOT!
    i really needed this and i didnt want to wait for a windows machine to come in my hands. THNKS!

  10. mark says:

    excellent, thanks!
    got it all working, but my question is what now?
    if i’m building a site in dreamweaver on mac, can i somehow select IE as a preview
    browser now?
    or do i need to actually upload the site to test on IE?
    will admit that i haven’t read the virtualbox manual yet.

  11. Deepak says:

    @Mark, I’m not familiar with the way Dremweaver runs a preview. Does it launch a webserver? i.e. when you do a preview using an existing browser (Safari e.g.) , what is the URL in the address bar? You may be able to just copy that address into a VirtualBox instance.

  12. mark says:

    thanks deepak,
    DW browser previews are just a local page with a “file:///” address instead
    of an “http://” so the copy and paste address into an IE window in VirtualBox doesn’t work.
    need more info, but maybe it comes down to buying a copy of DW for windows.

  13. Deepak says:

    @Mark, in that case, one possibility might be to create a VirtualBox share that is the directory pointed to by the “file://” address, and then mount that in the Windows VM (similar to what we did above to get access to networking drivers), and then point IE at that share.. a little convoluted admittedly :)

  14. [...] guide about the installation process; I’m not going to reinvent the wheel here, so go follow the guide to install Windows XP SP3 with Internet Explorer 6. Join me back here at step 2 when you’re [...]

  15. Ryan says:

    THANK you!!!! worked perfectly… not sure if the build # changed or something but I got no BSOD! all the other directions were flawless

  16. Miguel Guerra says:

    Hi,

    The VPC image from microsoft expired on 30 April. It does not work anymore.
    Any solution?

  17. Deepak says:

    @Miguel,

    What kind of error are you running into? Are you creating a new VM following these instructions? If so, the VPCs on Microsoft’s site indeed say they expire on April 30th. They typically release new VPCs a day or two before the old ones expire, but they haven’t done that yet.

    FWIW, I am still able to run the VM I created when I wrote this article.

  18. Miguel Guerra says:

    Hi,

    Yesterday, when I wrote my question, I got a message saying that the Windows licence will expire in one hour and I should get a new one. Although today when I opened the vitual machine, it was all ok without any Windows message.
    Thank you anyway.

  19. Miguel Guerra says:

    Hi,

    I got the message again:
    http://www.aposta-na-net.com/content/windows_message.png

  20. Matt Faulds says:

    Thank you for putting this up – fantastic work! It’s painful that the drivers aren’t included.

  21. Kristian J. says:

    Thanks! Excellent walkthrough. I had tried this earlier without luck, now I finally got it working.

    I didn’t get any BSOD though (XP SP3 w/IE-8, virtualbox 2.2.4).

  22. Mike says:

    Excellent!!!! Just what I needed.

    Thank you

  23. anna says:

    Thanks SOOO much for the walkthough to configure networking. The past two times I’ve set this up, I always manage to blunder through it somehow, but couldn’t figure it out after downloading the latest version of VirtualBox (3.0.2). That shared folder thing is kickass!

  24. [...] Running IE on your Mac in VirtualBox (for free!) revisited – Yet Another Programming Blog Totally replaces VMware on my Macs. (tags: mac ie testing ie6) [...]

  25. Corbin says:

    I know that this article may no longer be monitored, but I thought I would try my luck. I found that the steps here were sooooooo easy to use, so thanx for posting, but as I am trying to setup this on my Mac, the XP images I have tried downloading, all say they need to be registered.

    Has anyone else had this problem? Or better yet, know a way around this?

    Thanx again for the awesome post.

  26. Jerry Witt says:

    Yeah, unfortunately Microsoft decided to require registration for these. They effectively removed the way for developers to test their code on MSIE browsers. It really sucks.

    Don’t worry, the day is coming when you won’t have to support MSIE any longer.

Leave a Reply

Spam Protection by WP-SpamFree