Dear All,
I am trying to use VM (disk) locking on a two node Centos 7 KVM cluster. Unfortunately, I
am not successful.
Using virtlockd (
https://libvirt.org/locking-lockd.html), I get each host to write the
zero length file with a hashed filename to the shared folder specified. Regardless of
which host I start a VM (domain) on, they do produce the identical filename per VM. What
does not work, however, is to prevent the second host to start the VM already running on
the first VM.
Using sanlock (
https://libvirt.org/locking-sanlock.html), no domains do start at all.
However, the file "__LIBVIRT__DISKS__" is also not written to the shared folder.
Hence, nothing works.
Can someone please point me to the right direction?
My system is current Centos 7 using a gluster storage setup like suggested for oVirt
(
https://community.redhat.com/blog/2014/10/up-and-running-with-ovirt-3-5/) based on the
oVirt 3.5 repo but without an engine. I do this, because I want to retain VM files in
qcow2 format for live backups and with human readable names. What does work then is, e.g.,
live migration. A locking mechanism to prevent starting a VM twice would be good.
Please note that this configuration - both according to redhat and to my own trial and
error - requires Lock=False in /etc/nfsmount.conf. Is there a connection with my findings?
My issues occur regardless of the files being in NFS or Gluster folders. KVM must load the
Gluster storage indirectly via NFS rather than straight via Gluster, as Gluster storage
does not seem to fully work, at least in virt-manager.
My software versions are:
libvirt 1.2.8-16.el7_1.3.x86_64
qemu-kvm ev-2.1.2-23.el7_1.3.1.x86_64
Regards,
Michael