mirror of https://gitee.com/openkylin/libvirt.git
bhyve: fix domain management
When domain is not persistent, it should be forgotten upon destroying.
This commit is contained in:
parent
86cfa1f603
commit
1ee866cf33
|
@ -753,7 +753,13 @@ bhyveDomainDestroy(virDomainPtr dom)
|
||||||
|
|
||||||
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
|
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
|
||||||
|
|
||||||
|
if (!vm->persistent) {
|
||||||
|
virDomainObjListRemove(privconn->domains, vm);
|
||||||
|
vm = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue