Introduction to Hyper-V on Windows Server 2022

Hyper-V is Microsoft’s native Type-1 hypervisor, built directly into Windows Server 2022 as a server role. Unlike Type-2 hypervisors that run on top of an existing operating system, Hyper-V installs a thin hypervisor layer beneath the host OS, giving virtual machines near-native performance access to hardware resources. Windows Server 2022 ships with Hyper-V 10.0, which adds support for nested virtualization improvements, enhanced shielded VMs, and better integration with Azure Arc. This guide covers everything you need to install, configure, and verify Hyper-V on a Windows Server 2022 system, including hardware requirements, virtual switch configuration, and Server Core deployment.

Hardware Requirements for Hyper-V

Before installing Hyper-V, your physical host must meet several hardware prerequisites. The processor must support hardware-assisted virtualisation — Intel VT-x or AMD-V — and this feature must be enabled in the system BIOS or UEFI firmware. Windows Server 2022 Hyper-V also requires Second Level Address Translation (SLAT), known as Intel Extended Page Tables (EPT) or AMD Rapid Virtualisation Indexing (RVI). SLAT dramatically reduces hypervisor overhead by allowing the processor to handle nested page table walks in hardware rather than software.

Data Execution Prevention (DEP) must also be enabled in the BIOS, which corresponds to Intel XD (Execute Disable) or AMD NX (No Execute) bits. You can verify CPU virtualisation support from the command line before attempting installation:

Get-WmiObject -Class Win32_Processor | Select-Object Name, VirtualizationFirmwareEnabled, SecondLevelAddressTranslationExtensions

If the VirtualizationFirmwareEnabled property returns False, you must enter the system firmware and enable the virtualisation extensions before proceeding. The systeminfo command also reports Hyper-V requirements at the bottom of its output, listing each prerequisite and whether it is currently satisfied.

systeminfo | findstr /i "hyper-v"

Installing Hyper-V Using Server Manager

The most straightforward way to install Hyper-V on a server with a Desktop Experience is through Server Manager. Open Server Manager, click Manage, then Add Roles and Features. Proceed through the wizard, select Role-based or feature-based installation, choose your local server, and check the Hyper-V role. The wizard will prompt you to create a virtual switch during installation — you can either configure one at this stage or skip it and configure virtual switches manually later. After the wizard completes, a restart is required to install the hypervisor layer beneath the operating system.

Installing Hyper-V Using PowerShell

PowerShell provides a faster and scriptable installation path. The Install-WindowsFeature cmdlet installs the Hyper-V role along with its management tools in a single command:

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

The -IncludeManagementTools parameter adds Hyper-V Manager (the GUI) and the Hyper-V PowerShell module. The -Restart parameter causes the server to reboot automatically when the installation finishes. If you want to schedule the restart yourself, omit the -Restart flag and reboot manually when ready:

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools
Restart-Computer -Force

To install Hyper-V on a remote server, use an active PowerShell remoting session or specify the -ComputerName parameter:

Install-WindowsFeature -Name Hyper-V -ComputerName SERVER02 -IncludeManagementTools -Restart

Installing Hyper-V on Server Core

Windows Server 2022 Server Core has no graphical interface, so all Hyper-V installation and management must be performed through PowerShell or through remote management tools. On a Server Core system, the installation command is identical — the Install-WindowsFeature cmdlet works the same way:

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

After installation on Server Core, you manage Hyper-V using the PowerShell Hyper-V module locally, or remotely using Hyper-V Manager on a Windows 10/11 workstation or Windows Server with Desktop Experience. To connect Hyper-V Manager remotely to a Server Core host, open Hyper-V Manager, click Connect to Server, and enter the Server Core hostname. Ensure that Windows Remote Management (WinRM) is enabled on the Server Core host:

Enable-PSRemoting -Force
Set-Item WSMan:localhostClientTrustedHosts -Value "AdminWorkstation" -Force

Verifying Hyper-V Installation

After the server restarts, verify that the Hyper-V role installed successfully and that the hypervisor is running. The Get-VMHost cmdlet returns the configuration of the local Hyper-V host, confirming the role is active:

Get-VMHost

This command returns properties including VirtualMachinePath, VirtualHardDiskPath, EnableEnhancedSessionMode, and NumaSpanningEnabled. You can also check the Windows feature installation state:

Get-WindowsFeature -Name Hyper-V

A Installed state in the output confirms the role is active. To verify the hypervisor is actually running at a lower level, check the Hyper-V service states:

Get-Service vmms, vmcompute | Select-Object Name, Status, StartType

The vmms (Virtual Machine Management Service) and vmcompute (Host Compute Service) should both report a status of Running. If either service is stopped, the Hyper-V role may not have installed correctly.

Understanding Virtual Switch Types

Hyper-V provides three types of virtual switches, each serving a different networking purpose. Selecting the correct switch type is fundamental to how your virtual machines communicate with each other and with the outside world.

