Hyper-V Live Migration Error 0x8007003B

Symptom:
Live migration of 'Virtual Machine TESTVM' failed.

Virtual machine migration operation for 'TESTVM' failed at migration source 'TESTVM'. (Virtual machine ID)

Planned virtual machine creation failed for virtual machine 'TESTVM': An unexpected network error occurred. (0x8007003B). (Virtual Machine ID).
Explanation:

Live migration of a guest VM can fail for a variety of reasons: CPU incompatiblity, storage path access restriction, offline caching, virtual machine queuing (VMQ), or live migration protocol incompatibilities. Following are some steps to attempt to resolve these issue.

The Fix:
1. CPUcompatiblityformigration=Enabled on all guest vms
2. VirtualMachineMigrationPerformanceOption=change from Compression to TCPIP
3. VMQ=Disabled on all hosts
4. win32_offlinefilescache=Disabled on all hosts (2019 servers have this setting disabled by default)
5. cpuVirtualizationEnabledInBios=True
6. Spectre Patching=same version on all hosts (Get-WmiObject -ClassName Win32_BIOS).SMBIOSBIOSVersion
7. NTFS / File Share permissions: grant ‘Windows NT\Network Service’, ‘Windows NT\Virtual Servers’, ClusterService, Hyper-V Hosts Group read/write permissions
8. Entity ‘Windows NT\Virtual Servers’ to have runas-service permissions on all Hyper-V Hosts – this should be set in a GP that is applied toward all Hyper-V hosts in the domain
Step 1:
$compatibilityForMigration=(Get-VMProcessor $vmName).CompatibilityForMigrationEnabled

if(!$compatibilityForMigration){
stop-vm$vmName
Set-VMProcessor$vmName -CompatibilityForMigrationEnabled 1
start-vm$vmName
}
Step 2:
$performanceOption='TCPIP' # TCP is most compatible, and the other options are SMB and Compression
Set-VMHost -VirtualMachineMigrationPerformanceOption $performanceOption
Step 3:

Disable VMQ

Step 4:

Try to disable CSC (offline file cache):

wmic path win32_offlinefilescache call enable false
#output:
Executing (win32_offlinefilescache)->enable()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
RebootRequired = FALSE;
};
Step 5:

Enable CPU virtualization. There are many variants of computer BIOS; thus, we’ll just generalize the approach as, ‘set Intel/AMD Virtualization Technology to Enabled.’

To be continued…

Leave a Reply

Your email address will not be published. Required fields are marked *