[Bug 290735] bhyve resume hangs

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 02 Nov 2025 09:39:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290735

            Bug ID: 290735
           Summary: bhyve resume hangs
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: novel@FreeBSD.org

I'm trying to use suspend/resume in bhyve.

I use FreeBSD 16.0-CURRENT #0 main-n280778-f45608124286 as a host and Ubuntu
25.10 as a guest.

I run the guest using:

bhyve -c 2 -m 4096 -S -A -I -u -H -P -s 0:0,hostbridge -l
bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 1:0,lpc -s
7:0,virtio-blk,/data/img/ubuntu2510.img -s 5:0,fbuf,tcp=127.0.0.1:5957
ubuntu2510

I can verify that the guest works fine, i.e. I can attach to it by VNC and use
it as expected.

Then I suspend it using:

bhyvectl --suspend=/var/run/libvirt/bhyve/ubuntu2510 --vm ubuntu2510

That also works as expected. Then I try to resume it using:

bhyve -r /var/run/libvirt/bhyve/ubuntu2510 -c 2 -m 4096 -S -A -I -u -H -P -s
0:0,hostbridge -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s
1:0,lpc -s 7:0,virtio-blk,/data/img/ubuntu2510.img -s
5:0,fbuf,tcp=127.0.0.1:5957 ubuntu2510

At this point VM freezes. I can connect to VNC, but it only seems to display
the last frame of the previous session, it doesn't react to any inputs. I also
don't see anything on stderr or stdout from bhyve(8).

When I do:

truss -p $bhyvepid

I see that it cycles through:

ioctl(7,VM_RUN,0x2a80700efda8)                   = 0 (0x0)

When in this state I destroy the VM, truss prints out the following before
exiting:

ioctl(7,VM_RUN,0x643205adda8)                    = 0 (0x0)
ioctl(7,VM_RUN,0x64320a9eda8)                    ERR#6 'Device not configured'
ioctl(7,VM_RUN,0x643205adda8)                    ERR#6 'Device not configured'
write(2,"vm_run error -1, errno 6\n",25)         = 25 (0x19)
_umtx_op(0x2df9dae5f488,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x2df9dae5f488,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
write(2,"vm_run error -1, errno 6\n",25)         = 25 (0x19)
_umtx_op(0x641ced8c6a8,UMTX_OP_WAKE_PRIVATE,0x7fffffff,0x0,0x0) = 0 (0x0)
_umtx_op(0x641ced8c6a8,UMTX_OP_WAIT_UINT_PRIVATE,0x3,0x0,0x0) = 0 (0x0)
write(1,"fbuf frame buffer base: 0x643196"...,165) = 165 (0xa5)
<thread 805176 exited>
<thread 805175 exited>
<thread 805180 exited>
<thread 805178 exited>
<thread 805177 exited>
<thread 805179 exited>
<thread 805174 exited>
<thread 805172 exited>
<thread 805171 exited>
<thread 805173 exited>
<thread 804987 exited>
<thread 805187 exited>
_exit(0x4)
process exit, rval = 4


In bhyve output I can see after that:

Unhandled ps2 mouse command 0x0a
Unhandled ps2 mouse command 0x01
Unhandled ps2 mouse command 0x41
Unhandled ps2 mouse command 0x88
vm_run error -1, errno 6
vm_run error -1, errno 6
fbuf frame buffer base: 0x64319600000 [sz 33554432]
Pausing pci devs...
Restoring vm mem...
^M
Restoring pci devs...
Restoring kernel structs...
Resuming pci devs...

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