[libvirt] [PATCH] qemu: Properly detect crash of a rebooted domain

Jiri Denemark jdenemar at redhat.com
Tue Sep 13 16:53:58 UTC 2011


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.
---
 src/qemu/qemu_process.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ca4f21f..1332e04 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);
-- 
1.7.6.1




More information about the libvir-list mailing list