As mentioned in the previous part, I am using Hyper-V for my home virtual test lab because I have Windows 10 and the product is already included. If you also have Windows 10 you may notice that though this feature is included, it is nowhere to be found. This is because you have to specifically install it first; the binaries are on the computer but they are not installed by default. The steps are the same on Windows 8 and 8.1 so if you have one of these OSes everything should work as expected.
Besides installing Hyper-V, I will show you some basic settings to make and how to create a virtual machine.
Note: Hyper-V is not available on Windows 10 Home edition.
Optional features on a Windows client can be installed or uninstalled from the Turn Windows feature on or off menu found in Uninstall or change a program.
First go to Uninstall or change a program from “This PC” (the former My computer). Make sure you are on the Computer tab next to File in the upper left.
Now click on Turn Windows features on or off in the left side menu.
Now find Hyper-V and make sure you check all the subfolders like in the image.
After clicking OK you will need to restart the computer in order for the Hyper-V service to be installed. And that’s it for the installation part. You are on your way to having a cool virtual lab for testing.
To locate the Hyper-V console just open the Start menu or Start screen, go to Windows Administrative Tools and you should see the Hyper-V Manager. I recommend pinning it to Start so you find it easily.
Let’s open the console and take a look at a few of it’s settings. I won’t go over everything as some settings are more advanced and not crucial to setting up the lab for home use.
Exploring Hyper-V settings
After installing the feature there are some things that you should set up. The general settings are found by right clicking on the computer name from the Manager and selecting Hyper-V Settings.
The first 2 items in the list let you configure the default paths for virtual machines and hard disks. In my case I made 2 folders on the SSD named VM and HDD and configured them as the defaults. The setting does not mean that you cannot place a particular VM in another place; when creating the machine you are asked if it should be put in another location than the default one.
We now skip ahed to the Enhanced Session Mode Policy setting. This mode can be used for guest operating systems from Windows 8/Windows Server 2012 and up. It has some very nice features like local devices redirection, copy and paste from host to guest, drag and drop from host to guest, Remote Desktop like features like the nice full screen mode etc. Make sure that this is enabled.
If you activated this setting then go to the user part of the configuration menu and enable the Enhanced Session Mode from there also. This configures the usage of the enhanced features on supported VMs without activating them from the Virtual Machine Connection console.
These are the basic things to set up after installation. Let’s create a VM so we go through the steps and see what each means.
Create a virtual machine
This task is done from the Hyper-V Manager. Right click on the server name, select New > Virtual Machine and the VM creation wizard will start. On the first screen you have the possibility to directly click Finish and make a machine with the default values or click Next and go through every setting to customize it. We will obviously click on Next to see every setting available for creation.
The next screen lets you set a name for the VM. This name is just so you know which virtual machine is which in the Hyper-V Manager. The name of the guest operating system can be set to whatever value you want. I like to set the same name to the VM as the name I use in the guest OS.
Below the name you see the path where the machine will be stored. Since we set our default path there is no need to edit it. If you want to store the VM somwhere else you are free to change this setting here.
The generation is a very important setting because it dictates what operating system you can install and it cannot be changed after creation. Generation 1 VMs are for older operating systems and for Linux as only some Windows OSes are supported in Gen 2. This generation is the old style of VMs in Hyper-V which does not support Enhanced Session Mode, UEFI boot, default PXE boot and other features. It uses BIOS and has legacy hardware support like the floppy disk. Anything older than Windows Server 2008 R2/Windows 7 (including these 2) has to be installed in a Generation 1 virtual machine.
Generation 2 means that you get Enhanced Session Mode, UEFI, PXE boot from the standard network adapter. no more emulated legacy hardware and security features like Secure Boot. Windows 8/Windows Server 2012 and up should be installed as Gen 2 VMs.
RAM assignement is done on the next screen. The Startup Memory value can mean 2 things:
- The amount of memory that the machine will have allocated during it’s running state (if the below chackbox is not checked); this means that when starting the VM, that memory value will be shown as used in your host OS.
- The amount of memory allocated to the machine for startup. After that the value will decrease or increase as needed (if the below checkbox is checked); this is more useful as a VM usually needs more RAM at startup than when it is sitting idle for example. The amount of memory used by the machine at a point in time is the only amount shown as used in the host OS.
The network adapter can be plugged in a virtual switch in order to communicate with other machines on that device. The next screen lets you choose the switch you want. It is possible to leave the NIC unconnected which would be the equivalent to unplugging the network cable from a computer. We will see how to create switches in a later part of this series.
Now comes the part to configure the HDD. It’s default location is the one that we set earlier and it’s name is the same as the VM’s name. These of course can be changed if you want. The size can be set to a high value if you think you need a lot of space in the VM. The actual size occupied by the hard disk file (.vhdx) on your host’s storage will expand as data on the virtual disk is added. If you set the size to 100 GB but only have 10 GB on it then it will take only 10 GB from your free space.
There is the option to use an existing disk if available or no disk at all.
The next and last thing to set is the installation method for the operating system. You have the option to not install an OS at this time, use an ISO image, use the CD-ROM drive or use a floppy disk image (this is for Generation 1 VMs). To install Windows from an ISO image just select that option and browse for the image file on your hard disk.
Just click Next and Finish. The virtual machine was created and is visible in the Hyper-V Manager.
In the next part we will go through a VM’s configuration settings.