>KVM Live Migration

By | August 13, 2013

>

In this write-up I am going to discuss virtual Machine live migration from one hypervisor to another hypervisor. For this scenario I am using KVM hypervisor. Vmotion is much discussed feature available in Vmware. Vmotion migrate live virtual machine from one host to host. Vmotion can only be used for Vmware ESX/ESXi hypervisor. Let us discuss how live migration can be performed in KVM. 

 

Remember that guests (VM) need to fulfill following conditions to migrate actively (live migration)

—  Virtual Machine must be installed on shared disk (iscsi LUN, Fiber Channel Based LUN, FCoE,NFS,GFS2 etc).

—  Shared storage must be accessible from both the source and destination host.

—  Both the hosts must have the appropriate tcp ports open.

Ensure that source and destination host have same version of Operating System.

— Ensure that hostname getting resolved to IP address via DNS or /etc/hosts.

In my example, I am using CentOS 6.4 with virtualization packages installed on both the host1 and host2. I also ensured that libvirtd daemon is running on both the hosts.
I also made entries in /etc/hosts to resolve hosts via name. One fact I learned in live migration process that hostname must be resolved to IP as you can’t migrate by mentioning IP of destination server.
I issued following command Migrate guest VM from host1.linuxmantra.com to host2.linuxmantra.com

host1# virsh migrate -–live qemu+ssh://host2.linuxmantra.local/system

 
 
 
Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *