From time to time I use VMs on my system, managed with sysutils/vm-bhyve, and now that I'm looking into possibily contributing a few ports I might utilize Bhyve more to run a VM for development/testing (or possibly a jail).
I already have a couple of VMs setup on my box, at the time when I setup these VMs everything worked fine, but now something seems to be wrong with the vmm kernel module on my system. The module is getting automatically loaded at boot, can be verified with
When I try to run a command with vm-bhyve, which tries to verify if the vmm kernel module is loaded into memory or not, fails because it fails to detect the module being loaded and tries to load it again. Interestingly if I run
Now my understanding is that the module should be returned with both arguments rather than just the "-n" flag. Now if I manually unload the kernel module some commands, like listing VMs works but I'm not able to start one:
Because it has been a long time since I last ran a VM under bhyve, the only changes I recall that may have affected this are: Upgrading from FreeBSD 12.0-p2 -> 12.0-p3, updating my BIOS firmware, upgrading vm-byhve to v1.3.0 (none of the changes affecting module detection though). Looking through /var/log/messages I don't see any obvious errors there regarding the module when it gets loaded/unloaded and I don't know where else to check to try and debug this.
I already have a couple of VMs setup on my box, at the time when I setup these VMs everything worked fine, but now something seems to be wrong with the vmm kernel module on my system. The module is getting automatically loaded at boot, can be verified with
kldstat
Code:
[/u/h/vendion]─> kldstat | grep vmm
59 1 0xffffffff83814000 537460 vmm.ko
When I try to run a command with vm-bhyve, which tries to verify if the vmm kernel module is loaded into memory or not, fails because it fails to detect the module being loaded and tries to load it again. Interestingly if I run
kldstat -m vmm
or kldstat -n vmm
I get different output:
Code:
[/u/h/vendion]─> kldstat -m vmm
kldstat: can't find module vmm: No such file or directory
[/u/h/vendion]─> kldstat -n vmm
Id Refs Address Size Name
59 1 0xffffffff83814000 537460 vmm.ko
Now my understanding is that the module should be returned with both arguments rather than just the "-n" flag. Now if I manually unload the kernel module some commands, like listing VMs works but I'm not able to start one:
Code:
[/u/h/vendion]─> sudo vm list
/usr/local/sbin/vm: ERROR: unable to load vmm.ko!
[/u/h/vendion]─> sudo kldunload vmm
[/u/h/vendion]─> sudo vm list
NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE
arch default grub 2 2G - No Stopped
arch-test default grub 2 2G - No Stopped
fbsd-current default bhyveload 2 4G - No Stopped
pacbsd default bhyveload 2 2G - No Stopped
[/u/h/vendion]─>
Because it has been a long time since I last ran a VM under bhyve, the only changes I recall that may have affected this are: Upgrading from FreeBSD 12.0-p2 -> 12.0-p3, updating my BIOS firmware, upgrading vm-byhve to v1.3.0 (none of the changes affecting module detection though). Looking through /var/log/messages I don't see any obvious errors there regarding the module when it gets loaded/unloaded and I don't know where else to check to try and debug this.
Last edited: