Bhyve is designed to trap a kill (term) signal and trigger acpi poweroff, so
this is the documented and intended way to power off a guest
From the man page:
SIGNAL HANDLING
bhyve deals with the following signals:
SIGTERM Trigger ACPI poweroff for a VM
This definitely works and is completely reliable with most guests. Vm-bhyve
sends it twice as this seemed to get Windows to respond to the request much
more consistently and it would often appear to completely ignore a single kill
command. I don't know why this is the case though or whether other hypervisors
do something different when requesting a shutdown compared to what bhyve does.
Simply triggering acpi poweroff "should" be enough.
Matt
-----Original Message-----
From: [email protected]
<[email protected]> On Behalf Of Jonathan Vasquez
Sent: 22 September 2025 17:12
To: [email protected]
Subject: Re: GPU Passthrough on FreeBSD 14.3 (AMD Radeon RX 6900 XT and Windows
10 Pro)
The machine ran for 22+ hours with no issues. I decided today to do a fresh
restart of the host and the vm to continue testing the "deterministic
stability" of the setup. A few minutes after it started, the VM exited with a
0x88. This is a new error code that I haven't seen before. I then rebooted the
host/vm again and so far it's been running fine for the past 1h27m on idle. So
the stability still seems to be MUCH better than when I was using the
multi-functional device on 18/0/0 for the USB controller. Using the 13/0/0 USB
controller (that isn't multi-functional) has massively increased stability. I'm
not expecting the VM to be perfectly stable for 365 days 24/7 given that even
regular "real" machines also act weird / have issues every once in a while.
I've uploaded some of the crashes I got back when I had the 18/0/0 setup which
was giving me more frequent crashes with error 0x60, and I've also posted the
one I got today after the reboot with 0x88. I'm not sure if this is enough
because it's hard to get debug information from the console output that bhyve
is displaying. Usually when the VM crashes I just see my console say:
exited with NDELAY mode or something like that. Which is the same message I see
when I do a regular shut down. So not very helpful.
You can find the output of "bhyvectl --vm=<name> --get-all" (which includes
--get-exit-reason) here: https://xyinn.org/freebsd/files/gpu_pass/bhyve_crashes/
also, does anyone know how I can send the ACPI shutdown signal to my bhyve VM?
I looked at the source code for vm-bhyve, and I just see it does a regular
'kill'. I also saw some people online recommending to do a "pkill bhyve", but
regardless of what I do, doing a kill/pkill on the PID running my bhyve vm
doesn't actually do anything. The VM still continues functioning perfectly
fine. I would like to be able to shutdown the machine from the host so I can do
a graceful shutdown. I can easily run my start up script by adding:
@reboot root /path/to/gaming/script.sh
in /etc/crontab, and that works fine, but I can't get it a signal from the host
to the vm so I can automate the shutdown counterpart.
Thank you!