From e670d3941754035f8f9033b8a012b9b17a035551 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Fri, 30 Jul 2010 19:50:12 +0200 Subject: [PATCH] Update ID after stopping a domain --- 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(+) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 964a3a5b26..913420c42b 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 e5bbdd0d54..bf2d97947a 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 e4afc5a941..7143933d81 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 0a91c7fd97..31fec67b89 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 2262cef093..fb3c91dcdb 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);