[PATCH V2 01/13] libxl: always set vm id to -1 on shutdown

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

 



Once a domain has reached the shutdown state, set its ID to -1.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/libxl/libxl_driver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 8e4242a..0cd0ec8 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -266,15 +266,15 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
     char *file;
     size_t i;
 
+    vm->def->id = -1;
+
     if (priv->deathW) {
         libxl_evdisable_domain_death(priv->ctx, priv->deathW);
         priv->deathW = NULL;
     }
 
-    if (vm->persistent) {
-        vm->def->id = -1;
+    if (vm->persistent)
         virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
-    }
 
     if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
         driver->inhibitCallback(false, driver->inhibitOpaque);
-- 
1.8.1.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]