How to Configure Windows Server 2016 Live Migration
Live Migration allows you to move running virtual machines from one Hyper-V host to another with zero downtime, making it essential for hardware maintenance, load balancing, and disaster recovery scenarios. Windows Server 2016 introduces several improvements to Live Migration, including compressed and SMB transport modes and virtual machine multi-queue (VMMQ) support.
Prerequisites
- Two or more Hyper-V hosts running Windows Server 2016.
- Both hosts joined to the same Active Directory domain (recommended) or configured with constrained delegation.
- Processor compatibility: Both hosts should have the same CPU vendor (Intel or AMD). Enable processor compatibility mode if needed.
- Shared storage accessible to all hosts, or use Storage Migration to move VMs without shared storage.
- Sufficient network bandwidth between hosts (10 Gbps recommended for production).
Step 1: Enable Live Migration on Both Hosts
Enable-VMMigration
Configure which networks Live Migration can use. Specify the management network and a dedicated migration network:
Add-VMMigrationNetwork -Subnet "10.0.1.0/24" -Priority 1
Step 2: Configure Live Migration Authentication
For domain-joined hosts, configure CredSSP or Kerberos authentication. Kerberos is recommended for better security:
Set-VMHost -VirtualMachineMigrationAuthenticationType Kerberos
For Kerberos to work, configure constrained delegation in Active Directory for both hosts. Run the following on a domain controller:
Get-ADComputer -Identity "HyperV-Host1" | Set-ADObject -Add @{"msDS-AllowedToDelegateTo" = @("cifs/HyperV-Host2","Microsoft Virtual System Migration Service/HyperV-Host2","cifs/HyperV-Host2.corp.local","Microsoft Virtual System Migration Service/HyperV-Host2.corp.local")}
For simpler setups or workgroup environments, use CredSSP:
Set-VMHost -VirtualMachineMigrationAuthenticationType CredSSP
Step 3: Configure Migration Transport Mode
Windows Server 2016 supports several transport modes. Set the preferred mode:
Set-VMHost -VirtualMachineMigrationPerformanceOption Compression
Available options:
- TCPIP: Standard TCP/IP transport.
- Compression: Compresses VM memory before transfer (reduces bandwidth, adds CPU overhead).
- SMBTransport: Uses SMB Direct / RDMA for lowest latency when RDMA-capable NICs are present.
Step 4: Set Maximum Simultaneous Migrations
Set-VMHost -MaximumVirtualMachineMigrations 4
Set-VMHost -MaximumStorageMigrations 2
Step 5: Configure Processor Compatibility Mode
When migrating between hosts with different CPU generations, enable processor compatibility on the VM (must be done while the VM is stopped):
Set-VMProcessor -VMName "VM01" -CompatibilityForMigrationEnabled $true
Step 6: Perform a Live Migration
Move a running VM to another host without downtime. With shared storage:
Move-VM -Name "VM01" -DestinationHost "HyperV-Host2"
Move both VM and storage (no shared storage required):
Move-VM -Name "VM01" -DestinationHost "HyperV-Host2" `
-DestinationStoragePath "E:VMsVM01" `
-IncludeStorage
Step 7: Perform a Storage Migration
Move VM storage to a different location while the VM is running:
Move-VMStorage -VMName "VM01" -DestinationStoragePath "F:VMsVM01"
Move only specific VHDs:
Move-VMStorage -VMName "VM01" -VHDs @(@{SourceFilePath="E:VMsVM01VM01.vhdx"; DestinationFilePath="F:VMsVM01VM01.vhdx"})
Step 8: Monitor Migration Progress
Get-VM -Name "VM01" | Select-Object Name, State, Status, CPUUsage, MemoryAssigned
Watch migration events in real time:
Get-WinEvent -LogName "Microsoft-Windows-Hyper-V-VMMS-Admin" -MaxEvents 20
Troubleshooting Live Migration Failures
Common errors and solutions:
“The virtual machine cannot be moved because virtual machine migration is not enabled”: Run Enable-VMMigration on both hosts.
“Authentication failure”: Verify Kerberos constrained delegation settings in AD or switch to CredSSP temporarily.
Check Windows Firewall for required Live Migration ports:
Get-NetFirewallRule | Where-Object {$_.DisplayName -like "*Hyper-V*"} | Select-Object DisplayName, Enabled
Summary
Live Migration in Windows Server 2016 Hyper-V is a powerful capability that enables zero-downtime VM movement between hosts. Proper configuration of authentication, network settings, and processor compatibility ensures reliable migrations. For environments without shared storage, the IncludeStorage parameter enables migration by copying VM files during the live migration process.