On 10/06/2017 09:09 AM, Jan Heidbrink wrote: > Public bug reported: > > When running 'qemu-img info test.qcow2' while test.qcow2 is currently > used by a Qemu process, I get the error > > qemu-img: Could not open 'test.qcow2': Failed to get shared "write" > lock. > > > Why does displaying information about a disk image need a write lock for the file? Because there is a risk (albeit rather slight) that what you read from the disk is inconsistent due to being an intermediate state in-between separate non-atomic write actions by the other process that has it open for write. If you are willing to ignore the risk, then use: qemu-img info -U test.qcow2 which says that you are okay reading the image while it is shared with a concurrent writer, even if the read fails spectacularly in the unlikely case that it sees inconsistent information. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org