You are on page 1of 8

How to enable Microsoft Hyper-V on

Windows Servers and Workstations


Microsoft Hyper-V can be enabled on desktops running Windows 8 or 10, or on servers running Windows
Server 2008 or 2012.

Prerequisites
 A user account with administrator permissions for the computer
 Enough available memory to run all the virtual machines you plan to run at the same time
 BIOS-level hardware virtualization support

Adding the Hyper-V role to your Windows installation


1. Right-click on the Start menu.
2. Click Search.
3. In the search field, enter Turn windows features on or off. Depending on the system, the
steps will vary.
1. For Windows 8 or 10 systems:
1. From the list of features, select Hyper-V.
2. Click OK.
3. Reboot the system.
2. For Windows Server 2008 or 2012 systems:
1. From the Add Roles and Features Wizard , click Next.
2. Select Role-based or feature-based installation . Click Next.
3. Select Select a server from the server pool . Click Next.
4. Select Hyper-V.
5. Click Add Features.
6. Click Next.
7. Click Next.
8. Click Next.

Creating a Virtual Network Switch


1. Open up Hyper-V Manager.
2. Right-click on the name of the Hyper-V host and select Virtual Switch Manager.
3. Under Virtual Switches, select New virtual network switch.
4. Under What type of virtual switch do you want to create?, select External.
5. Click Create Virtual Switch.
6. Under Virtual Switch Properties, give the new switch a name, such as External VM Switch.
7. Under Connection Type, ensure External Network has been selected.
8. Select the physical network card to be paired with the new virtual switch. This is the network card
physically connected to the network.
9. Click Apply to create the virtual switch. You’ll most likely see the following message. Click Yes to
continue.
10. Click OK to close the Virtual Switch Manager window.
Creating a virtual machine with Hyper-V Manager
1. In Hyper-V Manager, click Action > New > Virtual Machine to bring up the New Virtual
Machine wizard.
2. Review the Before You Begin content, then click Next.
3. Give the virtual machine a name. (This is the name Hyper-V uses for the virtual machine, not the
computer name given to the guest operating system deployed inside the virtual machine.)
4. Choose a location where the virtual machine files will be stored, such as c:\virtualmachine. You
can also accept the default location. Click Next.
5. Select Generation 1 for the machine and click Next.
6. Select 2048 MB for the Startup Memory value and leave Use Dynamic Memory selected.
Click Next. (Memory is shared between a Hyper-V host and the virtual machine running on the
host. The number of virtual machines that can run on a single host is partly dependent on available
memory. A virtual machine can also be configured to use dynamic memory. When enabled, dynamic
memory reclaims unused memory from the running virtual machine. This allows more virtual
machines to run on the host. For more information on dynamic memory, see the Hyper-V Dynamic
Memory Overview.)
7. On the Configure Networking wizard, select a virtual switch for the virtual machine and click Next.
For more information, see Creating a Virtual Switch.
8. Give the virtual hard drive a name, select a location or keep the default, and specify a size.
Click Next. (A virtual hard drive provides storage for a virtual machine similar to a physical hard
drive. A virtual hard drive is required so you can install an operating system on the virtual machine.)
9. On the Installation Options wizard, select Install an operating system from a bootable
image file, then select an operating system .iso file. Click Next.
10. When creating a virtual machine, you can configure some operating system installation options.
The three options available are:
 Install an operating system later – makes no additional modification to the virtual machine.
 Install an operating system from a bootable image file – similar to inserting a CD into the
physical CD-ROM drive of a physical computer. To configure this option, select an .iso image.
This image will be mounted to the virtual CD-ROM drive of the virtual machine. The boot
order of the virtual machine is changed to boot first from the CD-ROM drive.
 Install an operating system from a network-based installation server – not available unless
you’ve connected the virtual machine to a network switch. In this configuration, the virtual
machine attempts to boot from the network.
11. Review the virtual machine details and click Finish to complete the virtual machine creation.

To install Hyper-V on Windows Server 2008 R2 you can use one of the following
approaches. Note that all methods require a reboot after completion.

Important note: This article does NOT deal with the tasks required to pre-configure the
Hyper-V host itself. For that, please read my Prepare Your Windows Server 2008 R2 for
Hyper-V Role article.

Method #1 – Through the GUI


Probably the easiest for this specific role. I would use this method.

1. Open Server Manager, wait for it to load.


2. Click on “Roles”, wait for it to load.

3. On the “Before you begin” page, click “Next”.

4. In the “Select Server Roles” page, click to select the Hyper-V role. Click “Next”.
5. Click “Next”.

6. Select all the Network Interface Cards (NICs) that you wish to assign for the Virtual
Machines. Make sure you leave one NIC un-selected for host management. If you only
have one NIC, select it, but make a note that it is best to have at least 2 NICS – one for
the host and one for the VMs. These settings can be changed later.
7. In the “Confirm Installation Selections” page click “Install”.

8. One finished, you will need to reboot the server. Click on the “Close” button, and then
click “Yes” when you are prompted to reboot the server.
9. When the server reboots, log back into the server and the Server Manager should
automatically load and resume the installation process.

After about a minute, you should see a message telling you that Hyper-V has installed
successfully. Click “Close” to complete the wizard.
Note: Make sure you do not forget to enable the CPU Virtualization Mode and the Execute
Disable bit. Again, read my Prepare Your Windows Server 2008 R2 for Hyper-V
Role article. If you fail to do so, you will receive an error when attempting to start a VM.

Method #2 – Using the Command Prompt


Using the servermanagercmd.exe command is easy, and only requires 3 words… A
reboot is required at the end of the installation (which can also be added to the command,
making it 4 words…). However, Hyper-V network connections will need to be changed
after the installation.

1. Open a Command Prompt window with elevated permissions.

2. Type:

servermanagercmd -i Hype-V

If you want to automatically reboot the server when the installation is finished, type:

servermanagercmd -i Hyper-V -restart

Easy and simple. This is probably why Microsoft decided to deprecate the usage of
servermanagercmd.exe… :-(

You might also like