HelpSpa.com
Search HelpSpa.com

Run IE6 in Vista with Microsoft Virtual Machine and a Windows XP Image

November 14, 2009DavidWeb Development4

As a web developer I still like to test my sites in Internet Explorer 6.  And even though everyone really should upgrade from IE6 for a litany of reasons — the least of which is security — IE6 still remains a popular browser. One of the biggest problems for testing in IE6, however, is that it’s pretty difficult to run IE6 in Vista (at least without quite a bit of registry tinkering). I wanted an easier solution and here it is:

The Big Picture. I run Windows Vista where I can test IE7, Firefox and Opera.  I run Microsoft Virtual PC 2007 in Vista with an XP VM that runs IE6.   I run a wamp server in Vista, and my XP VM install uses IE6 to access the “localhost” wampserver on Vista.

Goal: so in this tutorial we’re going to setup an XP virtual machine in Microsoft Virtual PC that we are going to use to run IE6 and subsequently “see” the Vista localhost apache server to test our sites.  In our XP virtual machine we are going to setup (2) network connections.  The first one will be the loopback adapter which will allow the Virtual PC to “talk” to Vista.  The second will be a shared usage of Vista’s network adapter so the XP VM can have internet access.

I like to set these up as two separate adapters because:
1.  I don’t always need (or want) to allow the VM to have internet access.  I turn on the internet network connection to download what I need, and then I turn it off.  For security (even though I run security software on the VM), there’s no need in my opinion to  let the VM have full-time internet access.
2. This way I can always leave the loopback (XP-to-Vista) on without having to worry about unmonitored internet traffic.

Here’s what you’ll need:
1. Microsoft Virtual PC
2. XP Virtual PC Image – note that Microsoft will disable the functionality of this image January 1, 2010. My guess is that if the demand is still there they will issue a new XP image for developers to use.
3. Wampserver (unless you already have an apache/php/mysql environment already setup).

Pre-Configuration Steps:

1. Download and install Microsoft Virtual PC 2007, get the XP Virtual PC image and setup the image in Virtual PC.
2. If you already have an apache/php/mysql environment running on Vista, go ahead to the next section. If you don’t, go ahead and install wampserver now.

Setting Up the XP Virtual PC to See the Vista Localhost

These steps assume you have already installed Virtual PC, the XP image from Microsoft, and have a wamp server running on Vista.

1. Install the Vista loopback adapter. The loopback adapter lets the XP VM and Vista to talk to each other. You can install the loopback adapter as you would any other new device. You can go through the add hardware wizard from the Vista control panel, elect to manually select a device, go to network adapters, find Microsoft in the left pane, and then loopback adapter in the right pane. Go ahead and complete the wizard.

2. Set a Static IP on the loopback adapter (in Vista). Go to the Network and Sharing Center, Manage Network Connections, and find the loopback adapter. Go to properties, and under TCP/IPv4 settings, set a static (non-dhcp) ip address. I like to use 192.168.25.1 (you can pick whatever you like — but since most networks work with 192.168.1.1, I like to keep the loopback adapter totally separate).

3. Go to the XP VM and configure the two adapters. Before you load the VM, go to the Virtual PC console and edit the settings for the XP VM (again — before you run the VM or while you have it not running). Make sure you have 2 network adapters configured (you can have 4). The first one should be “Microsoft Loopback Adapter” and the second one should be whatever your system’s regular network connection is (you can pick your wireless or your wired connection — I prefer to use the wired).

4. Configure the Two Adapters in the Virtual Machine In the network connections find the loopback adapter (remember we are in the XP VM now, and not in Vista) and change it to a static IP: 192.168.25.2. You shouldn’t have to configure the second adapter (the wired or wireless one from your computer) as it should already be set to DHCP.

5. Test that Vista can see the XP VM, and that the XP VM can see Vista.
a. In the XP virtual machine, ping the loopback adapter in Vista: 192.168.25.1. If successful, this means that the XP VM can “see” the Vista apache server.
b. In Vista, ping the “XP Loopback” adapter (remember you setup the loopback adapter in Vista, but the XP VM has an instance of this loopback adapter): 192.168.25.2. If successful, this means that Vista can “see” the loopback connection in the XP VM.

