Bhyve: build kernel with vmm

Hello, I'm build kernel with options for Bhyve:
device if_bridge 
device tap
device nmdm
It's ok and it works.

But, I can't find anywhere option for vmm(4) like: device vmm.
With this option kernel can't build. My configuration for bhyve works when I add to /boot/loader.conf
But I don't want to use loader.conf and want to build kernel for bhyve with vmm(4).

How to build kernel with vmm.ko?
Thank you, sorry for my bad English.
Last edited by a moderator:


Currently bhyve can only be built as a module. If you need it to be built into the kernel, the appropriate lines would have to be added to sys/conf/files.amd64

Any particular reason why the loader.conf solution won't work ?
loader.conf is works, but i want to compile kernel with same modules.
i compile kernel with modules
device if_bridge
device tap
device nmdm

But.. there is no instruction how to add vmm to kernel.
I have this question too - I have a custom kernel (so that I can do traffic shaping) and need to determine how I can build vmm so that I can also run bhyve. After installing

I still cannot do kldload vmm.

Additionally, looking through /usr/src/sys/conf/NOTES as the kernel configuration instructs, I don't see anything about vmm.

That said, a quick find and I can see vmm in /usr/src/sys/amd64/vmm. But, I don't know if that is what I want and if so, how to "enable" it :).

Please help.
It certainly isn't the CPU because I swapped hard drives and that is running my workstation build (stock kernel) and I have bhyve working just fine there. My router build requires a custom kernel just so I can do traffic shaping, otherwise, I'd use a stock kernel.
kldload: can't load vmm: No such file or directory

# find /boot | grep vmm

I *think* kernel.old is the stock kernel.
# cat /etc/make.conf
#MODULES_OVERRIDE=zfs opensolaris geom_eli aesni acpi_video acpi_wmi pf mac_ntpd
#MODULES_OVERRIDE=zfs opensolaris geom_eli aesni acpi pf mac_ntpd
MODULES_OVERRIDE=zfs opensolaris geom aesni acpi pf mac_ntpd

What should be in there? vmm?
(str) Set to a list of modules to build instead of all of
so add vmm
but you can build them all and remove that line
you can go to /sys/modules/vmm and make all install
or if you track 13-RELEASE you can just copy it from kernel.old