Hyper-V Role Installation and Virtual Machine Configuration

Virtualisation is a technology that divides physical hardware resources logically and shares them between more than 1 workload. Its history goes back to the 1960s, to the work on logically dividing system resources between different applications on mainframe computers. Today it offers solutions across a wide range, from virtualisation at the operating system kernel level to application virtualisation at the top layer. The virtualisation technologies that are widely used in the industry are listed below.

🎯 Server virtualisation
🎯 Desktop virtualisation
🎯 Session virtualisation
🎯 Application virtualisation

The subject of this article is server virtualisation. In server virtualisation, the physical computer that owns all the hardware resources used by the virtual operating systems is called the host. The virtual computer created on the host is called a virtual machine (VM), and the operating system installed on this virtual machine is called the guest OS, that is, the guest operating system. The terms host and guest are used to separate the components that run on the physical server from the components that run inside the virtual machine.

The software that performs the virtualisation on the physical server is called the hypervisor or the Virtual Machine Monitor (VMM). The hypervisor presents the hardware in the physical server, such as the CPU, RAM, Network Interface Card (NIC) and disk, to the virtual machines as virtual hardware. Each virtual machine uses the virtual hardware allocated to it as if it were the hardware of a physical server.

Microsoft's hypervisor is Hyper-V. When the Hyper-V role is installed, the hypervisor is placed directly on top of the hardware, and the Windows Server operating system on which the role is installed continues to run as the parent partition that manages the virtual machines. You can use Hyper-V with 2 different products: the Hyper-V role on Windows Server, or Microsoft Hyper-V Server, which is a free, standalone product. The Hyper-V role runs on both the GUI-based installation and the Core installation of Windows Server.

In this article, I install the Hyper-V role on Windows Server 2012 R2 Standard edition, and then, in order, I configure the virtual switch, go through the steps to create a virtual machine and install an operating system on the virtual machine.

The screenshots in this article were taken on Windows Server 2012 R2. Hyper-V role installation and virtual machine creation follow the same wizard steps in the versions from Windows Server 2016 to 2025, although some options on the screens can differ by version. The licensing model, the processor requirements and the default values in the wizard depend on the version.

1- Prerequisites and Licensing

The Hyper-V role cannot be installed on every hardware platform. Before you start the role installation, verify that the physical server meets the conditions below. The processor features are enabled in the BIOS or UEFI. After these settings are changed, restarting the server may not be enough, and the server may need to be powered off completely and powered on again.

Check Expected State
Processor architecture 64-bit processor
Hardware-assisted virtualisation Intel VT-x or AMD-V enabled in the BIOS/UEFI
Hardware-enforced DEP Intel XD or AMD NX bit enabled
SLAT (Second Level Address Translation) Not mandatory for the Hyper-V role on Windows Server 2012 R2, mandatory on Windows Server 2016 and later
Operating system edition A Windows Server edition that includes the Hyper-V role
Permissions Membership of the local Administrators group on the server where the role will be installed

On the licensing side, the deciding factor is how many virtual Windows Server instances you will run on the host. In Windows Server 2012 R2 there is no feature difference between the Standard and Datacenter editions. What separates the 2 editions is the virtualisation rights.

Edition Hyper-V Role Virtualisation Rights
Windows Server 2012 R2 Datacenter Yes Unlimited virtual Windows Server instances
Windows Server 2012 R2 Standard Yes 2 virtual Windows Server instances per licence
Windows Server 2012 R2 Essentials Yes 1 virtual instance of Windows Server 2012 R2 Essentials can be run with the same licence. When this right is used, the physical installation is used only for the Hyper-V role and for management
Windows Server 2012 R2 Foundation No No virtualisation rights

Licensing in Windows Server 2012 R2 is processor-based. A single Standard or Datacenter licence covers up to 2 physical processors, and all physical processors in the server must be licensed. In the Standard edition, the licence you buy for the physical server lets you install 2 virtual instances of Windows Server 2012 R2 Standard at no extra cost. When both of these virtual instances are in use, the Windows Server installation on the physical server can be used only to host and manage the virtual machines. For more than 2 virtual operating systems, you need to assign additional Standard licences to the same server. For this reason, the Datacenter edition is preferred in environments with heavy virtualisation.

