Hello! Is it possible to disable the virtlockd daemon or VM file locking? I start qemu with a -snapshot option which prevents and changes to the disk image anyways. Using <readonly /> is not supported for IDE disks. Another option would be to not require locking on the NFS share, but i have no idea how. Can someone help me with that? Regards Felix Queißner
On Mon, Jun 08, 2020 at 16:26:44 +0200, Felix Queißner wrote:> Hello!Hi,> > Is it possible to disable the virtlockd daemonYes. via the 'lock_manager' option in /etc/libvirt/qemu.conf>or VM file locking? IIf you mean the image locking provided by qemu, then no, libvirt doesn't have provisions to disable it.> start qemu with a -snapshot option which prevents and changes to the > disk image anyways.Note that starting from libvirt-5.10 and qemu-4.2 any VM hacking in -snapshot via qemu:arg will break as '-snapshot' is not supported together with -blockdev which is used to configure disks. This is because libvirt never really supported -snapshot. Said that I still plan to add support for <transient/> disks but I'm currently busy with other features.> Using <readonly /> is not supported for IDE disks. > > Another option would be to not require locking on the NFS share, but i > have no idea how.You didn't really describe the problem though. Are you trying to share the disk images between multiple VMs? Either way, another option is to add qcow2 overlay images which will capture the writes and discard them after the VM is turned off.
> Yes. via the 'lock_manager' option in /etc/libvirt/qemu.confOkay, i'll read docs on this!> >> or VM file locking? I > > If you mean the image locking provided by qemu, then no, libvirt doesn't > have provisions to disable it. > >> start qemu with a -snapshot option which prevents and changes to the >> disk image anyways. > > Note that starting from libvirt-5.10 and qemu-4.2 any VM hacking in > -snapshot via qemu:arg will break as '-snapshot' is not supported > together with -blockdev which is used to configure disks. > > This is because libvirt never really supported -snapshot. > > Said that I still plan to add support for <transient/> disks but I'm > currently busy with other features.Okay, thanks for the information!> You didn't really describe the problem though. Are you trying to share > the disk images between multiple VMs? > > Either way, another option is to add qcow2 overlay images which will > capture the writes and discard them after the VM is turned off.Yeah, the problem domain is this: I have ~20 computer sharing the same properties (hardware up to device revisions) and setup (as in hypervisor-os and user interaction). They all require the exact same OS to be run AND require to be immutable (so rebooting will reset them into the same state as before) My current approach is having a disk image on NFS which i start with libvirt+qemu and -snapshot. It does exactly what i need and if this is not supported anymore i need a way to replace the behaviour (which is "read from disk file, and cache+discard writes to the original image) Using a distinct qcow2 image backed by the original image in /tmp should work as well, if i understand right? Regards Felix