Virtual Machines (VMs) are great for a wide variety of tasks including running different operating systems or software configurations on a single machine. Windows 8 is the first Windows client operating system to include hardware virtualization support without the need for separate downloads or installs. This feature in Windows 8 is called Client Hyper-V. Client Hyper-V is the same technology as used in Windows Server 2012 Hyper-V, so you can move VMs from server to client, and won’t need to re-learn how to use Hyper-V features and tools.
In this article I’ll give a high-level overview of Client Hyper-V in Windows 8 and also guide you through the process of configuring Hyper-V and creating/running VMs.What You’ll Need to Run Hyper-V on Windows 8
In order to run Client Hyper-V on Windows 8 you’ll need the following:
- Windows 8 Pro or Enterprise 64 bit Operating System
- 64 bit processor with Second Level Address Translation (SLAT)
- BIOS-level Hardware Virtualization support
- At least 4GB system ram
If you are running 64-bit Windows 8 and meet the hardware requirements listed above you’re equipped to give Client Hyper-V a try!Setting Up Hyper-V
The first thing to do when getting ready to run Client Hyper-V is to make sure that hardware virtualization support is turned on in the BIOS settings. For my demonstration in this article I configured my HP Z820 desktop system to run Client Hyper-V. Below is a picture of the BIOS settings I configured on my HP Z820:
Once you have confirmed that hardware virtualization support is available and enabled, it’s time to enable Hyper-V in the “Turn Windows features on or off” dialog which you can launch by typing “turn windows features” at the Start Screen and then selecting “Settings” in the right-hand pane. Hyper-V Enabled in Windows Features
If Hyper-V wasn’t enabled previously, you’ll need to reboot after applying this change. After enabling Hyper-V it’s a good idea to configure networking for the Hyper-V environment. In order to support external network connections, you’ll need to make sure that a virtual switch has been created and is functional. To get started with this, open the Virtual Switch Manager which you’ll find on the Actions panel in the Hyper-V Manager (Type Hyper-V at the Start Screen to find the Hyper-V Manager).
After clicking on “Virtual Switch Manager” in the Actions pane ensure that “External” is highlighted, and then click on the “Create Virtual Switch” button.
If you have more than one NIC in your system, ensure that you have selected the NIC to be used for VM external network connections. Here’s the settings that I used on my HP Z820:
While there are many other options and features that you can configure, this is a good starting point and is all I needed to do to start creating and using VMs on Window 8 Pro.Creating VMs
Since Client Hyper-V is fully compatible with Hyper-V on Windows Server you can use VMs and Vitual Hard Drives (VHDs) created on Windows Server Hyper-V machines. Creating a new VM it’s easy. In this section I’ll outline the process to create a VM from scratch using PXE boot from the network. You can also very easily perform OS installs from USB drives or optical media like DVDs.
To create a VM you just click on “New Virtual Machine…” under “Actions” on the right panel in the Hyper-V Manager. When you do this, the “New Virtual Machine Wizard” will launch. The first task is to choose a VM name and optionally specify a path for the VM file:
Next, you’ll decide how much memory to allocate. I chose to use the default of 512 MB to see how my VM would perform with default memory settings. I know that I can always change this later.
After that you’ll need to select a virtual switch if networking is needed. In this case I chose the virtual switch that I created in the earlier steps outlined in this post.
The next step is to setup the VHD for the VM being created. Here you have the option to create a new VHD, use an existing VHD, or to postpone VHD configuration for later:
I chose to have a VHD created using the default settings. Note that you want to think about where the VHD file is stored during this process. I like to keep VM files and VHD files in the same directory for most configurations.
After clicking “Finish” I had one important step that’s required to enable PXE boot from VMs. in This last step was to create a Legacy Network Adapter in VM settings. To do this, you launch the settings dialog for the VM that needs network boot support, and then click “Add Hardware” which is the top item in the left pane.
All you need to do is click the “Add” button and then ensure that the proper virtual switch is used. That’s it! It only takes a couple minutes to perform all of these steps once you know what to do. This VM was now ready for PXE boot and the installation of the OS.
After clicking the green “Start” button for your VM in the right pane of the Hyper-V Manager, you’ll then see the familiar PXE boot menu where you can press F-12 for a network boot:
This works just like network booting from a physical machine. I used network boot to kick off a clean Windows 7 install as you can see here:
Having VMs for different operating systems is great when you need to test software on different operating systems, run machine images that are isolated from the network, test upgrade scenarios, and many more activities. Just remember to save snapshots for key configurations so that you can revert machine state when needed.Connecting to VMs on Windows 8
Once you have your VMs setup there are two great options for interacting with and connecting to your VMs: the Hyper-V Manager, or Remote Desktop Connection using Remote Desktop Protocol (RDP).
Using the Hyper-V manager you’ll be able to control your VM state in the Virtual Machine Connection Window but you’ll have a more limited experience (max screen resolution is 1600x1200, less seamless keyboard/mouse interactions, etc).
Here’s my clean Windows 7 VM running via the Hyper-V Virtual Machine Connection window: (click/tap to enlarge)
For comparison, I connected to this VM via Remote Desktop Connection on a display running WQHD screen resolution (2560x1440) which you can see here: (click/tap to enlarge)
When using Remote Desktop with Hyper-V the keyboard and mouse work seamlessly just like they do in any other Remote Desktop session. The only downside is that you don’t have the VM state management controls in this view. If you’re running RDP on the same Windows 8 machine as your Hyper-V Manager, you can always switch over between the Hyper-V Manger and the Remote Desktop session and have the best of both worlds.
For fun, I found an old Windows 3.51 VHD file that was last modified in 2003 and created a VM in the Hyper-V manager to run it. Remember the “stabbing fingers” animation at the log on screen? Good times…
There are many different ways to create VMs, and in this post I’ve illustrated how easy it is to get started with Hyper-V on Windows 8. There are a lot of powerful tools for managing Hyper-V on Windows 8 including the same PowerShell management capabilities that exist on Windows Server! If you want to know more, please refer to the resources below.Resources
You can also stay up to date by following me on twitter here: @GavinGear