On 07/17/2017 07:30 PM, Andrew Baumann via Qemu-devel wrote: > Hi all, > > I'm running a recent Linux build of qemu on Windows Subsystem for Linux (WSL) > which doesn't appear to implement file locking: > > $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,id=hd0 -device > virtio-blk-pci,drive=hd0 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock > byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock > byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to lock > byte 100 > > That's no big deal; I can switch it off: > > $ qemu-system-aarch64 ... -drive > file=test.vhdx,if=none,file.locking=off,id=hd0 ... > (all good) > > But how can I do the same for a snapshot drive? > > $ qemu-system-aarch64 ... -drive > file=test.vhdx,if=none,file.locking=off,id=hd0 -snapshot ... > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: > Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: > Failed to unlock byte 100 > qemu-system-aarch64: -drive file=test.vhdx,if=none,file.locking=off,id=hd0: > Could not create temporary overlay '/var/tmp/vl.o83dxn': Failed to lock byte > 100 > > (I also tried the snapshot=on drive option with similar results.) > > Thanks, > Andrew >
Looks like the shorthand "-snapshot" doesn't let you specify any further options, which is a bummer. You may need to do something a little more manual, and create your own temporary overlay, and launch QEMU pointing to that overlay instead. That sounds like a bit of a hassle. Can we compile locking support out of QEMU instead for this platform? Or is there a runtime option for disabling it globally?