We previously had a post on setting up IE6, IE7, IE8 and IE9 properly for website testing which covered how to set up virtual machines on Windows 7 using Windows Virtual PC so that you could accurately test on all versions of Internet Explorer.
However some of us are now running Windows 8 which no longer supports Windows Virtual PC but instead now uses Hyper-V. So here’s a quick guide to setting up Virtual machines with Hyper-V.
What you’ll need
There’s not a lot of requirements but it’s nice to be prepared so these are the things you’ll need in order to set up Hyper-V and the virtual machines.
- Windows 8 ( Clearly )
- Windows XP on DVD or .iso (For IE6, 7, and8 )
- Windows 7 on DVD or .iso ( For IE9 )
Installing and setting up Hyper-V
1, Installing Hyper-V
The first thing you will need to do is install Hyper-V. Microsoft have made this pretty easy for us as all we need to do is open up Windows Features and enable it. There are multiple routes to accessing this window but the easiest is simply doing a local search for Turn Windows features on or off.
This gives you a list of options to choose from which we only want to enable Hyper-V which is near the top of the list. Once you have selected it and pressed OK it will install and your computer will need to reboot.
At this point if you get an error message, It’s likely you don’t have Virtualisation technology enabled in your BIOS. So go into your BIOS and enable it and repeat this process.
2, Setting up Hyper-V
Now before we set up any virtual machines we want to add a Virtual Switch so that our Virtual Machines can connect to the internet. To do this we open up Hyper-V Manager down the right hand side under Actions you will have a list of options. We want to select Virtual Switch Manager…
From there we want to select External and hit Create Virtual Switch. Then we want to select the right option in the drop down. My choices are either the wireless adapter or the ethernet port so choose the one your going to use.
Once your happy with your settings press OK at which point you will get a pop up warning that you may disconnect from the internet while these settings are being applied. Press OK and continue.
3, Optional Set folder locations
If you want to set a custom file path for where Hyper-V saves its virtual hard drives and machines then you’ll want to do this now. To do this simply go to Action -> Hyper-V settings and under Server you can set the location of where Hard drives and machines get saved to.
Setting up our Virtual Machines
1, Creating a new virtual machine
Now we want to create out first virtual machine, To do this we simply select New -> Virtual Machine on the right hand side of the Hyper-V Manager at the top of actions where we selected to create a Virtual Switch.
We want to give our machine a name so that we know what version of IE it is using. To make it easy to distinguish mine go along the lines of XP with IE6.
Specify Generation – We want to keep it as Generation 1.
Assign Memory – This is really up to you and how much memory your machine has but if you dont want to restrict its usage then you can allow it to be dynamic.
Configure Networking – This is where we choose the switch that we created earlier. Simply choose it from the dropdown and proceed.
Connect Virtual Hard Disk – This time around you will want to create a new disk, I named mine the same as the machine name.
Installation Options – It is at this point you will want to choose where your operating system is installed from. If you do not have an operating system yet then don’t worry you can install one later but you will need to do it before the the third step.
Once your done click Finish and you will have your new machine!
Sadly that’s not the end of the set up we need to add network legacy support so that Windows XP will be able to connect to the network. To do this we simply right click our virtual machine and select settings. The first option if Add Hardware, This is what we are after. We simply select Legacy Network Adapter and select add from there we choose our switch that we made earlier in the drop down and press OK.
2, Starting our virtual Machine
Now we want to start our virtual machine to get it set up so we can create the other machines after. You will have to run through the normal procedures of installing an OS. If you chose to add an OS later in the previouse options then you will want to do this now. Simply click Media -> DVD Drive -> Insert Disk.. from there you can select a .iso file or a CD on your computer.
3, Creating our other Virtual Machines
Now that we have a virtual machine set up we still need two more running XP in order to run all three versions of IE that Windows XP allows. To do this we simply go to our virtual disks location which you either set or is the default which you can find by going into the settings of your virtual machine and selecting Hard Drive to see the location.
Once you open up that folder you should have one drive that you named earlier. Simply copy and paste it within the same folder and rename them so now there exact copies of eachother with unique names.
Now we want to create virtual machines for them. This is the same process as earlier however now we don’t create a new drive we select one of the copies we just created. This way we don’t need to install windows XP 3 times.
Once complete simply boot up each machine and install the apropriate version of IE for that machine.
In order to set up IE9 you will need to set up a Windows 7 virtual machine the same way we first set up our Windows XP machine.