[PATCH] Update ID after stopping a domain

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

 



---
 src/esx/esx_driver.c       |    1 +
 src/openvz/openvz_driver.c |    1 +
 src/phyp/phyp_driver.c     |    2 ++
 src/vbox/vbox_tmpl.c       |    1 +
 src/xenapi/xenapi_driver.c |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 964a3a5..913420c 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -1620,6 +1620,7 @@ esxDomainDestroy(virDomainPtr domain)
         goto cleanup;
     }
 
+    domain->id = -1;
     result = 0;
 
   cleanup:
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 98381fb..c46f3a7 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -531,6 +531,7 @@ static int openvzDomainShutdown(virDomainPtr dom) {
 
     vm->def->id = -1;
     vm->state = VIR_DOMAIN_SHUTOFF;
+    dom->id = -1;
     ret = 0;
 
 cleanup:
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index e4afc5a..7143933 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3688,6 +3688,8 @@ phypDomainDestroy(virDomainPtr dom)
     if (phypUUIDTable_RemLpar(dom->conn, dom->id) == -1)
         goto err;
 
+    dom->id = -1;
+
     VIR_FREE(cmd);
     VIR_FREE(ret);
     return 0;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 0a91c7f..31fec67 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1587,6 +1587,7 @@ static int vboxDomainDestroy(virDomainPtr dom) {
             }
 #endif
             VBOX_RELEASE(console);
+            dom->id = -1;
             ret = 0;
         }
         data->vboxSession->vtbl->Close(data->vboxSession);
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 2262cef..fb3c91d 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -830,6 +830,7 @@ xenapiDomainDestroy (virDomainPtr dom)
             return -1;
         }
         xen_vm_set_free(vms);
+        dom->id = -1;
         return 0;
     }
     if (vms) xen_vm_set_free(vms);
-- 
1.7.0.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]