From: Jiri Denemark Date: Tue, 13 Sep 2011 16:48:13 +0000 (+0200) Subject: qemu: Properly detect crash of a rebooted domain X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c2e9fab27381d1eed581648ca2f4a78ee2818f5b;p=libvirt.git qemu: Properly detect crash of a rebooted domain When a domain is rebooted using libvirt API, we use fake reboot consisting of shutting down and resetting the domain. Thus we see a SHUTDOWN event and set gotShutdown flag. But we never reset it back and if the domain crashes after it was rebooted this way, we consider it was a normal shutdown and not a crash. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8462cf06e7..5f7f0e6f6a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -405,6 +405,7 @@ qemuProcessFakeReboot(void *opaque) "%s", _("resume operation failed")); goto endjob; } + priv->gotShutdown = false; event = virDomainEventNewFromObj(vm, VIR_DOMAIN_EVENT_RESUMED, VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);