Windows Server 2016 and later use a core-based licensing model. In this model, all physical cores in the server are licensed, and the minimum is 8 core licences per processor and 16 core licences per server. The right to 2 virtual machines in the Standard edition and to unlimited virtual machines in the Datacenter edition continues in this model. In environments with active Software Assurance or subscription licences, Windows Server virtual machines can also be licensed individually, per virtual machine. This option does not provide a right to use the Windows Server installation on the physical server.

Extended Support for Windows Server 2012 R2 ended on 10 October 2023, and the Extended Security Updates (ESU) programme ended on 13 October 2026. New installations must be done on a supported Windows Server version.

2- Hyper-V Role Installation

Step 1 - Add Roles and Features

In Server Manager, I click Manage > Add Roles and Features and start the Hyper-V role installation.

Step 2 - Server Selection

In the Server Selection step, I select the server on which I will install the Hyper-V role, and then click Next to go to the next step.

Hyper-V installation and configuration

Step 3 - Server Roles

In the Server Roles step, I select the Hyper-V role and click Next to go to the next step.

Hyper-V installation and configuration

Step 4 - Features

In the Features step, if you are going to install Hyper-V in a failover cluster architecture, you also need to install the Failover Clustering feature. An installation that will run on a single host does not need this feature.

Hyper-V installation and configuration

Step 5 - Virtual Switches

The Virtual Switches screen automatically creates an external switch on a listed physical NIC when that NIC is selected. I will configure the virtual switch myself after the installation, so I click Next without making any selection and go to the next step.

Hyper-V installation and configuration

Step 6 - Virtual Machine Migration

The Virtual Machine Migration screen asks whether this server is allowed to send and receive virtual machines through live migration. This setting can also be configured after the installation under Hyper-V Settings. In environments where a failover cluster will be built, the live migration settings are managed on the cluster side, so live migration is not enabled on this screen. I click Next without making any changes and continue.

Step 7 - Default Stores

The Default Stores step shows the default locations where the virtual hard disk files and the virtual machine configuration files are stored. You can change the paths here if you want to. I click Next without making any changes and go to the next step.

Hyper-V installation and configuration

Step 8 - Confirmation and Installation

The Confirmation step shows a summary of the selections I made on the previous screens. I click Install to start the installation.

The server restarts so that the Hyper-V role takes effect. On a production server, do the installation in a maintenance window in which the services on the server can be interrupted.

Hyper-V installation and configuration

Hyper-V installation and configuration

Verification Point
If the Hyper-V role is listed in the Roles and Features tile when the server is selected on the All Servers page in Server Manager, the role installation is complete.

Step 9 - Hyper-V Manager Interface

After the installation is complete, I open Hyper-V Manager. The screen has 3 main panes.

Left pane: My physical server with the host name SRV0001, on which I installed the Hyper-V role, is listed here. I will create my virtual machines on this server.

Centre pane: The Virtual Machines area at the top will list the virtual machines I create. The Checkpoints area directly below it shows the checkpoints of the selected virtual machine. The checkpoint taken in Windows Server 2012 R2 is the one known today as the standard checkpoint. It saves the memory state of a running virtual machine together with its disk state, and returns the virtual machine to exactly that moment. The production checkpoint, which is available in Windows Server 2016 and later, takes a copy that provides data consistency inside the guest operating system, and it does not save the memory state. A checkpoint is used for test and rollback scenarios, and it does not replace a backup.

Right pane: The configuration options for my SRV0001 server are under Actions. The same menu also appears when I right-click SRV0001 in the left pane.

Hyper-V installation and configuration

3- Virtual Switch Configuration

For the virtual machines to reach the network, the host must have at least 1 virtual switch. A virtual switch is a software-based Layer 2 switch that connects the virtual NICs of the virtual machines to each other and, depending on the selected type, to the host or to the physical network.

Virtual Switch Types

βœ… External switch: Used so that the virtual servers can communicate with the external network. It is bound to a physical NIC.
βœ… Internal switch: Used so that the virtual servers can communicate with each other and with the physical host. It is not bound to a physical NIC.
βœ… Private switch: Used only so that the virtual servers on the same host can communicate with each other. It is not bound to a physical NIC, and the host cannot reach this switch either.

Step 10 - Creating an External Switch

To create a virtual switch, I click Virtual Switch Manager... under Actions in the right pane of Hyper-V Manager. I want my virtual servers to communicate with the external network as well, so I click Create Virtual Switch while External is selected.

Hyper-V installation and configuration

Step 11 - Virtual Switch Properties

After I create the virtual switch, I configure its settings under Virtual Switch Properties.

