[Bug 286289] bhyveload(8): lack of non-interactive mode

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 22 Apr 2025 17:48:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286289

            Bug ID: 286289
           Summary: bhyveload(8): lack of non-interactive mode
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: novel@FreeBSD.org

When attempting to run bhyveload(8) on a non-valid FreeBSD image, it returns to
a loader prompt, e.g.:

$ sudo /usr/sbin/bhyveload -m 1024 -d /path/to/disk.img myvm
Consoles: userboot  

FreeBSD/amd64 User boot lua, Revision 3.0
ERROR: cannot open /boot/lua/loader.lua: no such file or directory.


Type '?' for a list of commands, 'help' for more detailed help.
OK 

I need to type in "quit" to exit.

If I run the same, but with "-c /dev/null", i.e.:

$ sudo /usr/sbin/bhyveload -c /dev/null -m 1024 -d /path/to/disk.img myvm

It doesn't really help, because bhyveload(8) keeps hanging. This behavior is
not very convenient, esp. when bhyveload(8) is used by scripts or other
external automation.

It would be nice to have a way to instruct bhyveload(8) to exit immediately
when the loader fails, instead of dropping into the loader prompt.

-- 
You are receiving this mail because:
You are the assignee for the bug.