Sometimes I just need my blog as Knowledgebase to find something in the future, so this is exactly one of this blog post.
When I was migrating a Virtual Machine from Host A to Host B using Shared-Nothing Live Migration, the migration operation failed with the following error:
PowerShell Error:
Hyper-V Manager Error:
Â
SCVMM Error:
The error is consistent between PowerShell, Hyper-V Manager and VMM .
The environment is very simple, here is a quick overview:
Two Hyper-V standalone servers 2012 R2 joined to the same domain managed by SCVMM. Host A was in production for quite some time, however Host B is new virgin host just deployed and fully patched
If we look at the migration settings for both nodes, we found the following:
As you see the only difference is the incoming live migration network subnets, Host A has two subnets however Host B has only one subnet, but sure enough this is not the case since the migration will take place only on the 25.0/24 subnet.
Let’s do the opposite side, we will create a demo VM on Host B and then migrate to Host A.
The fast test will be… of course with PowerShell
PC C:/>New-VM DEMO-VM -MemoryStartupBytes 4096MB -Generation 2 -Path “D:\VirtualMachines” -NewVHDPath “D:\VirtualMachines\DEMO-VM\Virtual Hard Disks\DEMO-VM.vhdx” -NewVHDSizeBytes 100GB -Verbose
PC C:/>Set-VMProcessor DEMO-VM -CompatibilityForMigrationEnabled $true -verbose
PC C:/>Start-VM DEMO-VM -verbose
PC C:/>Move-VM DEMO-VM -DestinationHost SC-MGMT -IncludeStorage -DestinationStoragePath “D:\VMs\DEMO-VM” –Verbose
The VM moved successfully
What are the symptoms that we observed so far:
- Shared-Nothing Live Migration from Host A to Host B Failed!
- Shared-Nothing Live Migration from Host B to Host A Succeeded!
Let’s try to move back the DEMO-VM from Host A to Host B…
That error is, unfortunately, a misleading error. There is nothing wrong with the username or the password, I have full admin privilege on both Hyper-V nodes. The real problem that I have two different Management NICs with two different DNS servers set on each . The target host server must be resolvable by DNS, for this reason HOST B was able to resolve HOST A but not vice versa. The solution was simple, remove the second DNS server, flush and register the DNS on host A, and then finally flush the Address Resolution Protocol (ARP) cache!
ipconfig /flushdns
ipconfig /registerdns
command arp -d *
And here you go… I was able to move back the DEMO-VM from Host A to Host B!
Lessons Learned: Only one Management NIC must be set with DNS and Gateway, and the other network traffic such as (Live Migration, Storage, Cluster, iSCSI, Backup, etc…) must be set with only IP address, because failing to resolve the target host server via DNS will cause the migration to fail.
Hope this helps!
Until then… N’joy your day!
/Charbel