The Effect of CPU Differences on Virtual Machine Migrations
Should you worry about it? And what can you do about it?
Major hypervisor vendors such as VMware and Microsoft have long supported the ability to move a running virtual machine (VM) from one host server to another without downtime. Such a migration requires the destination host to take over running a VM that is already running elsewhere. As such, the two hosts must have similar CPUs.
As a best practice, the host servers within a cluster should have identical processors. This isn't just to accommodate the migration of running VMs, but also to ensure a consistent level of performance across the cluster. Sometimes however, life gets in the way, and using identical CPUs just isn't an option. So what happens if you need to migrate a running VM to a host with a different CPU?
Because the destination host has to continue running threads that are already executing, there are some CPU differences that just can't be accommodated. You can't for example, move a running VM from an Intel Host to an AMD host, nor can you move a running VM to a host that uses a completely different CPU family. Outside of those restrictions however, the migration of running VMs to a host with a dissimilar CPU is usually possible; with a caveat. That caveat is that not all the CPU's features may be supported.
In the case of Hyper-V for example, there is a checkbox that an administrator can select to enforce CPU compatibility mode. Doing so causes the VM to use the bare minimum set of CPU features so that live migrations to hosts with dissimilar CPUs become possible.
VMware takes a slightly different approach for vMotions. A feature called Enhanced vMotion Compatibility can be applied at the cluster level so that all the hosts within the cluster will appear to have the same set of CPU features, regardless of which features the CPUs actually contain. Enhanced vMotion Compatibility essentially works by hiding any CPU features not natively supported by all hosts in the cluster. A similar feature called CPU compatibility hides CPU features from VMs in an effort to prevent vMotion failures when a VM is being migrated to a host containing a different type of CPU.
Brien Posey is a 16-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.