Name: I define a name for the virtual switch. I name it VM Network. This name becomes important later, because when a virtual machine is moved to another host or brought online on another host, its network connection is matched by the switch name. In a Hyper-V failover cluster architecture, the virtual switch name must be the same on all nodes. Otherwise, a virtual machine that moves to another node cannot connect to the network. In a Hyper-V Replica architecture, the network adapter of the replica virtual machine can be connected separately on the Replica server, so the same name is not mandatory, but it is recommended because it makes management easier.

Connection type: While External network is selected, I select the physical NIC that the virtual operating systems will use to reach the external network.

Allow management operating system to share this network adapter: When this checkbox is selected, the host operating system also continues to use the same physical NIC. For this purpose, a virtual NIC named vEthernet (VM Network) is created under Network Connections, and the IP configuration of the host is moved to this virtual NIC. My lab environment has a limited number of NICs, so I leave this checkbox selected. Both designs are used in enterprise environments. A separate physical NIC can be dedicated to management traffic. In a converged networking design, management traffic and virtual machine traffic use the same physical NICs, and the management traffic is carried over a separate management virtual NIC on the host.

VLAN ID: If the physical switch port carries the management VLAN of the host as tagged, you need to select the Enable virtual LAN identification for management operating system checkbox and enter the VLAN number. If the management traffic is carried over an access port or as untagged, this checkbox is left clear. This setting affects only the virtual NIC of the host. The VLAN setting of the virtual machines is configured in the network adapter settings of each virtual machine.

While the external switch is being created, the network connection on the selected physical NIC is interrupted for a short time. If you are connected to the host with a remote session through this NIC, your session may disconnect.

After I finish my configuration, I click Apply to apply my settings and complete the virtual switch creation process.

Hyper-V installation and configuration

Verification Point
If External network and the physical NIC I selected appear under Connection type when VM Network is selected in Virtual Switch Manager, the external switch has been created correctly.

4- Virtual Machine Creation

Step 12 - New Virtual Machine

The next task is to create a virtual machine on my SRV0001 server. In Hyper-V Manager, I right-click SRV0001 and select New > Virtual Machine....

Hyper-V installation and configuration

Step 13 - Specify Name and Location

In the Specify Name and Location section, I set the name Virtual_SRV001 for the virtual machine I am creating. I select the Store the virtual machine in a different location checkbox directly below it, and point to the Virtual Machines folder that I created under the root of C:. You can point to the path of your storage unit if you prefer.

If you click Finish at this point, a virtual machine is created immediately with the name and location you specified and with the default memory, virtual disk and vCPU values of the wizard, and the wizard closes. The virtual disk is created in VHDX format and as a dynamically expanding disk. You can change this virtual hardware configuration later in Settings. The method that is usually preferred, however, is to continue with Next and customise the virtual machine inside the wizard. I continue in this way as well.

Hyper-V installation and configuration

Step 14 - Specify Generation

In the Specify Generation section, you select the virtual hardware generation with which the virtual machine is created. Generation 1 provides BIOS-based firmware and emulated hardware such as an IDE controller, and it works with most of the guest operating systems that Hyper-V supports. Generation 2 brings features such as UEFI-based firmware, Secure Boot and booting from a SCSI disk. On Windows Server 2012 R2 Hyper-V, the Windows guests supported for Generation 2 are Windows Server 2012, Windows Server 2012 R2 and the 64-bit versions of Windows 8 and Windows 8.1. I continue with Generation 1 in this installation.

The generation cannot be changed after the virtual machine is created. Verify in this step that the guest operating system you will install is supported by the generation you select.

Step 15 - Assign Memory

In the Assign Memory section, you need to set a Startup Memory amount for the virtual machine. This value must be enough for the installation and the startup of the guest operating system.

Windows Server 2012 R2 setup fails on a virtual machine that has 1 vCPU and 512 MB of memory assigned. If you are going to install from an ISO, allocate more than 800 MB for Startup Memory, for example 1024 MB.

By default, the Use Dynamic Memory for this virtual machine option is not selected. If you continue in this way, the Startup Memory amount you specified is reserved for the virtual machine at all times, and the virtual machine has a fixed memory value.

If you select the Use Dynamic Memory for this virtual machine option, the virtual machine starts with the Startup Memory value you set and uses memory between the Minimum RAM and Maximum RAM limits according to its needs. The wizard assigns these limits itself, and the assigned upper limit may not be available as physical memory on the server. The limits can be changed after the virtual machine is created, in the Memory section under Settings.

