Bhyve: build kernel with vmm

Hello, I'm build kernel with options for Bhyve:
Code:
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
Code:
vmm_load="YES"
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
vm-bhyve
grub2-bhyve
uefi-edk2-bhyve

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
/boot/kernel.old/vmm.ko


I *think* kernel.old is the stock kernel.
 
Guilty:
# cat /etc/make.conf
#MODULES_OVERRIDE =
#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?
 
MODULES_OVERRIDE
(str) Set to a list of modules to build instead of all of
them.
so add vmm
but you can build them all and remove that line
i
 
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
 
No, I don't believe so, at least not without following the below steps. I have since not been using bhyve, so I haven't had a need for this.

From the earlier post (back in 2016), that these steps need followed:
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 ?

If you open up that file, I believe what it is doing is declaring what can be built into the kernel and what files are required for it, compile flags, and what the output file is.
 
Back
Top