An External virtual switch binds to a physical network adapter on the host and provides virtual machines with direct access to the physical network. VMs connected to an external switch can communicate with other machines on the same subnet, reach the internet, and access domain controllers and file servers just like physical machines. The Hyper-V host itself also shares this virtual switch for its own network connectivity, though it is best practice to dedicate separate physical adapters for management and VM traffic in production environments.

An Internal virtual switch creates a private network that includes the Hyper-V host itself. VMs connected to an internal switch can communicate with each other and with the host, but they cannot directly reach the external physical network without NAT or routing configured on the host. Internal switches are commonly used for test environments, where the host provides DNS, DHCP, or internet access via Internet Connection Sharing.

A Private virtual switch provides a fully isolated network that includes only virtual machines — the host itself has no network interface on a private switch. VMs can only communicate with other VMs on the same private switch. Private switches are ideal for security-sensitive workloads, malware analysis, or multi-tier application testing where you need complete network isolation.

Creating Virtual Switches with PowerShell

The New-VMSwitch cmdlet creates virtual switches from the command line. To create an external switch bound to a specific physical adapter, first identify the adapter name:

Get-NetAdapter | Select-Object Name, InterfaceDescription, Status

Then create the external switch using the adapter name:

New-VMSwitch -Name "ExternalSwitch" -NetAdapterName "Ethernet" -AllowManagementOS $true

The -AllowManagementOS $true parameter creates a virtual network adapter on the host connected to this switch, maintaining host network connectivity. Setting this to $false dedicates the physical adapter exclusively to VM traffic and removes the host from that network segment.

To create an internal switch:

New-VMSwitch -Name "InternalSwitch" -SwitchType Internal

To create a private switch:

New-VMSwitch -Name "PrivateSwitch" -SwitchType Private

To list all configured virtual switches on the host:

Get-VMSwitch | Select-Object Name, SwitchType, NetAdapterInterfaceDescription

Configuring Default VM Paths

By default, Hyper-V stores virtual machine configuration files and virtual hard disks in C:ProgramDataMicrosoftWindowsHyper-V and C:UsersPublicDocumentsHyper-VVirtual Hard Disks. In production, you should store VM files on a dedicated high-performance volume. Configure the default paths using Set-VMHost:

Set-VMHost -VirtualMachinePath "D:HyperVVMs" -VirtualHardDiskPath "D:HyperVVHDs"

Verify the changes were applied:

Get-VMHost | Select-Object VirtualMachinePath, VirtualHardDiskPath

Hyper-V Integration Services

Hyper-V Integration Services are a set of drivers and services installed in the guest operating system that improve VM performance and management. They provide time synchronisation between the VM and host, heartbeat monitoring, live backup support via Volume Shadow Copy, data exchange between host and VM, and graceful shutdown capability. For Windows guests, integration services are delivered through Windows Update. For Linux guests, the Linux Integration Services (LIS) components are included in the Linux kernel version 4.4 and later, and in the LIS 4.x driver package for older kernels.

Check the integration services status for a running VM:

Get-VMIntegrationService -VMName "ServerVM01" | Select-Object Name, Enabled, PrimaryOperationalStatus

Enable a specific integration service:

Enable-VMIntegrationService -VMName "ServerVM01" -Name "Time Synchronization"

Hyper-V Isolation Containers

Windows Server 2022 supports Hyper-V isolation for Windows containers, which runs each container inside a lightweight utility VM rather than sharing the host kernel. This provides stronger security isolation than process-isolated containers, making Hyper-V containers appropriate for multi-tenant environments or when running untrusted workloads. To run a Docker container with Hyper-V isolation:

docker run --isolation=hyperv mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c ver

Hyper-V isolation requires the Hyper-V role to be installed on the host, even when running containers through Docker or containerd. The feature can also be enabled without the full Hyper-V management tools using:

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools:$false

Enabling Enhanced Session Mode

Enhanced Session Mode allows Hyper-V Manager to connect to VM consoles using RDP-based sessions, enabling clipboard sharing, audio redirection, printer redirection, and dynamic resolution resizing. It is supported on Windows guest operating systems running Remote Desktop Services. Enable it at the host level:

Set-VMHost -EnableEnhancedSessionMode $true

Then enable it on a per-VM basis as well:

Set-VM -VMName "ServerVM01" -EnhancedSessionTransportType HvSocket

Conclusion

Installing and configuring Hyper-V on Windows Server 2022 is a straightforward process once the hardware prerequisites are confirmed. The combination of PowerShell cmdlets and Hyper-V Manager gives administrators a flexible toolkit for deploying and managing virtualisation infrastructure at any scale. With virtual switches properly configured and integration services running inside guest VMs, you have a solid foundation for building out a production Hyper-V environment, ready for virtual machine deployment, live migration, and replication configuration covered in subsequent guides.