How can we install and run these VMs on Mac using VirtualBox?
If we download and install these VMs onto Mac, and run them using VirtualBox using the provided image file, the VMs seem to crash or stuck during the boot up phase. To get these VMs to work on Mac using VirtualBox:
- Download these VMs from www.modern.ie as we did previously
- Unzip these VMs
- Launch VirtualBox
- Click on File -> Import Appliance
- Select the .ovf file
- Click on the Import button
- Start the VM as normal
Before starting the image, create a snapshot of the current machine state - this will allow you to quickly roll back to a fresh virtual machine once the usage period of the OS expires.
How can we test different versions of IE?
To make testing web applications with various versions of Internet Explorer easier, Microsoft provides free virtual machine images with different versions of Internet Explorer on different supported version of Windows. To use these images, we must first download and install:
- MS Virtual PC 2007: http://www.microsoft.com/en-us/download/details.aspx?id=4580
- Microsoft Virtual PC 2007 SP1: http://www.microsoft.com/en-us/download/details.aspx?id=24439
- Download the VM images from http://dev.modern.ie/tools/vms/. On this page, there are two drop-down boxes. The first box allows you to select appropriate IE version and OS version. The second drop-down box allow you to choose the virtualization technology. I choose VPC for the second drop-down box. Click on the Download .zip button. Once downloaded, unzip the file. Inside the unzipped folder, you will find a .vhd file and a .vmc file. To keep thing organize, I keep all my VM files under C drive using a structure such as C:\VMs\IE11Win7. Create such folder if necessary and move the .vhd and .vmc files to appropriate place.
- If this is your first time using VPC, you can double click on the .vmc file. This will launch the VPC console.
- Click on the Settings buttons and change the following settings:
- Memory: Specify appropriate amount of memory to allocate for this VM. This is based on how much memory your physical machine has. If your physical machine as plenty of memory, you can specify 1024MB. If your physical machine does not have a lot of memory, you can specify 512MB.
- Undo Disks: Check the Enable undo disks check box.
- Networking: You must specify a network adaptor. If you cannot access the Internet from inside the VM, you will need to shutdown the VM, and change this setting. Usually, selecting the Shared networking (NAT) option for Adaptor 1 will work.
- Click the OK button to save the settings that we just changed.
- Click the Start button to launch the VM.
- Install Virtual Machine Additions (click on Action -> Install or Update Virtual Machine Additions). If you see an error "Files in Use - Virtual Machine User Services …", press the Ignore button. This may happens a couple of times but it will work fine. The VM will reboot a couple of times. If you cannot take control of your mouse during this process, press and release the right ALT key, and move the mouse.
What additional software should be installed onto the VM to make debugging easier?
Install Notepad++ Install WinMerge Install Fiddler Configure Fiddler to capture HTTPS Configure Fiddler to automatically unzip the response (Rules -> Remove All Encodings) Configure Fiddler to open response using Notepad++ (Fiddler Options -> Tools) Configure Fiddler to use WinMerge (Fiddler Options -> Tools) Install the latest Flash player Install Adobe Acrobat Reader Configure it to display file extension Install MSXML 4 and configure IE to display all web sites using compatibility view setting if necessary Configure IE to allow popup (or disable the popup blocker for all the sites) Install NetTime from http://www.timesynctool.com/ Configure compatibility view and trusted site if necessary Disable popup blocker
When you are done with installing these extra software, and configuring it the way that you like, shutdown the VM using the Start -> Shutdown from inside the VM. Choose the Commit changes to the virtual hard disk option.
How can we test IE without having to pay for license key?
These images are timed-bomb. That is, they are hard-wired to expires (become un-usable) after the expiration date. When we use these images, we may need to install additional tools such as Microsoft Script Debugger (if you need to support IE6), Fiddler. When these images expires, we have to download the images again, set them up, install the tools. This is a pain. To prevent this from happening, we must activate these images (purchase a license), or see below:
If you are only using these images for the purpose of testing different version of Internet Explorer, or you are only using these images whenever you need a fresh VM to quickly test something (in other words, you are not using these images as your primary Windows machine), this procedure is a way to bypass the expiration date that is hard-coded in these images. This procedure may not always work (but I've seen it worked previously). I am not sure if this procedure is in accordance with the term of service for these image, so use it at your own risk. The procedure:
- Install everything that you need and customize everything to the way you like (popup blocker, etc).
- Shutdown the VM and choose the Commit changes to the virtual hard disk option
- Open up the .vmc file, which is just an XML file, find the time_bytes, and make a backup copy of that line:
<time_bytes type="bytes">33001300000004140814</time_bytes> <!-- <time_bytes type="bytes">33001300000004140814</time_bytes> -->
I've seen another trick on the Internet for disabling time-synchronization between the VM and the host machine. That trick used to work fine for me. However, it does not seem to work anymore. Everytime, you run the VM, it will update the above value. The trick is that every time you need to use this VM, you have to edit this file before running the VM (just restore the value from the backup). This is a bit annoying, but it works well.
What are the side benefits?
Using Microsoft VPC, VirtualBox, and particularly these images provided by Microsoft is extremely handy if you need a quick machine to do some R&D work. Sometimes, your R&D work may totally mess up your machine. If you were using a virtual machine image, you can just discard the VM, delete the image files, download another one. It may takes a couple of hours to download VM and re-install the software(s) that you need for your R&D work, but that is better than waiting a couple of days for your IT department to provide you with a new machine. Better yet, before you run the VM, make a backup copy of the .vhd file, and if you mess up the VM, just restore the .vhd file.
With these images, you can run VMs on your own laptop, so you can take these VMs with you wherever you go. You can also backup these images if necessary (just backup the .vhd file). This has been the swiss army knife for me. It is a real time-saver for me. I no longer have to wait for IT to provide me with a machine everytime that I need a quick machine for a little R&D. Just copy the .vhd file to somewhere safe (backup). Fire up the VM, do your R&D, and if it mess up your VM, just restore the .vhd file.
How can we release the pointer?
If your pointer / cursor / mouse is trapped inside the VM, press the right ALT key and move the mouse away from the VM.
How can I copy files between the host computer and the VM?
- While the VM is running, go to the VPC Console, and click on the Settings button.
- Click on Shared Folders