In this article, I am going to talk about a feature of Windows 8 Professional and Windows 8.1 Professional that I needed recently. Microsoft has virtualization software called Hyper-V which is used for creating virtual machines in the professional versions of Windows 8 and Windows 8.1 as well as in certain Microsoft server operating systems starting with Server 2008. The areas I will be addressing include identifying system requirements for using Hyper-V, identifying what virtual machines are, how to enable Hyper-V, how to start Hyper-V Manager, and how to configure Hyper-V Manager. The version of Hyper-V on Windows 8 Professional and Windows 8.1 Professional is called Client Hyper-V. This is the version I will be discussing. Client Hyper-V is the desktop operating system version of Hyper-V. Unless otherwise specified, Hyper-V is used to mean the client version used on desktop computers. Client Hyper-V does not contain some of the server functionality such as failover clustering and other server specific roles but it does contain the features necessary to set up virtual machines on desktop computers.
System Requirements to Use Hyper-V
To use Hyper-V, computers have to meet some hardware and software requirements. The following requirements are the minimum needed to run Hyper-V:
- 64-bit version of Windows 8 Professional or Windows 8.1 Professional
- Second Level Address Translation (SLAT) capable computer processor (CPU), Scroll down to the Processors that supported SLAT: Hyper-V: List of SLAT-Capable CPUs for Hosts
- Any virtualization settings in the BIOS (Basic Input/Output System) must be enabled
Three recommendations that were made to me when I was first learning about Hyper-V are:
- Do not install virtual machines (VM) on the same hard drive the host computer operating system is installed on
- Install each VM on a separate physical hard drive if possible so that the VMs aren’t fighting for hard drive access if multiple VMs are running at one time
- Install the VMs on solid state drives (SSD) when possible for faster response times
What are Virtual Machines?
Before starting into how to use Hyper-V and Hyper-V Manager, I would like to give a brief description of what virtual machines (VM) are and some ways that VMs can be used. VMs are virtual computers running on the physical (host) computer’s hardware. Some of the benefits from using VMs instead of having multiple physical computers include less hardware needed, reduced electrical costs, better efficiency from the physical hardware, faster boot times when using VMs, the ability to install a variety of operating systems and software, and the ability to quickly resolve issues as a new VM image can be loaded if the existing VM becomes corrupted. Less hardware needed, reduced electrical costs, and better hardware efficiency will result in lower costs for businesses which is why many businesses are implementing this functionality, especially for their servers. The better efficiency is a result of consolidating processor usage onto the processor(s) for one physical server as most physical servers have wasted processor capability because the programs used on the server do not need the full processing capability of the server’s processor(s). By using virtualization to combine these servers, the processor(s) will allow the server to be more efficient. The same benefits apply when using Client Hyper-V on desktop computers. To give an example, I have a virtual machine set up on my work computer that I use to load Windows XP. Having a VM available allows me to quickly load Windows XP to look at the features I need. There have been multiple times in the past that I have had to use my VM to look at where features are located as I use a different operating system on the host computer. I also use the VM to test software or user access at times. I also have used virtual machines for testing software and for getting screenshots of errors that occur outside of Windows. I had to use VMs to get the images I needed in the How to Access Advanced Boot Options in Windows XP, Vista, 7, and 8/8.1 article.
Please use the following steps to enable the Client Hyper-V software on the computer:
1. Click on the Start button in the bottom left corner of the screen.
3. From the Control Panel window, click on Programs and Features.
4. On the Programs and Features window, click on the option to Turn Windows features on or off.
5. On the Windows Features window, check to see if Hyper-V is already checked. If it is checked, your computer is ready to run Hyper-V. If the Hyper-V option is not checked, check the box for it.
6. Next, click on the + to the left of the checkbox for Hyper-V and make sure both options under Hyper-V are selected.
7. Click the OK button.
8. At this time, the files necessary for Hyper-V will be installed. The computer will need to be restarted after the files are installed. When the computer prompts to be restarted, select the Restart Now option.
9. After the restart, log back into Windows and you will be ready to start the Hyper-V Manager.
Hyper-V Manager is used to create the virtual hard disks and other devices needed for running the virtual machines (VM). It is also used to create virtual machines as well as start and stop the VMs. Hyper-V Manager is the graphical user interface (GUI) for the services needed to run the VMs. I will discuss Hyper-V Manager and its capabilities in more detail later in the article in the Configuring Hyper-V Manager section. First, we need to start Hyper-V Manager. Starting Hyper-V Manager Please use the following steps to start the Hyper-V Manager:
1. Click on the Start button in the bottom left corner of the screen.
2. Type Hyper-V Manager on the Start screen and click on Hyper-V Manager.
3. At this point, Hyper-V Manager will start.
Configuring Hyper-V Manager
Before configuring Hyper-V, I am going to address some of Hyper-V Manager’s features and where to find them in Hyper-V Manager as they will be used in setting up and configuring the virtual machines. In Hyper-V Manager, the left frame shows the physical computer the virtual machines are hosted on as well as the root section called Hyper-V Manager which allows for the customization of Hyper-V Manager’s layout along with allowing connections to virtualization servers located either on the same computer or on a different physical computer/server. The physical computer used in this article is RALBYDESKTOP. The middle frame is split into three sections: Virtual Machines, Checkpoints, and Details. The Virtual Machines section lists the different VMs located on the physical computer. Checkpoints are snapshots taken of the VMs at specific points in time and can be used to revert changes made to the VM after the checkpoint was saved. Details shows additional information about the item(s) selected in the Virtual Machine or Checkpoints sections. The right frame called Actions is where most of Hyper-V Manager’s functionality is located. The options available in the Actions menu varies depending on what option is selected in the left and middle frames. As I continue, I will identify the functions and what the options within the functions are used for.
The two actions available for the Hyper-V Manager are Connect to Server and View. Connect to Server allows users to connect to other virtualization servers. View allows for customization of the Hyper-V Manager layout.
The physical computer, RALBYDESKTOP, has a number of options available for use as shown in the image below. The first option, New, is used for creating new virtual machines, new virtual hard disks, and virtual floppy disk files. Before any virtual machines can be created, a virtual hard disk must be created and configured. The second option listed is Import Virtual Machine which allows users to load an already created virtual machines into Hyper-V Manager. All files related to the VM need to be available including the virtual hard disk and VM configuration files. Hyper-V Settings contain server-related information such as the locations of the virtual machine files, the virtual hard disk locations, non-uniform memory address (NUMA) spanning, storage migration information, the policy regarding enhanced session mode. Hyper-V Setting also contains information related to user controls such as the keyboard and mouse along with user-specified configuration information such as whether or not to use Enhanced Session Mode and whether check boxes should be reset. The next option is called Virtual Switch Manager. This option is used to define the type of switch that will be used for the virtual machine. Three different choices are available in this option. The first choice is external which allows the virtual machines to talk to other VMs, the physical computer hosting the VMs, and the Internet or network drives. The second choice, Internal, limits access to only those VMs sharing the same virtual switch. The last choice, Private, prevents access to other computers so that it acts like a stand-alone PC that has no access with any network or Internet resources.
Configuring Virtual Switches
1. Starting at the Hyper-V Manger main window, click on Virtual Switch Manager…
2. Please select the type of virtual switch needed and click on the Create Virtual Switch button.
3. On the Virtual Switch Properties window, name your virtual switch and make any other configuration changes needed. Click OK to create the virtual switch.
Configuring the Virtual SAN Manager
Virtual SAN Manager, the next option in the list of functions, is used to set up virtual access to storage area network devices. To create a virtual storage area network (SAN), please use the following steps:
1. From the Hyper-V Manager, click on Virtual SAN Manager…
2. Next, click on the New Fibre Channel SAN option in the left frame and then click on the Create button.
3. Configure the virtual SAN and click OK. Note: The physical host computer must have fibre channel ports. As shown in the image below, RALBYDESKTOP does not have any fibre channel ports.
4. To remove a virtual fibre channel SAN, click on the name of the virtual fibre channel SAN as shown in the image above and click on the Remove virtual SAN button. Then click OK.
The next two options both refer to functions that can be used with existing virtual hard disks. Edit Disk allows users to make changes to the configuration of the virtual hard disk whereas Inspect Disk allows users to select a specific virtual hard disk and then look at the properties of it. Stop Service and Remove Server, the next two options, are ones that I would recommend not using unless there is a specific need. Stop Service stops the local computer’s service that runs the virtual machine management. Users will not be able to use virtual machines until the service is restarted. Remove Server removes the current virtualization server from Hyper-V Manager. The last two options are Refresh and View. Refresh does the same thing it does with other Microsoft applications, it refreshes the information displayed. View allows users to make changes to what columns are displayed and allows users to customize what is displayed. Now that the main options used in Hyper-V Manager has been described, it’s time to set up a virtual machine. Users have two options in creating the virtual machines regarding when to create the virtual hard disk. During the New Virtual Machine Wizard, users can create the virtual hard disk but users can also create them separately from the New Virtual Machine Wizard. I am going to use the second method, the New Virtual Hard Disk Wizard, to demonstrate the process of creating a virtual hard disk. The options available for setting up the virtual hard disks are more limited in the New Virtual Machine Wizard. If customization of the configuration is needed beyond the choices of file name, storage location, and storage size are needed, use of the New Virtual Hard Disk Wizard is recommended for creating the virtual hard disk.
Creating Virtual Hard disks
1. From the Actions pane, in this case RALBYDESKTOP, click on New and select Hard Disk.
2. The New Virtual Hard Disk Wizard will load so that users can created the virtual hard disks. Click on Next to continue with the wizard.
3. The next screen prompts users to select the type of virtual hard disk format to use. Note: The .vhdx format cannot be used with host operating systems older than Windows 8. If using Windows 7 or earlier, please use the .vhd format. After selecting the format to use for the virtual hard disk, click Next.
4. The next screen asks users to select the type of drive to use. There are three options to choose from. Fixed size is used to set a specific VHD file size. Dynamically expanding is used to adjust the file size as needed. This option starts with a small initial file size and then expands to a large size over time as new data is added. The third option uses a differencing disk. Differencing in this option is similar to how differential backups are used with an initial save point and then changes are saved to a separate file. Differencing disks serve the same purpose in VMs by allowing users to have a parent image and then changes to that image are saved separately. This option allows for changes to the VM to be reverted fairly quickly. Select the disk type and click Next again.
5. The next screen allows users to select the file name for the virtual hard disk and the location to save it. If a file name or location other than the default is needed, please make the necessary changes and click Next.
6. On the Configure Disk window, there are three options for users to select from. The first option is to Create a new blank virtual hard disk which is the option I will be using. The second option is to Copy the contents of the specified physical disk. The third option is to Copy the contents of the specified virtual hard disk. After selecting the option needed and making any required changes, click Next.
7. The last screen for the New Virtual Hard Disk Wizard is the Summary screen. Verify the information on this screen is correct and then click Finish.
Creating Virtual Machines
After the virtual hard disk has been created, a new virtual machine can be set up.
1. Click on New in the Actions Pane.
2. Click on Virtual Machine.
3. The New Virtual Machine Wizard will load with some information about creating virtual machines. Users have the option to create a virtual machine using default settings by clicking Finish. Alternatively, users can create a custom configuration by clicking Next. For the purposes of looking at the different options, I am going to use a custom configuration.
4. The Specify Name and Location screen allows users to select the name for the virtual machine and the save location. A warning is on this screen regarding making sure that the save location has enough room if checkpoints will be used with the VM.
5. The next screen asks users to select the VM generation. Please read the info on this page carefully when creating virtual machines as the generation cannot be changed after the VM has been created. Also, Generation 2 has some added features but those features are only available with certain operating systems.
6. The Assign Memory screen allows users to set the amount of RAM for the virtual machine. There is a checkbox allowing users to use dynamic memory for this virtual machine. Select the RAM option and RAM amount for the VM and click Next.
7. The Configure Networking screen allows users to select which virtual switch to connect to if that option has been configured. The next image shows what users will see when the networking has not been configured. If a virtual switch has been set up, users will be able to select the virtual switch from the dropdown list on that screen. Select the networking option and click on Next.
8. On the Connect Virtual Hard Disk screen, three options are listed. These options are to Create a virtual hard disk, use an existing virtual hard disk, or to attach a virtual hard disk later. I will be using the virtual hard disk created earlier. Select the option you need and click Next. Note that the indented Installation Options sub-section is only available with the first option. Installing an operating system can be done after the VM has been created.
9. Note for this step, it is shown for reference purposes only as just the first option provides the opportunity to install the operating system during the creation of the VM. The image below shows what options are available for installing an operating system.
10. On the Summary screen, please verify the information and click Finish. At this time, Hyper-V Manager will create the new virtual machine.
Installing Operating Systems on Virtual Machines
After creating the virtual machine, I still need to install an operating system as I created the virtual hard disk before setting up the VM. To do so, I will need to access the Settings for the VM by using the following steps:
1. Starting from the main Hyper-V Manager window, click on the VM that needs configured. In the bottom corner of the right frame, options for working with the VM are listed.
2. Click on Settings and a new window will open.
A number of options are listed under two main headings of Hardware and Management. For the purposes of this article, I will be addressing just a couple of the options needed for installing the operating system. The specific options that I will be using are BIOS to set the boot order for the VM, IDE Controller 1’s DVD Drive for selecting the location to boot from, and network adapter (if needed). Network adapter identifies what network capability the VM will have. The names listed will be the virtual switch(es) created previously. Please use the steps below to check the BIOS, IDE Controller 1, and Network Adapter settings:
1. Click on BIOS as shown in the image above and verify that CD is the first option in the boot order.
2. Under IDE Controller 1, click on DVD Drive. Three options for the media to sue with the DVD drive will appear as shown below. The first option listed is None, which means that the VM will not look for any media. The second option, Image File:, is used if the media is stored on a hard drive on the computer. This is the option I used as I downloaded evaluation copies of the operating systems from Microsoft. The third option, Physical CD/DVD drive:, is used when the physical media such as the CD or DVD is available.
3. Next, click on Network Adapter and select the virtual switch that will be used and then click the OK button.
4. After verifying the three sections, click the OK button.
Installing the Operating System on the Virtual Machine
In the main Hyper-V Manager window, please click on Start in the right frame in the section below the name of the VM to start the virtual machine. After the VM has started, click on the Connect option towards the bottom of the right frame. At this point, the operating system will start to install like it would install on a normal PC. Please follow the prompts used during the install process to finish installing the operating system. Reminder: Have your Windows CD or DVD key available as it will be needed just like it is needed during a normal installation.
This was a lot of information to cover in one article but the information so far all pertains to setting up Hyper-V and Hyper-V Manager along with configuring the different options in Hyper-V Manager. I will be writing an upcoming article in which I will discuss some features of Hyper-V’s virtual machines that I did not address here. Those features are used mainly in editing or modifying settings for the virtual machines.