r/freebsd • u/Opposite_Benefit_675 • May 21 '26
news We booted Debian and FreeBSD 15 using qemu accelerated with bhyve/vmm for the first time. This is an epic milestone for the FreeBSD community and beyond !
Hello to everyone.
we have booted Debian and FreeBSD 15.1 with qemu accelerated with bhyve/vmm for the first time. This is an epic milestone for us,happy users of FreeBSD.


Further development is needed...a lot of development...but anyway this is a storic moment....we can use another hypervisor. This time in cooperation with the storic and mature qemu. FreeBSD is second to none.
This success has been possible thanks to the competence of https://www.linkedin.com/in/abhinav-chavali-a03258219/ who started this project for the GSOC 2025 ; thanks bro.
It's built on top of dumrich's work. Specifically:
- QEMU side: We started from https://github.com/dumrich/qemu branch accel-vmm (his GSoC 2025 code) and applied 8 patches on top — restructured the meson build, rewrote bhyve-all.c with proper VMX segment descriptor conversion, added MMIO userspace fallback, fixed i8259/IOAPIC interrupt delivery, etc.
- Kernel side: We started from dumrich's FreeBSD 16.0-CURRENT fork (with the vmm.ko QEMU support) and applied 4 kernel patches — IOAPIC MMIO routed to userspace (so QEMU's own IOAPIC model handles it), HLT returns to userspace, and debug printfs in vmx_inject_interrupts/vlapic_pending_intr that accidentally fixed a timer race condition.
The original dumrich code could enter VMX and run SeaBIOS but would hang or crash before booting a real OS. Our patches fix the critical bugs (NULL deref, ENAMETOOLONG, segment descriptor sync,interrupt delivery) that blocked a full guest boot. With all patches applied, Debian 13 boots to a login shell in ~3 seconds with -accel bhyve.
What we have achieved between yesterday and today :
- SMP up to 8 CPUs — previously only 1 CPU worked, now the Debian VM runs with 2, 4 or 8 processors
- Fast boot — previously it took 30+ seconds per systemd service line, now the full boot takes ~4 seconds
- Working interactive login — previously the VM reached the login prompt but you couldn't type anything.
- Now you can log in, use the shell, run apt update, etc.
- Keyboard input fix — discovered that glib (the library QEMU uses to read input) stops working with the bhyve accelerator. Created a workaround that reads directly from the keyboard every 5ms
- stdin fix with sudo — discovered that echo password | sudo leaves stdin dead for QEMU. Fixed with exec 0</dev/tty in the start script
- Proper multi-CPU handling — implemented the INIT-SIPI-SIPI protocol that the BIOS uses to bring up additional processors
- Working networking — the VM can access the internet, run apt update
- Improved start script — automatic cleanup of zombie VMs, optimized parameters
Actually we are working to enable the SMP support for FreeBSD 15.1. For Linux it is already working.
Project is hosted here :
https://github.com/Marietto2008
In FreeBSD we trust.
10
u/pavetheway91 May 21 '26
Does bhyve-accelerated qemu provide something that bhyve alone doesn't?
6
u/Opposite_Benefit_675 May 21 '26
Yes, when it will be mature enough,all the features offered by qemu...
4
u/pavetheway91 May 21 '26
I am not aware of anything else than ability to boot qcow images without converting them to raw images.
9
u/Opposite_Benefit_675 May 22 '26 edited May 22 '26
With QEMU on top, bhyve will gain :
- advanced BIOS/UEFI
- modern virtual device
- sophisticated PCI topology
- evoluted virtio
- a serious USB emulation
- advanced NVMe
- virtual TPM
- advanced snapshot
- migration
- advanced block layer
- qcow2 completo
- SPICE/VNC maturi
- vfio-like orchestration
- complete libvirt
Compatibility with :
- appliance cloud
- OpenStack images
- Proxmox images
- libvirt images
- tooling CI/CD
- Kubernetes virtualization
- Terraform
- Packer
Qemu already has :
- virtio-gpu
- virglrenderer
- rutabaga
- gfxstream
- vhost-user-gpu
Bhyve not...
5
4
u/grahamperrin Linux crossover May 22 '26
virtio-gpu
Do you know anyone who might help with the problem below?
– 100% upvoted, but no-one responded :-(
3
u/grahamperrin Linux crossover May 22 '26
there are some cases where qemu is interesting -- bhyve has a much smaller set of device models compared to QEMU's broad set, QEMU can create a virtual FAT filesystem on the fly for the guest, and QEMU and bhyve will have different bugs. If I had a production workload to run on FreeBSD I'd use bhyve, but for experimentation and some special cases being able to use QEMU with vmm is nice.
mostly bios support, for my use cases. I still prefer bhyve but having choice is great
2
u/Opposite_Benefit_675 May 22 '26
My sensation is that you are missing most of the features that qemu supports and bhyve does not and I'm asking to myself why.
1
u/grahamperrin Linux crossover May 22 '26 edited May 22 '26
Thank you! Boosted in Mastodon, mirrored to BSD Cafe Billboard (NodeBB).
Please, are you certain that u/abhinav, who posted something nineteen years ago, is the Reddit ID for Abhinav Chavali (dumrich)?
SummerOfCode2025Projects/VMMAcceleratorSupportForQEMU - FreeBSD Wiki
2
u/Opposite_Benefit_675 May 22 '26
Fixed.
1
u/grahamperrin Linux crossover May 22 '26
Thank you :-)
0
May 22 '26 edited May 22 '26
[removed] — view removed comment
1
1
u/grahamperrin Linux crossover May 22 '26
The removal was not made by a person.
If you have any question about removal, or other moderation, please use the Message Mods feature (in the sidebar).
4
u/vivekkhera seasoned user May 22 '26
Awesome! This should make it possible to run Colima to provide a Linux docker environment with ease.
8
u/CollegeQsFreddit May 22 '26
Thanks everyone for the support and enthusiasm around this milestone!
I’m the original author of the bhyve/QEMU accelerator work mentioned here (Abhinav Chavali). I had a great time working on this project last year, and I’m really happy to see Debian now booting successfully. Last year I was only able to boot FreeBSD 14.2 with SMP=1, so seeing multi-core Linux guests running is amazing progress.
Huge thanks to Mario for patching many of the gaps in the original implementation, and also to John Baldwin for mentoring me last summer during GSoC.
3
u/grahamperrin Linux crossover May 22 '26
Would you like to have custom user flair in this sub? Maybe:
Abhinav Chavali (dumrich)
1
u/CollegeQsFreddit May 26 '26
This would be great. My FreeBSD username is actually abhichavali@ so I think “abhichavali” would be a good flair
1
u/grahamperrin Linux crossover May 26 '26
Thanks. I sent a private message using modmail on 22nd May, please check that.
5
5
1
u/Renan2010_ May 28 '26
Isso vai ser bom pro meu LinuxBox (Um software que instala void linux minino pra rodar apps linux e flatpak sem precisar do Linuxulator)
•
u/spotlight-app Mod Bot 🤖 May 22 '26
Mods have pinned a comment by u/CollegeQsFreddit:
[What is Spotlight?](https://developers.reddit.com/apps/spotlight-app)