On 9/28/26 21:25, Roman Bogorodskiy wrote:
In order to start unprivileged VMs, bhyve(8) requires using the monitor mode, which is enabled by the '-M' argument.
In monitor mode bhyve runs a monitor process and a VM process. We already know the monitor process ID, but we also need to know the VM process ID (e.g. for reconnecting or shutting it down with a signal).
Thus, also probe the bhyvectl(8)'s "--get-vm-pid" argument, which returns a VM's PID.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_capabilities.c | 29 +++++++++++++++++++++++++++++ src/bhyve/bhyve_capabilities.h | 2 ++ 2 files changed, 31 insertions(+)
diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h index 0302b68e22..c790c57ba7 100644 --- a/src/bhyve/bhyve_capabilities.h +++ b/src/bhyve/bhyve_capabilities.h @@ -58,6 +58,8 @@ typedef enum { BHYVE_CAP_ACPI = 1 << 12, BHYVE_CAP_NUMA = 1 << 13, BHYVE_CAP_RCTL = 1 << 14, + BHYVE_CAP_MONITOR = 1 << 15, + BHYVE_CAP_GET_VMPID = 1 << 16, } virBhyveCapsFlags;
int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
This works for now, but eventually this needs to be switched to virBitmap - just like we did for virQEMUCapsFlags. Michal