Update, 31. march 2013: this article is now out of date. Microsoft now offers free virtual machines and hosted virtualised solutions for cross browser testing at: http://www.modern.ie/en-us/virtualization-tools (thanks to Graham Ashton for the update).
Like many, I ditched Windows for other operating systems a long time ago and never looked back. But being a web developer I need to be able to test web sites in Internet Explorer. I had briefly considered buying a licence from Microsoft, just to be able to run a virtual copy of Windows 7 with IE9, but luckily Microsoft doesn’t want my money. What’s that, you say? Let me explain.
Microsoft provides “Windows Virtual PC VHDs for testing websites with different Internet Explorer versions” for free on their download page. I downloaded the Windows7 IE9 version, which is quite handy, since IE9 can emulate IE8 and IE7 too.
Once downloaded, I extracted rar files with Ubuntu’s Archive Manager. Then I fired up VirtualBox, created a new WIN7 machine and skipped creating a hard drive. I added the extracted VHD file afterwards, as an IDE drive. This step is important, because running it as SATA would cause BSOD headaches.
Once it booted, I had no problems getting inside using the “Password1″ password. Windows asked me to activate, but Microsoft advises you skip this step, and extend the testing period by running slmgr –rearm as administrator in the command prompt. This will extend the testing period for 30 days. That’s more than enough: once you’re happy with your virtual image, take a host snapshot and just use it as a starting point if the trial period expires (Microsoft actually encourages that). Don’t forget to install VirtualBox guest additions to enable screen resizing and what not.
References: I found this blog entry very useful (albeit outdated): http://danielmcormond.com/2011/02/21/how-to-use-microsoft-ie-vpc-images-with-virtualbox-on-mac-os-x/