From: Jiri Denemark Date: Wed, 7 Dec 2011 11:52:59 +0000 (+0100) Subject: qemu: Ignore shutdown event from destroyed domain X-Git-Tag: v0.9.8~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97652044af5f2c70e2bfbddbd59eb047bf0a82fa;p=thirdparty%2Flibvirt.git qemu: Ignore shutdown event from destroyed domain During virDomainDestroy, QEMU may emit SHUTDOWN event as a response to SIGTERM and since domain object is still locked, the event is processed after the domain is destroyed. We need to ignore this event in such case to avoid changing domain state from shutoff to shutdown. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5e8a20a187..93097613ec 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -471,6 +471,10 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED, VIR_DEBUG("Ignoring repeated SHUTDOWN event from domain %s", vm->def->name); goto unlock; + } else if (!virDomainObjIsActive(vm)) { + VIR_DEBUG("Ignoring SHUTDOWN event from inactive domain %s", + vm->def->name); + goto unlock; } priv->gotShutdown = true;