Kennisbank › Windows Mac › Hyper V Virtualization on Windows Server
windows mac gevorderd 26 September 2026

Hyper V Virtualization on Windows Server

Hyper-V Virtualization on Windows Server Hyper-V turns one physical Windows Server into a host for multiple isolated virtual machines, each with its own

```powershell systeminfo | findstr /C:"Hyper-V Requirements" ```

You want to see four lines, all saying `Yes` or `A hypervisor has been detected`. If `Virtualization Enabled In Firmware` says `No`, stop and fix that in the UEFI first.

Step 1 — Install the Hyper-V role

The role installs the hypervisor, the management tools and the Windows Hypervisor Platform. It reboots the host, so plan a window.

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

`-IncludeManagementTools` pulls in the Hyper-V Manager GUI and the PowerShell module. You can skip it on a Core installation and manage everything remotely, which is the leaner option — fewer components on the host means fewer things that need patching. The cost is that you now need a management workstation with RSAT or WinRM access to the host.

After the reboot, the hypervisor sits between the hardware and the host OS. That is why the host itself becomes a guest of sorts, and why some software that insists on direct hardware access — older VPN clients, certain backup agents — starts misbehaving after this step.

Step 2 — Configure a virtual switch

A virtual switch decides how VMs talk to the network. There are three types, and picking the wrong one is the most common reason a VM ends up unreachable.
  • External: binds to a physical NIC, gives VMs their own presence on the LAN. This is what you want for production.
  • Internal: host and VMs can talk to each other, nothing leaves the machine. Useful for isolated test labs.
  • Private: only VMs can talk to each other, the host is excluded. Rarely what you want.
Create an external switch bound to your physical adapter. Replace `Ethernet` with the actual interface name from `Get-NetAdapter`.

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

`-AllowManagementOS $true` keeps a virtual adapter on the host so you do not cut off your own RDP session. Set it to `$false` and the host loses network access the moment the switch goes live — which is exactly the kind of mistake you only make once.

Step 3 — Set default storage paths

By default Hyper-V stores VHDX files and VM configuration under `C:\ProgramData\Microsoft\Windows\Hyper-V` and `C:\Users\Public\Documents\Hyper-V`. On a system disk that is a bad idea: VM I/O competes with the host OS, and a full C: drive takes down everything at once.

Point the defaults at a dedicated volume.

```powershell Set-VMHost -VirtualHardDiskPath "D:\Hyper-V\Virtual Hard Disks" -VirtualMachinePath "D:\Hyper-V\Virtual Machines" ```

Create the folders first if they do not exist. Moving existing VMs later is possible but tedious, so decide now. If you have no second volume, at minimum keep an eye on free space — a fixed-size VHDX that runs out of room mid-write corrupts the guest filesystem.

Step 4 — Create a virtual machine

This creates a Generation 2 VM, which uses UEFI firmware, supports Secure Boot and boots faster. Generation 1 exists for legacy guests that need BIOS or 32-bit operating systems; for anything modern, use Gen 2.

```powershell New-VM -Name "web01" -MemoryStartupBytes 4GB -Generation 2 -NewVHDPath "D:\Hyper-V\Virtual Hard Disks\web01.vhdx" -NewVHDSizeBytes 60GB -SwitchName "ExternalSwitch" ```

The VM starts with 4 GB RAM and a 60 GB dynamically expanding VHDX. Dynamic expansion means the file grows as the guest writes data, up to the 60 GB cap. It saves space but fragments more and performs slightly worse under heavy write loads than a fixed disk. For a database server, preallocate.

Step 5 — Attach installation media and set boot order

The VM has no operating system yet. Attach an ISO and make sure the firmware boots from it.

```powershell Add-VMDvdDrive -VMName "web01" -Path "D:\ISO\SERVER_EVAL_x64FRE_en-us.iso" Set-VMFirmware -VMName "web01" -FirstBootDevice (Get-VMDvdDrive -VMName "web01") ```

On a Generation 2 VM, Secure Boot is on by default and expects a Microsoft template. If you install a Linux distribution that is not signed for the Microsoft UEFI CA, the VM will not boot and you will see nothing but a blank console. Disable Secure Boot for those guests:

```powershell Set-VMFirmware -VMName "web01" -EnableSecureBoot Off ```

That is a real trade-off, not a formality. Secure Boot blocks a class of boot-level malware; turning it off to run an unsigned guest means accepting that exposure inside that VM.

Step 6 — Start the VM and connect

```powershell Start-VM -Name "web01" vmconnect.exe localhost "web01" ```

`vmconnect` opens the console. The first boot goes into the OS installer, same as on physical hardware. If you see a `Boot Failed` message, the boot order or Secure Boot setting from step 5 is the usual culprit.

Step 7 — Enable Dynamic Memory (optional)

For VMs that idle most of the day, Dynamic Memory hands RAM back to the host when the guest does not need it. The guest needs the Hyper-V integration services installed and running, which is automatic on Windows guests and a package install on Linux.

```powershell Set-VM -Name "web01" -DynamicMemory -MemoryMinimumBytes 1GB -MemoryStartupBytes 4GB -MemoryMaximumBytes 8GB ```

The guest sees a balloon driver that inflates and deflates its own memory. That works well for web servers and file servers. It works badly for anything that measures its own available RAM once at startup and caches accordingly — databases and Java applications are the classic offenders, and they will happily underperform without telling you why.

Verification

Confirm the VM is running and the integration services are reporting in.

```powershell Get-VM -Name "web01" | Select-Object Name, State, Uptime, MemoryAssigned Get-VMIntegrationService -VMName "web01" ```

`State` should read `Running`. Every integration service should show `Enabled` and, more importantly, `PrimaryStatusDescription` should read `OK`. If heartbeat shows `No Contact`, the guest is either still booting or the integration services are not installed — and without heartbeat, Dynamic Memory and clean shutdowns will not work.

Check the switch binding as well:

```powershell Get-VMSwitch -Name "ExternalSwitch" | Select-Object Name, SwitchType, NetAdapterInterfaceDescription ```

Common problems

VM starts but has no network. The external switch is bound to the wrong physical adapter, or the guest has no DHCP lease. Confirm the binding with the command above, then check inside the guest whether it received an IP. On a host with multiple NICs, `-NetAdapterName` must match the exact interface name, not the description.

`Install-WindowsFeature` fails with error 0x800f0831. The component store is missing the payload, usually because the server has no internet access and no local source configured. Point the install at a mounted ISO or a WSUS source:

```powershell Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Source "D:\sources\sxs" -Restart ```

Live Migration fails between two hosts. Both hosts need identical virtual switch names, matching processor compatibility settings, and a shared authentication method — either CredSSP or Kerberos with constrained delegation. The switch name mismatch is the one people forget, because nothing in the error message mentions it.

Hyper-V is not the only option, and on Linux hosts KVM does the same job with a different management surface. On Windows Server, though, it is the hypervisor that is already licensed, already patched by the same update channel as the host, and already understood by whatever team manages the rest of your Windows estate. That integration is the argument, not the feature list.

← Terug naar kennisbank
← Terug naar kennisbank