The dlm lock plugin couldn't release locks when the vm instance
was destroyed, kill manually because that we can't use file
descriptor which couldn't adopt after libvirtd reboot to be
aware of the process dead, we need to proactively to release
the lock just like unlink the <domain>.xml and <domain>.pid
files. This operation could be found in libxl.
Signed-off-by: river <lfu(a)suse.com>
---
src/qemu/qemu_process.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 5a364730c..49c64be6f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6626,6 +6626,11 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuProcessRemoveDomainStatus(driver, vm);
+ VIR_FREE(priv->lockState);
+ if (virDomainLockProcessPause(driver->lockManager, vm, &priv->lockState)
< 0)
+ VIR_WARN("Unable to release lease on %s", vm->def->name);
+ VIR_DEBUG("Preserving lock state '%s'",
NULLSTR(priv->lockState));
+
/* Remove VNC and Spice ports from port reservation bitmap, but only if
they were reserved by the driver (autoport=yes)
*/
--
2.15.1