
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.
Method 1: Install Hyper-V with Server Manager
- Open Server Manager → Manage → Add Roles and Features.
- Choose Role-based or feature-based installation and select your server.
- Tick Hyper-V and accept the management tools.
- On the Virtual Switches page, select the network adapter to use for an external switch (or skip and create it later).
- Leave live migration off for a single server; set the default VM file locations to your data drive, for example
D:\Hyper-V. - 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.
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.
Step 4: Create your first virtual machine
- In Hyper-V Manager, click New → Virtual Machine.
- Choose Generation 2 for modern Windows and Linux (UEFI, Secure Boot).
- Assign memory; enable Dynamic Memory for lightly loaded VMs.
- Connect to your virtual switch.
- Create a new VHDX disk (dynamically expanding is fine for most uses).
- Attach an ISO under Install an operating system from a bootable image file.
- 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.


