QEMU 2.10 file locking breaks commands underneath the running QEMU
|Category:||Drivers - VM|
|Affected Versions:||OpenNebula 5.4.2|
QEMU 2.10 comes with enabled builtin file locking to prevent image corruption (https://wiki.qemu.org/ChangeLog/2.10):
Image locking is added and enabled by default. Multiple QEMU processes cannot write to the same image as long as the host supports OFD or posix locking, unless options are specified otherwise.
If some operation with file image (resize/snapshots management) is done under hands of the running QEMU, it fails on lock acquire:
$ qemu-img resize /var/lib/one/datastores/0/39/disk.0 11264M qemu-img: Could not open '/var/lib/one/datastores/0/39/disk.0': Failed to get "write" lock Is another process using the image?
To disable locking,
file.locking=off (??) should be specified as parameters of particular
-drive on QEMU commandline, e.g.:
Don't see a way how to configure this via libvirt.