[PATCH] qemu: Don't flag domain running when qemu dies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When we try to stop domain's CPUs and qemu crash meanwhile, a cleanup
of domain is performed and domain gets into state VIR_DOMAIN_SHUTOFF.
But this is later overwritten and thus results in domain marked as
running but with negative ID.
---
 src/qemu/qemu_process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 7691cbe..539e4f3 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1919,7 +1919,7 @@ int qemuProcessStopCPUs(struct qemud_driver *driver, virDomainObjPtr vm)
     qemuDomainObjEnterMonitorWithDriver(driver, vm);
     ret = qemuMonitorStopCPUs(priv->mon);
     qemuDomainObjExitMonitorWithDriver(driver, vm);
-    if (ret < 0) {
+    if (ret < 0 && vm->state == VIR_DOMAIN_PAUSED) {
         vm->state = oldState;
     }
     return ret;
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]