Cloud Zone is brought to you in partnership with:

Brian Lewis works as an IT Pro Evangelist for Microsoft Corporation in the Midwest, where he focuses on the IT Pro audience in Illinois, Indiana, and Wisconsin. He is very passionate about technology and has over 18 years of enterprise IT experience. Brian enjoys working with all computer and networking technologies. He enjoys everything from programming and scripting to working with all types of infrastructure. There just isn’t a technology that isn’t interesting to him. Brian enjoys several hobbies outside of computers including rock climbing, trail biking, and swimming. http://mythoughtsonit.com Brian is a DZone MVB and is not an employee of DZone and has posted 15 posts at DZone. You can read more from them at their website. View Full User Profile

Hyper-V - Live Migration

04.04.2013
| 1981 views |
  • submit to reddit
This is post 12 of 20 in a series of how to’s on Virtualization with Microsoft Hyper-v. For a full list of posts in this series please see Dan Stolts’s original post (o of 20) located here:
http://itproguru.com/expert/2013/03/become-a-virtualization-expert-with-20-days-of-server-virtualization-virtexpert-itproguru-part-0-of-20/

Live MigrationLive Migration is the Microsoft Hyper-v feature where you move a running virtual machine from one physical host to another physical host while the VM continues to run. That’s right without any downtime or service outage. Cool hunh? Yes, for those of you who know VMware, it is like vMotion.

You can download the Free Microsoft Hyper- V server 2012 Here:
http://aka.ms/HypervFree

Prior to the 2012 version of Hyper-v you needed to setup a failover cluster to enable Hyper-v Live Migration. You also needed to have shared storage to use this feature. With Hyper-v 2012 this technology now adds the ability to move running VMs between non-clustered hosts as well as clustered hosts. Further in addition to iSCSI and Fiber Channel you can now host your shared files on SMB 3.0 file shares.  But – the goodness doesn’t stop there, this tech is like the ginsu knife – there’s more… Your files don’t need to be on shared storage. They can just exist on local attached disk and you can still move running Virtual machines between stand alone Hyper-v hosts with Shared Nothing Live Migration.

The high availability that hyper-v offers by allowing you to move VMs from host to host without downtime allows you to physically update your hosts as well as patch them with no downtime to the VMs. When used in a failover cluster you can have virtual machines automatically start on another host when the physical host that they are running on fails. Unfortunately when a reboot is needed on a VM, from say patching it, there is not magic high availability bullet and the VM must be rebooted.

Live Migration Process

In the Live Migration Process the virtual Machine memory is copied form the source machine to the destination machine. First the configuration is copied to the destination server and then the memory is copied. Once the memory is synchronized the network connections can be moved to the destination and the source machine can be removed from ram. When combined with shared storage this is all that is needed to move a running Virtual Machine.

image

Live Storage Migration

Live Storage Migration works by syncing the VHD or VHDX files between the source and destination storage locations. For more on this technology see my earlier post on Step by step – Storage Live Migration.

Shared Nothing Live Migration

Now if we add together both the Live Migration and the Storage Migration processes we get Shared Nothing Live Migration. This is where we can move a running VM from host to host without using shared storage.

Here is how the process works. First we sync the virtual hard disks between source and destination servers. Then we sync the virtual machine’s memory between the source and destination servers. When we get the two running VMs in sync then we move the network. Lastly delete the source VM.

ws2012_live_migration

In the video below I show a 2 minute demo of moving a DOS machine running Duke Nukem from server Hyperv2 to Hyperv1 and then back again. The reason I used a DOS machine was because the disk is small and so it storage migrates quickly. Moving one of my server 2012 boxes takes a tad bit longer as it needs to copy more data in the storage migration phase. The power of moving running VMs between any Hyper-v host is truly a game changer.

 

Published at DZone with permission of Brian Lewis, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)