Wednesday, November 17, 2010

Live Migration process in Windows Server 2008 R2

- Windows Server 2008 R2 support a feature called ‘Live Migration’, said one of my students.

Yes it does, but there are some requirements you need to meet before you are able to live migrate your VMs.

Let us take a quick look at the requirements:

·         Windows Server 2008 R2 Enterprise/Datacenter (You can also use the Microsoft Hyper-V Server 2008 R2)
·         Failover Cluster feature installed on every node that will use live migration (supports up to 16 nodes per cluster)
·         Use dedicated network for live migration
·         The nodes in the cluster must use a processor from the same manufacturer
·         The nodes must be on the same subnet
·         Access to shared storage
·         Clustered Shared Volume enabled (CSV)
·         Identical names on the Virtual Networks in Hyper-V

(The CSV feature is maybe the best invention since sliced bread)

After explaining the requirements, they insisted to try a live migration in our lab  (our lab meets all the requirements J )

-          Ok, let`s get started with the Live Migration process.

What happens when you initiate a live migration from node 1 to node 2 in Failover Cluster Manager ?

1.       The source node makes a connection (TCP) with the destination node to transfer the VM configuration data. A ‘copy’ of the VM is created on node 2 and memory is allocated.
2.       Memory is transferred from source node to destination node. The memory copies over the network, and the migrating VM continues to run.
3.       A final memory copy process copies the remaining modified memory pages to the destination node. In this stage the network between source and destination is critical to the speed of the live migration. (1GB is recommended) Also, if the VM is heavily accessed under the live migration, that might affect the speed as well.
4.       Move the ‘storage’ from source node to destination node (.vhd files, pass-through disks)
5.       The VM is online on the destination node since it now has the updated working set and access to the VM storage.
6.       Time to cleanup! A message is sent to the physical network switch telling him to re-learn the MAC address of the migrated VM. Now the VM can use the correct switch port.

The benefits this feature gives us, is that it provides us with the opportunity to build a dynamic datacenter, easier maintenance of the nodes, and a hot topic in these days: green IT