Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Windows Server

How to Install and Configure Hyper-V on Windows Server 2022 and 2025

How to install Hyper-V on Windows Server guide by 99RDP

Hyper-V is Microsoft's built-in hypervisor. Installing the role turns Windows Server into a host that runs Windows and Linux virtual machines, with virtual switches, checkpoints, live migration and replication. This guide shows how to check the requirements, install Hyper-V with Server Manager or PowerShell, set up networking and storage, create your first VM, and run Hyper-V inside a VPS with nested virtualization. The steps are the same on Windows Server 2019, 2022 and 2025.

Quick answer

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

After the restart, open Hyper-V Manager, create an external virtual switch, and create a new VM with New → Virtual Machine.

Prerequisites

  • 64-bit CPU with hardware virtualization (Intel VT-x or AMD-V) and Second Level Address Translation, enabled in the BIOS/UEFI.
  • Enough RAM: the host needs about 4 GB for itself plus memory for every VM you run at the same time.
  • Fast storage: SSD or NVMe for VM disks; put VMs on a separate data volume rather than C:.
  • Windows Server Standard or Datacenter. Standard includes rights to run two Windows Server VMs per licence; Datacenter allows unlimited Windows Server VMs.

Check support with systeminfo: under "Hyper-V Requirements" every line should say Yes, or "A hypervisor has been detected" if Hyper-V is already running.

Steps to install Hyper-V on Windows Server 2022: add the role, create a virtual switch, restart, create a VM
Installing Hyper-V

Method 1: Install Hyper-V with Server Manager

  1. Open Server Manager → Manage → Add Roles and Features.
  2. Choose Role-based or feature-based installation and select your server.
  3. Tick Hyper-V and accept the management tools.
  4. On the Virtual Switches page, select the network adapter to use for an external switch (or skip and create it later).
  5. Leave live migration off for a single server; set the default VM file locations to your data drive, for example D:\Hyper-V.
  6. Tick Restart the destination server automatically and click Install.

Method 2: Install Hyper-V with PowerShell

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

# after reboot: set default paths
Set-VMHost -VirtualHardDiskPath "D:\Hyper-V\Disks" -VirtualMachinePath "D:\Hyper-V\VMs"

On Server Core, use the same command; manage the host remotely from Windows Admin Center or Hyper-V Manager on another machine.

Comparison of Hyper-V virtual switch types: external, internal and private
Virtual switch types

Step 3: Create a virtual switch

VMs need a virtual switch to reach the network:

  • External: connects VMs to the physical network, so they get IPs from your LAN or provider.
  • Internal: VMs and host can talk, but not the outside network (combine with NAT for internet access).
  • Private: VMs talk only to each other.
New-VMSwitch -Name "External" -NetAdapterName "Ethernet" -AllowManagementOS $true

# NAT network when you have only one public IP (common on a VPS or dedicated server)
New-VMSwitch -Name "NATSwitch" -SwitchType Internal
New-NetIPAddress -IPAddress 192.168.100.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATSwitch)"
New-NetNat -Name "VMNAT" -InternalIPInterfaceAddressPrefix 192.168.100.0/24

With NAT, give each VM a static IP in 192.168.100.0/24 with gateway 192.168.100.1.

Comparison of Hyper-V Generation 1 and Generation 2 virtual machines
Generation 1 or 2

Step 4: Create your first virtual machine

  1. In Hyper-V Manager, click New → Virtual Machine.
  2. Choose Generation 2 for modern Windows and Linux (UEFI, Secure Boot).
  3. Assign memory; enable Dynamic Memory for lightly loaded VMs.
  4. Connect to your virtual switch.
  5. Create a new VHDX disk (dynamically expanding is fine for most uses).
  6. Attach an ISO under Install an operating system from a bootable image file.
  7. Start the VM and connect to install the OS. For Linux guests, set Secure Boot's template to Microsoft UEFI Certificate Authority or turn Secure Boot off.
New-VM -Name "Ubuntu01" -Generation 2 -MemoryStartupBytes 4GB `
  -NewVHDPath "D:\Hyper-V\Disks\Ubuntu01.vhdx" -NewVHDSizeBytes 60GB -SwitchName "NATSwitch"
Add-VMDvdDrive -VMName "Ubuntu01" -Path "D:\ISO\ubuntu-24.04-live-server-amd64.iso"
Set-VMFirmware -VMName "Ubuntu01" -SecureBootTemplate MicrosoftUEFICertificateAuthority
Start-VM -Name "Ubuntu01"

Post-installation tips

  • Checkpoints: take one before risky changes; don't keep them for weeks, as they grow and slow the disk.
  • Backups: use Windows Server Backup or a Hyper-V-aware backup tool rather than relying on checkpoints.
  • Integration services: keep guests updated so time sync, shutdown and heartbeat work.
  • Automatic start: set each VM's Automatic Start Action so services come back after a host reboot.

Hyper-V on a VPS: nested virtualization

A VPS is itself a virtual machine. To run Hyper-V inside it, the provider must enable nested virtualization on the VPS; without it, Hyper-V installs but VMs won't start ("Hypervisor is not running"). Ask your provider before ordering, or use a dedicated server, where Hyper-V runs directly on the hardware with full performance.

Frequently asked questions

How do I install Hyper-V on Windows Server 2022?

Run Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart, or add the Hyper-V role in Server Manager.

Can I run Hyper-V on a VPS?

Only if the provider enables nested virtualization. A dedicated server is the better choice for running many VMs.

Is there still a free Hyper-V Server?

The free standalone Hyper-V Server ended with the 2019 version. Today you install the Hyper-V role on licensed Windows Server.

How many VMs can Windows Server Standard run?

Standard licensing covers two Windows Server VMs per fully licensed host; Datacenter covers unlimited Windows Server VMs. Linux VMs don't use Windows licences.

Shailabh Suman, CTO at 99RDP
Written byShailabh SumanCTO, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Windows Server guides

All Windows Server guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services