Okay, here goes my first blog entry on rowlando.com. I switched to a Mac in November 2008 after many years of developing on Windows. At my current place of work I still use Windows but I plan to remedy this by creating a development / testing environment on one machine. I must say that I’m still figuring out how to use my MBP, weening myself of Windows ways on a daily basis.
Most web developers need to test their work on Internet Explorer, version 6, 7 and now 8. If you don’t, you have an understanding, forward thinking client, and one who’s probably missing out on potential visitors / customers. Anyway, I digress. On a PC I use Microsoft Virtual PC to test web pages on each version of IE, by downloading VPCs from Internet Explorer Application Compatibility VPC Image webpage. This method is free but has an annoyance in that the images are time-limited, so one has to download updates every 3 months or so.
Understandably, I wanted the same free method of testing when switching over to Mac. A quick search led me to Mozmonkey’s blog, where he describes how to do just what I wanted. The only killer is that for some of the steps one would need a PC. I don’t have a PC anymore. Comments to the rescue! In the blog’s comments there are lots of helpful hints in how to reach the end goal without a PC. Hooray! So here is my attempt at Mac only install of IE, in this case IE8 Beta 2.
1. Download Microsoft Compatibility VPC Image and extract
- Download the appropriate file from Internet Explorer Application Compatibility VPC Image webpage. It’s an EXE file.
- On Windows, one would open the file to extract the VHD. Use Zipeg, as suggested by Craig, to unzip the contents of the file you downloaded. Simply rename the extension EXE to ZIP, then open the file in Zipeg.
2. Convert the VHD image to a VMDK image
- Download and install Q from www.kju-app.org
- Purely for simplicity, rename your VHD file so it doesn’t have spaces in
- Open up a terminal
- Navigate to the folder where the VHD file is
- Type in the following command, replacing the filenames as appropriate:
/Applications/Q.app/Contents/MacOS/qemu-img convert -O vmdk -f vpc XPSP3withIE8.vhd XPSP3withIE8.vmdk
It took a couple of minutes for my MBP to complete this command, after which you should have a VMDK file, suitable fodder for VMware Fusion.
3. Install and configure VMware Fusion with the created image
I don’t have VMware Fusion yet so I’m now going to download the trial version of VMware Fusion. If it works I may buy it.
- Open VMware Fusion
- Click File > New
- Click the “Continue without disk” button
- Select the “Use an existing virtual hard disk” option and find the VMDK file that you created earlier
- A warning may popup. If so, convert your disk to the newest format.
- Click continue
- I chose Windows XP Home as the operating system then hit Finish.
After this, I started Windows XP and attempted to install VMware Tools.
Installing VMware Tools
After several unsuccessful attempts at installing VMware tools I started googling. I found some instructions by Jay Levitt and followed his directions where possible. I had to use keyboard commands because the mouse (trackpad) was not working yet. I did this:
- Press CTRL-ESC, R, “SECPOL.MSC”, RETURN.
- Navigate to Local Policies\Security Options.
- On the right is “Devices: Unsigned driver installation behavior”. Change it from “Warn but allow installation” to “Silently succeed”. Close Local Security Policy.
Jay mentions going into regedit but the registry entry Jay mentioned was not present in the version of Windows I downloaded from Microsoft so ignore that’s why it’s not listed above. Next I followed Jay’s steps to remove Microsoft’s Virtual PC drivers:
Now you’ll need your Windows XP installer CD or image.
- Press CTRL-Command to escape the guest.
- On the Fusion menu bar, select Virtual Machine | CD/DVD | Choose Disk Image… and find your ISO (or insert the real CD into your drive).
- The Windows Installer will autorun. Choose “Exit”.
Go to Control Panel -> System -> Hardware Tab. (Shortcut: Command-F15, right-arrow, right-arrow). Click the “Device Manager” button.
Under MSIE6 -> Batteries, you’ll see an Unknown Device, with an exclamation point. Right-click (or use the Action menu) and select “Disable”. Confirm “Yes”. Close the Device Manager and the System panel.My battery driver was okay already
- Go to Control Panel -> Add or Remove Programs, and remove the “Virtual Machine Additions” program.
- When you see the “You must restart your system” dialog, answer “No”.
- Close Add or Remove Programs, and close the Control Panel itself.
I’m not too sure why a disk image is needed. I was lucky enough to have a Windows XP disc sitting in a CD wallet next to me 🙂 Maybe Step 2 above can be skipped or maybe it’s needed in order to remove the Virtual Machine Additions.
Next I followed Jay’s instruction to install VMware Tools:
- Press CTRL-Command again, and select Virtual Machine | Install VMware Tools.
- A pop-up appears. Click the “Install” button.
- In the installation wizard, click “Next”, “Complete”, “Next”, “Install”.
Problem #2: When it tries to install the mouse, it will ask for i8042prt.sys. This is not provided VMware Fusion tools; my other VM doesn’t use this driver for the VMware mouse, and I am not sure why it needs it. However, you can point it at C:\WINDOWS\SYSTEM32\DRIVERS and click “OK”.I didn’t have this problem
Problem #3: When it tries to install the printer, it will ask for pscript5.dll, which is not yet installed, and not on the VMWare Tools CD. Just press ESC.Again, I didn’t have this problem
When prompted, I restarted my system. However, I must point out that each time I try to restart or shut down Windows it hangs on the “Windows is shutting down” screen. To overcome this, I select Virtual Machine > Restart Guest from the VMware menu.
Success! My mouse is working and, unlike Jay did with past versions of the VPC images I had no driver hell. I am able to fire up IE8 and browse the internet. I can’t actually believe this works! Now I just have to do the same for IE6 and IE7, plus workout how to view webpages on my localhost.
I hope my first blog entry helps someone out there.