提交 219d34cf 编写于 作者: J Jim Fehlig

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: NJim Fehlig <jfehlig@suse.com>
上级 41b9b718
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册