"lyz_pro"<lyz_pro@163.com>
2014-Apr-02 10:34 UTC
[libvirt-users] libvirt live migrate problem
Hi The problem is after I successful live migrate a domain, the domain os become read-only. and when I use qemu-img to show the disk info at node which domain current running , the command return 'Permission denied'. BUT, I can use qemu-img show the disk info at the previous node. My Env: two node, all install libvirt + kvm . use glusterfs as shared storage. the libvirt/kvm version: libvirt-0.10.2-29.el6_5.5.x86_64 qemu-kvm-0.12.1.2-2.415.el6_5.6.x86_64 qemu-img-0.12.1.2-2.415.el6_5.6.x86_64 glusterfs-3.4.1-3.el6.x86_64 -------------- lyz_pro 2014-04-02
Hi, On 04/02/2014 12:34 PM, lyz_pro wrote:> The problem is after I successful live migrate a domain, the domain > os become read-only. > and when I use qemu-img to show the disk info at node which domain> current running ,> the command return 'Permission denied'. BUT, I can use qemu-img show > the disk info at the previous node.If you are using glusterfs, libvirt doesn't recognize it as a 'shared' filesystem, and therefore does a 'chown' back to root:root when stopping the image on one host, which gets into a race with chowning to lilbvirt:qemu on the other. If the image ends up being owned by root:root, then the guest no longer has access to the file system, and switches to read-only. There is a bug for this: https://bugzilla.redhat.com/show_bug.cgi?id=1057645 The workaround is: to change /etc/libvirt/qemu.conf so it contains "dynamic_ownership=0", and restart libvirt. In comment 7 of the bug I described doing it by bringing all the guests down, but I think you might be able to get away with just changing the config file and restarting libvirt. Regards, Paul Boven. -- Paul Boven <boven@jive.nl> +31 (0)521-596547 Unix/Linux/Networking specialist Joint Institute for VLBI in Europe - www.jive.nl VLBI - It's a fringe science