[Linux-cluster] Migrate VMs between two clusters

Keith Schincke keith.schincke at gmail.com
Tue Apr 23 16:05:19 UTC 2013


Once your VM is under cluster control, you should use the cluster commands
to start, stop or migrate it. Using a combination of Cluster and virsh
commands can result in a corrupt VM disk image as you can end up with the
VM running on multiple nodes at the same time.

I messed this up once while building on of my clusters.

See the below links:
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/High_Availability_Add-On_Overview/s2-rgmanager-virt-features.html

https://fedorahosted.org/cluster/wiki/VirtualMachineBehaviors

Keith



On Tue, Apr 23, 2013 at 10:42 AM, Digimer <lists at alteeve.ca> wrote:

> On 04/23/2013 06:11 AM, Ralf Aumueller wrote:
>
>> Hello,
>>
>> we have two 2-node clusters running on CentOS 6.4. Only service managed by
>> clusters are KVM virtual machines. Both clusters have access to an
>> NFS-server on
>> which the config and storage files of the VMs reside.
>> Now I want to move a VM from cluster1 to cluster2 with the following
>> approach:
>>
>> On cluster1:
>>   Edit cluster.conf and remove vm1 config
>>   cman_tool version -r
>>   virsh migrate --live vm1 qemu+ssh://HOST1_CL2/system tcp:HOST1_CL2
>>
>> (After live migration finished)
>>
>> On cluster2:
>>   Edit cluster.conf and add vm1 config
>>   cman_tool version -r
>>   clusvcadm -e vm:vm1
>>    (I have autostart="0" so I need to enable the VM. Cluster-SW finds
>> running vm1
>> and clustat is OK).
>>
>> I tried it and it worked -- but is it save? Any comments (expect to ask
>> why we
>> have two 2-node clusters :-) ) ?
>>
>> Best regard,
>> Ralf
>>
>
> Did you try;
>
> clusvcadm -M vm:foo -m target.node
>
> That is how I live-migrate VMs. No need to remove it from the cluster and
> then re-add it.
>
> --
> Digimer
> Papers and Projects: https://alteeve.ca/w/
> What if the cure for cancer is trapped in the mind of a person without
> access to education?
>
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/**mailman/listinfo/linux-cluster<https://www.redhat.com/mailman/listinfo/linux-cluster>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20130423/0c159ec9/attachment.htm>


More information about the Linux-cluster mailing list