Bug 243576 - sysutils/vm-bhyve: module vmm.ko not loading in FreeBSD 13 on AMD64
Summary: sysutils/vm-bhyve: module vmm.ko not loading in FreeBSD 13 on AMD64
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-24 23:50 UTC by gdinolt
Modified: 2020-01-25 03:43 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (churchers)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gdinolt 2020-01-24 23:50:37 UTC
The VM command fails with error:

/usr/local/sbin/vm: ERROR: unable to load vmm.ko!

The error occurs because (at least in FreeBSD 13)

kldstat -qm vmm.ko

returns a value of 1, even if vmm.ko is already loaded.

The error is in /usr/local/lib/vm-bhyve/vm-util

-- vm-util	2020-01-24 15:43:46.495030000 -0800
+++ vm-util-new	2020-01-24 15:44:07.662656000 -0800
@@ -46,7 +46,7 @@
 #
 util::load_module(){
     local _mod="$1"
-    kldstat -qm ${_mod} >/dev/null 2>&1
+    kldstat -qn ${_mod} >/dev/null 2>&1
     if [ $? -ne 0 ]; then
         kldload ${_mod} >/dev/null 2>&1
         [ $? -eq 0 ] || util::err "unable to load ${_mod}.ko!"

I replaced the -qm with -qn, which seems to work at least as far as getting vm to start.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-25 03:43:25 UTC
Thank you for the report and patch. Could you include your proposed patch as an attachment please