Although there are many things that can cause VM live migrations to fail, there are some issues that are especially...
common. Some of the more prevalent VM live migration issues include failed attempts to connect to the destination server, unsupported protocol versions, virtual switch mismatches and incompatible hardware.
One of the more common issues that occurs during a VM live migration involves an error message popping up when you attempt to connect to the destination host. An example of this error is shown in Figure A.
The error message cautions you to make sure the Windows Remote Management (WinRM) port is open on the destination host. WinRM uses port 5985 (HTTP) and port 5986 (HTTPS).
If the required firewall ports are open, there are a couple of other things you can check. Make sure the WinRM service is running on the destination host. You should also make sure domain name system resolution is working properly and that you're able to correctly resolve both the computer name and the fully qualified domain name of the remote host.
Unsupported protocol version
Another common VM live migration issue is an unsupported protocol version. An example of this error is shown in Figure B.
This error occurs because older versions of Hyper-V don't support some of the latest VM features. Entering the following command displays the version of each VM on a given Hyper-V host:
Get-VM * | Select-Object Name, Version
The error shown in Figure B occurs if you try to move a version 8.0 VM to a Hyper-V server running Windows Server 2012 R2. Windows Server 2012 R2 doesn't support VM versions above 5.0.
Virtual switch mismatch
Live migrations can also fail if the destination host doesn't contain a virtual switch with the same name as the one the VM is using. This error varies depending on whether you're attempting the live migration using Hyper-V Manager or PowerShell.
In modern versions of Hyper-V Manager, a virtual switch mismatch isn't a showstopper. Instead, the wizard will inform you of the problem and give you a chance to pick a different virtual switch, as shown in Figure C.
If you attempt the migration using PowerShell, then Hyper-V will simply produce an error.
Another somewhat common VM live migration issue is when the destination computer isn't compatible with the VM's hardware requirements. This error occurs because the source and destination Hyper-V hosts are running on hardware that is significantly different.
In most cases, you can correct the problem by using processor compatibility mode. Using processor compatibility mode tells the Hyper-V host to run the VM using only basic CPU features rather than attempting to use any advanced CPU features. Once processor compatibility mode is enabled, live migration will usually work. Incidentally, it's almost always possible to turn processor compatibility mode back off once the VM live migration is complete.
You can turn on processor compatibility mode from Hyper-V Manager by right-clicking on the VM and choosing the settings command from the shortcut menu. When the VM's settings window opens, expand the processor container and then select the compatibility sub-container. Now, just select the Migrate to a physical computer with a different processor version checkbox, as shown in Figure D.
These are just a few of the conditions that can cause live migration errors in Hyper-V. If you experience a really stubborn VM live migration error, take a moment to make sure the clocks on the Hyper-V hosts and the domain controllers are all in sync with one another.