Page MenuHomeFreeBSD

bhyve: Add an option to prevent automatic restart in monitor mode
ClosedPublic

Authored by bnovkov on Aug 23 2026, 1:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 6, 9:37 PM
Unknown Object (File)
Tue, Oct 6, 1:57 AM
Unknown Object (File)
Mon, Oct 5, 6:04 PM
Unknown Object (File)
Mon, Oct 5, 8:58 AM
Unknown Object (File)
Sun, Oct 4, 11:44 AM
Unknown Object (File)
Sun, Oct 4, 1:04 AM
Unknown Object (File)
Sat, Oct 3, 9:04 PM
Unknown Object (File)
Sat, Oct 3, 8:50 PM

Details

Summary

Monitor mode will currently unconditionally restart the guest if it
reboots, which can be incovenient in certain situations (e.g., resetting
the guest after a panic).

Address this by introducing a way to prevent automatic guest restarts
in monitor mode.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Thank you!

usr.sbin/bhyve/amd64/bhyverun_machdep.c
207

This is a backward compat break, shouldn't we handle the old name with bhyve_cfg_warn()?

usr.sbin/bhyve/bhyve.8
349

You might clarify that this option has no effect unless -M is specified or monitor.enabled is configured.

I think the SIGNAL HANDLING section should also explain how signal handling interacts with monitor mode and the new no_reboot option.

usr.sbin/bhyve/bhyve_config.5
239

You changed this to monitor.enabled.

bnovkov marked 3 inline comments as done.

Address @markj's comments

markj added inline comments.
usr.sbin/bhyve/aarch64/bhyverun_machdep.c
122

Usage message wasn't updated.

usr.sbin/bhyve/riscv/bhyverun_machdep.c
116

Usage message wasn't updated.

This revision is now accepted and ready to land.Thu, Sep 17, 7:52 PM
usr.sbin/bhyve/bhyve.8
349

I think the SIGNAL HANDLING section should also explain how signal handling interacts with monitor mode and the new no_reboot option.

Good point, I'll spin that off into a separate revision.