If you do not have enough knowledge about Dynamic Memory configuration and behaviour, continue without using this option. I also click Next without selecting the option and go to the next step.

Hyper-V installation and configuration

Step 16 - Configure Networking

In the Configure Networking section, the list in the Connection field contains all the virtual switches that were created earlier on the Hyper-V host. In this step you can select a virtual switch, or you can leave the virtual machine as Not Connected and make the connection later.

In Step 11 - Virtual Switch Properties, I selected the Allow management operating system to share this network adapter checkbox. As a result, a virtual NIC named vEthernet (VM Network) was created on the host, as the Network Connections window also shows. This virtual NIC is the host's own connection. The virtual machines connect to the virtual switch selected from the list below.

Hyper-V installation and configuration

From the list in the Connection field, I select the virtual switch named VM Network that I created. The virtual NIC of my virtual machine will then be connected to this switch and will be able to reach the physical network.

Hyper-V installation and configuration

Step 17 - Connect Virtual Hard Disk

In the Connect Virtual Hard Disk section, I attach a virtual disk to the virtual machine I am creating. This screen has 3 options.

Option Result
Create a virtual hard disk A new, empty virtual disk is created with the name and in the location you specify, and it can grow up to the size (Size) you specify. The disk is created in VHDX format and as a dynamically expanding disk, that is, a disk that grows as data is written to it.
Use an existing virtual hard disk A disk that you created earlier is attached to the virtual machine. For example, a fixed size disk or a bootable VHDX that contains an operating system image.
Attach a virtual hard disk later The virtual machine is created without a disk, and the disk is added later in Settings.

I continue with the Create a virtual hard disk option and create a new virtual disk.

Hyper-V installation and configuration

Step 18 - Installation Options and Summary

In the Installation Options section, the Install an operating system from a boot CD/DVD-ROM option lets you point to an optical drive on the Hyper-V host or to an ISO installation file that the host can access. I will attach the ISO file after the virtual machine is created, so I click Next while Install an operating system later is selected and go to the next step.

Hyper-V installation and configuration

The summary screen shows the definitions that were made. If there is a problem, you can go back and change them. I do not see a problem, so I click Finish and complete the virtual machine creation.

Hyper-V installation and configuration

Verification Point
If the virtual machine named Virtual_SRV001 appears in the Off state in the Virtual Machines list in the centre pane of Hyper-V Manager, the virtual machine has been created successfully.

5- Operating System Installation

Step 19 - Attaching the ISO File

In Step 18 - Installation Options and Summary, I left the Install an operating system later option selected. For this reason, I attach the installation media now. In the right pane of Hyper-V Manager, I click Settings... under Virtual_SRV001.

In the Settings window that opens, I go to the DVD Drive section, use the Image file option under Media to point to the path of the ISO file of the operating system I will install, and click OK to close the window.

Hyper-V installation and configuration

Step 20 - Starting the Virtual Machine

In the Virtual Machines list in the centre pane of Hyper-V Manager, I right-click my virtual machine and select Start, which starts the virtual machine so that I can install from the ISO file.

Hyper-V installation and configuration

After I start my virtual machine, I double-click it and the Virtual Machine Connection window opens. I see the screen of the virtual machine in this window and continue the operating system installation steps from here.

Hyper-V installation and configuration

The installation of my Windows Server 2012 R2 Standard edition operating system has started.

Hyper-V installation and configuration

The installation of the Windows Server 2012 R2 Standard edition virtual operating system has completed successfully on Hyper-V Manager.

Hyper-V installation and configuration

Verification Point
If the virtual machine appears in the Running state in Hyper-V Manager and the operating system starts in the Virtual Machine Connection window, the installation is complete.

After the installation, you can change the vCPU, memory, disk and network settings of the virtual machine in Settings according to your needs. These configurations are outside the scope of this article, so I end the article here.

This article covered the prerequisites and the licensing of the Hyper-V role on Windows Server, and then walked through the role installation. I then created an external virtual switch so that the virtual machines can reach the external network, defined a new virtual machine, configured its memory, network and virtual disk settings, and completed the operating system installation from an ISO file.

I hope you find it useful...

No comments on this article yet. Be the first to comment!

750 characters available.
Security code
Comments are published once approved.
Your email is only used to let you know when your comment is approved. It is never published.