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,8 +753,14 @@ 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:
|
||||||
virObjectUnlock(vm);
|
if (vm)
|
||||||
|
virObjectUnlock(vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue