On Sun, Jul 12, 2026 at 09:32:30 +0200, Roman Bogorodskiy wrote:
> Current cleanup routine for the domain start errors misses quite a few
> important steps. It does not set the proper domain state, it does not
> clean up sockets and so forth. The only thing it does is destroying of
> the actual domain and performing network cleanup.
> 
> To properly clean all resources, replace running
> virBhyveProcessBuildDestroyCmd() command with executing
> virBhyveProcessStop() which already does the necessary steps.
> 
> Extend virBhyveProcessStop() with the forceCleanup boolean argument
> which instructs it not to error out on some checks to account for
> inconsistent state after the partial startup.
> 
> Signed-off-by: Roman Bogorodskiy <[email protected]>
> ---
>  src/bhyve/bhyve_driver.c  |  2 +-
>  src/bhyve/bhyve_monitor.c |  6 ++--
>  src/bhyve/bhyve_process.c | 68 ++++++++++++++++++++++++---------------
>  src/bhyve/bhyve_process.h |  3 +-
>  4 files changed, 48 insertions(+), 31 deletions(-)

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to