[libvirt-users] 2 hosts, mirrored VM storage, avoiding conflicting VM instances

Whit Blauvelt whit.virt at transpect.com
Sat Apr 23 20:54:54 UTC 2011


Hi,

Using libvirt for KVM, experimenting with live migration with the VM on
storage shared in a mirrored GlusterFS or an active-active DRBD setup where
QEMU/KVM runs on the hosts on both sides of the mirror, the live migration
works great. What concerns me is finding a way if possible to prevent a
situation where a particular VM is running on both hosts at once. Is there
any way within libvirt in this sort of setup to start a VM on mirrored
storage from a KVM host on one side of the mirror _only if_ the same VM
isn't already running on the other side of the mirror?

In a scripting context I can see how to do that check before starting, but
not how to prevent virsh or virt-manager from being used to create this bad
condition when they're being used directly. Is there some way to set up
protection from this within virsh and virt-manager? Or am I into feature
request territory? Or is there some other layer at which this can be
accomplished?

In active-passive DRBD this wouldn't be a danger, since only the active
system can see the storage to start the VM. But that wouldn't support live
migration. Part of the danger can be avoided by using stonith in failover,
but it would be nice to find a more fine-grained, subtle approach.

Best,
Whit




More information about the libvirt-users mailing list