Docs / Windows Server / How to Install and Configure Hyper-V on Windows Server

How to Install and Configure Hyper-V on Windows Server

By Admin · Mar 2, 2026 · Updated Apr 24, 2026 · 29 views · 3 min read

How to Install and Configure Hyper-V on Windows Server

Hyper-V is the built-in hypervisor in Windows Server that allows you to create and manage virtual machines (VMs). Running Hyper-V on your Kazepute Breeze enables you to consolidate workloads, test configurations, and run isolated environments. This guide covers installation, VM creation, and management.

Prerequisites

  • A Kazepute Breeze running Windows Server 2019 or 2022
  • CPU with hardware virtualization support (Intel VT-x or AMD-V)
  • At least 8 GB of RAM (more recommended for running multiple VMs)
  • Sufficient disk space for VM storage

Install Hyper-V

# Install Hyper-V role with management tools
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

# After the reboot, verify installation
Get-WindowsFeature Hyper-V

# Check Hyper-V service
Get-Service vmms

The server will restart automatically during installation. Reconnect after the reboot completes.

Configure Virtual Switch

VMs need a virtual switch to connect to the network:

# List physical network adapters
Get-NetAdapter

# Create an external virtual switch (bridges to physical network)
New-VMSwitch -Name "ExternalSwitch" -NetAdapterName "Ethernet" -AllowManagementOS $true

# Create an internal switch (host-to-VM only)
New-VMSwitch -Name "InternalSwitch" -SwitchType Internal

# Create a private switch (VM-to-VM only)
New-VMSwitch -Name "PrivateSwitch" -SwitchType Private

# List virtual switches
Get-VMSwitch | Format-Table Name, SwitchType, NetAdapterInterfaceDescription

Create a Virtual Machine

# Create VM storage directory
New-Item -Path "D:\VMs" -ItemType Directory

# Create a new Generation 2 VM
New-VM -Name "WebServer" `
    -MemoryStartupBytes 2GB `
    -Generation 2 `
    -NewVHDPath "D:\VMs\WebServer\WebServer.vhdx" `
    -NewVHDSizeBytes 60GB `
    -SwitchName "ExternalSwitch" `
    -Path "D:\VMs"

# Configure VM settings
Set-VM -Name "WebServer" `
    -ProcessorCount 2 `
    -DynamicMemory `
    -MemoryMinimumBytes 1GB `
    -MemoryMaximumBytes 4GB `
    -AutomaticStartAction Start `
    -AutomaticStopAction ShutDown

# Add a DVD drive with installation ISO
Add-VMDvdDrive -VMName "WebServer" -Path "D:\ISOs\WindowsServer2022.iso"

# Set boot order (boot from DVD first for installation)
$dvd = Get-VMDvdDrive -VMName "WebServer"
Set-VMFirmware -VMName "WebServer" -FirstBootDevice $dvd

Manage Virtual Machines

# Start a VM
Start-VM -Name "WebServer"

# Stop a VM gracefully
Stop-VM -Name "WebServer"

# Force stop a VM
Stop-VM -Name "WebServer" -Force

# Restart a VM
Restart-VM -Name "WebServer"

# List all VMs with status
Get-VM | Format-Table Name, State, CPUUsage, @{N='MemMB';E={$_.MemoryAssigned/1MB}}, Uptime

# Connect to VM console (opens VMConnect)
vmconnect localhost "WebServer"

Checkpoints (Snapshots)

# Create a checkpoint before making changes
Checkpoint-VM -Name "WebServer" -SnapshotName "Pre-Update"

# List checkpoints
Get-VMCheckpoint -VMName "WebServer"

# Restore to a checkpoint
Restore-VMCheckpoint -VMName "WebServer" -Name "Pre-Update" -Confirm:$false

# Remove a checkpoint
Remove-VMCheckpoint -VMName "WebServer" -Name "Pre-Update"

VM Replication

Replicate VMs to another Hyper-V host for disaster recovery:

# Enable replication on the primary server
Set-VMReplicationServer -ReplicationEnabled $true -AllowedAuthenticationType Kerberos

# Enable replication for a specific VM
Enable-VMReplication -VMName "WebServer" `
    -ReplicaServerName "hyper-v-replica.example.com" `
    -ReplicaServerPort 80 `
    -AuthenticationType Kerberos `
    -RecoveryHistory 4

# Start initial replication
Start-VMInitialReplication -VMName "WebServer"

Resource Management

# Set CPU weight (higher = more priority)
Set-VMProcessor -VMName "WebServer" -RelativeWeight 200

# Set memory limits
Set-VMMemory -VMName "WebServer" -DynamicMemoryEnabled $true -MinimumBytes 1GB -MaximumBytes 4GB -Buffer 20

# Configure storage QoS
Set-VMHardDiskDrive -VMName "WebServer" -ControllerType SCSI -ControllerNumber 0 -MinimumIOPS 100 -MaximumIOPS 1000

Best Practices

  • Use Generation 2 VMs for modern operating systems — they support UEFI, Secure Boot, and faster performance.
  • Enable dynamic memory to optimize RAM usage across VMs.
  • Store VM files on fast SSD storage for best performance.
  • Take checkpoints before making major changes, but do not use them as a long-term backup strategy.
  • Use VM replication for disaster recovery scenarios.
  • Monitor host resource usage to avoid overcommitting CPU and memory.
  • Keep Hyper-V integration services updated in guest VMs.

Was this article helpful?