One general issue with quick/live migration feature within Hyper-V is that you cannot move or migrate virtual machines between hosts with hardware incompatibilities. For example, you cannot move or migrate a VM from a host with Intel processors to another host with AMD processors. This is not an implementation issue. Rather, this is a technical issue involved in differences in instruction set between different processors. That said, sometimes moving or migrating virtual machines between hosts with processors from the same vendor may also fail. This could be because of the differences in feature sets of these processors. You won’t be able to move a virtual machine hosted on system with latest Intel processor to a system with some older Intel processor. Although, processors in both systems support hardware assisted virtualization, a VM move or migration may still fail.
When Hyper-V was first released, there was no straight forward method to find out if “VM A” on “HOST A” can be quick migrated to “HOST B” without really performing a migration. Unfortunately, in Windows Server 2008 R2 also, fail-over cluster console has no option to verify the target host compatibility. However, this release of Hyper-V (or Windows Server 2008 R2) includes a couple of WMI methods to perform these host compatibility checks before performing quick / live migrations.
Msvm_VirtualSystemManagementService includes GetSystemCompatibilityInfo() and CheckSystemComptibilityInfo() methods to verify host compatibility in a scripted manner. This post will look at how we can use these two methods to check host compatibility.
First let us look at GetSystemCompatibilityInfo() method. This method takes the following parameter as input
CIM_ComputerSystem REF ComputerSystem
as output. The input parameter – ComputerSystem – can either be a reference to a VM object or a Hyper-V host computer object and the output parameter is just a blob containing compatibility information which can be passed on to CheckSystemCompatibilityInfo() method to confirm compatibility. If the input parameter is a Hyper-V host computer object, then the data in the CompatibilityInfo parameter can be used to determine whether any of the VMs on the hosting computer system can be quickly migrated to another Hyper-V host.
Any script that needs to call these two methods to verify compatibility for quick / live migration needs to consider the source & target Hyper-V host server. Also, one more input parameter to such a script would be the VM name itself.
In the next post, I will include a VBScript which explains how to use these two methods to gather compatibility information.