mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
libxl: always set vm id to -1 on shutdown
Once a domain has reached the shutdown state, set its ID to -1. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
41b9b71877
commit
219d34cfe2
@ -266,15 +266,15 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
|
|||||||
char *file;
|
char *file;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
vm->def->id = -1;
|
||||||
|
|
||||||
if (priv->deathW) {
|
if (priv->deathW) {
|
||||||
libxl_evdisable_domain_death(priv->ctx, priv->deathW);
|
libxl_evdisable_domain_death(priv->ctx, priv->deathW);
|
||||||
priv->deathW = NULL;
|
priv->deathW = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm->persistent) {
|
if (vm->persistent)
|
||||||
vm->def->id = -1;
|
|
||||||
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
|
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
|
||||||
}
|
|
||||||
|
|
||||||
if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
|
if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
|
||||||
driver->inhibitCallback(false, driver->inhibitOpaque);
|
driver->inhibitCallback(false, driver->inhibitOpaque);
|
||||||
|
Loading…
Reference in New Issue
Block a user