[PATCH] bhyve: remove transient domains on shutdown
Currently, transient domains are removed when destroyed. But the shutdown event ends up handled by the monitor which does not remove the domain. Update bhyveMonitorIO() to remove the domain if it's transient and not active. Closes: https://gitlab.com/libvirt/libvirt/-/work_items/922 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- Related TCK change: https://gitlab.com/libvirt/libvirt-tck/-/merge_requests/94 src/bhyve/bhyve_monitor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index 379e588070..dab07ff95f 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -186,6 +186,9 @@ bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNUSED, void *opaque) } } + if (!virDomainObjIsActive(vm) && !vm->persistent) + virDomainObjListRemove(driver->domains, vm); + cleanup: virObjectUnlock(vm); } -- 2.55.0
On Wed, Sep 16, 2026 at 19:19:50 +0200, Roman Bogorodskiy wrote:
Currently, transient domains are removed when destroyed. But the shutdown event ends up handled by the monitor which does not remove the domain.
Update bhyveMonitorIO() to remove the domain if it's transient and not active.
Closes: https://gitlab.com/libvirt/libvirt/-/work_items/922 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- Related TCK change: https://gitlab.com/libvirt/libvirt-tck/-/merge_requests/94
src/bhyve/bhyve_monitor.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
participants (2)
-
Peter Krempa -
Roman Bogorodskiy