From: Peter Krempa <pkrempa@redhat.com>
When the qemu process can't be successfully killed (e.g. when it's stuck
in a long system call) libvirt creates a watch and waits for the monitor
socket to go away before cleaning up the domain.
The cleanup code in 'processShutdownCompletedEvent' called
'qemuProcessStop' but didn't call also 'qemuDomainRemoveInactive' which
would break if a transient VM would undergo the delayed cleanup as we'd
still have it's VM object around.
Fixes: e62c26a20dced58ea342d9cb8f5e9164dc3bb023
Closes: https://gitlab.com/libvirt/libvirt/-/work_items/853
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9e4d0f8640..7d33477636 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4079,6 +4079,7 @@ processShutdownCompletedEvent(virDomainObj *vm)
if (virDomainObjIsActive(vm)) {
qemuProcessStop(vm, VIR_DOMAIN_SHUTOFF_UNKNOWN, VIR_ASYNC_JOB_NONE, 0);
+ qemuDomainRemoveInactive(vm, 0, false);
}
qemuProcessEndStopJob(vm);
--
2.53.0