Bhyve in a jail on hardenedbsd? reddit / freebsd ---------------------------------------------------------------------- Pfremm · 2021-05-20 01:58 I have seen articles showing how to get bhyve to run inside a jail but I am having issues with the jail not seeing the vmm.ko kernel module. My jail.conf looks like what’s in this article https://neirac.byteswizards.com/posts/run-bhyve-in-freebsd-jails/ Any ideas? ---------------------------------------------------------------------- uszeraj · 2021-05-20 08:57 I had no idea this could be done. I'm running NanoBSD and couldn't find a way yet to include the grub2-bhyve and vm-bhyve into my image. As for your problem, it isn't the jail that loads the module. The main hosts loads the vmm.ko module and the jail will be able to control it by having access to the /dev/vmm device. This is done by creating a devfs rule as described in the article. Please check if the devices that you have inside your jail match the ones you've defined on the /etc/devfs.rules ruleset. ---------------------------------------------------------------------- shawn_webb · 2021-05-20 21:21 In HardenedBSD, jails aren't permitted to get information about which kernel modules are loaded. I'm guessing that vm-bhyve probably checks to see if the vmm.ko kernel module is loaded, auto-loading it if it isn't. You'll probably want to file a bug report with vm-bhyve. Have vm-bhyve check if it's in a jail, and if it is, skip the auto-loading logic. ---------------------------------------------------------------------- Pfremm · 2021-05-20 22:28 Is that set via some setting? I’m new to bsd in general so partially just curious what is turning that visibility off? ---------------------------------------------------------------------- shawn_webb · 2021-05-20 23:01 This commit from a few years ago hardened the kernel module interface: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/- /commit/37a8b2de291f4cb84b5cac86aab8e5edcaa75176 So in order for jails to be able to have any visibility into kernel modules, you'll need to compile a custom kernel without the PAX_HARDENING configuration option.