6. Tests and Finishing Touches.
a. Check that you can get a regular internet connection in the VM. It should work as long as you have the second network connection (the shared one) enabled.
b. On the Vista machine first test that the wampserver is running and that localhost is working. Make sure that wampserver is set to “put online”.
c. Now, (finally) test that the XP VM can see the apache localhost by going to a browser in the XP VM and typing: 192.168.25.1 . You should be able to see the same localhost page that you got in step 6b.
– If not, the problem may be the way Vista configures networks. Go to the Network and Sharing center and find the loopback network (you probably will see your “regular” wired/wireless connection and your loopback-based connection probably “unidentified network”). Go to “customize” this network and select “Private” network.

7. Know Issues/Reflections
a. Sometimes Vista seems to “forget” that I set this network connection as Private. So I do need to go in to the Network and Sharing Center and re-configure the connection so that it’s Private and not Public.
b. You must remember to turn on the wampserver, and to have the wampserver set to “Put Online” mode. You may want to put it back to “Put Offline” when you are done.

So there it is. It’s takes a few steps to get it right, but once its configured you have a great IE6 sandbox as well as an XP VM for any other testing you need.

Tagged , ,

Related Posts

  • Jim

    After reading this I am convinced that I made the right decision to run VirtualBox. The installation and configuration seems to be a lot easier. It makes me think about the ad comparing Apple to PCs.

    • Jim are you a Mac or a PC user?
      And do you/can you use VirtualBox to test IE6?

      I can’t argue that the VirtualPC setup above is a bit of a tricky setup. But there are two big issues to consider here in having this kind of setup:

      1. We still have to code for IE6 whether we like it or not
      There are those in the web development community who say that because IE6 is old, not-secure, not-standards based, (insert your complaint here), that as developers we shouldn’t be coding for it. And therefore, if we don’t code sites for IE6, then people will be forced to upgrade.

      The other side of the argument is that in today’s competitive world, it’s unacceptable for a client to lose even one possible visitor because the visitor is using IE6. Even many corporations surprisingly still use IE6, so I haven’t yet made the move to exclude IE6 compatibility for my client sites.

      2. The ease of testing IE6.
      I could very easily just use a service like Browsershots to check if my site will show in IE6, or I could just upload a site to an online testing site on my VPS, etc. — and then view that test site with a laptop that still has IE6. Both of these solutions would work, but both are cumbersome and slow. Because my specific need is to be able to work on my single laptop, and test IE6, this is the only good way that I’ve seen so far.

      Also, one of the best things about this setup is that Microsoft provides an XPSP2 image free of charge to use with Virtual PC for this purpose. So it saves the cost of having to have another licensed copy of XP to test with.

      But it VirtualBox can do the same thing more easily…I’d like to know about it.

  • Jim

    I am a PC user. I used to have to do the same type of testing you are doing. We had clients that had different versions of browsers on different platforms. In many cases you just have to draw the line and state you support this version on this OS.

    I recall an issue in IE where IE would not allow you to turn of warning message when you move from SSL to non SSL site. Microsoft agreed it was there issue but had no plans to fix it. We ended up tricking the browser using some redirects on our web site to think it was going from SSL to SSL.

    It sounds as though VirtualPC has that advantage of using a free image of XP. I can’t answer the question if VirtualBox can used to test IE6 because I have never attempted. I installed Vista on my VirtualBox VM. My goal is to use it as a test box to test new software.

    • I commend your taking a stand on IE6. I wish I could do the same — though at some point I will. On the topic of SSL, I agree about the SSL frustration — it’s very difficult to convince a client or an end-user that a site is totally secure even though their browser is screaming “danger” at them.

| More

SpiderOak Online Backup, Storage, Access, Sync, and Sharing

We are currently offering a free copy of our 16-page eBook, "How to Organize your Digital Photography Collection" to everyone who signs up for our free newsletter. This eBook will review how to organize your digital photos, discuss metadata, and give you an overview of software than can help you with your digital photography workflow. Sign up in the signup area, located in the right-side column of every page on this site, and read your copy now!


Popular