Page MenuHomeFreeBSD

D54760.id.diff
No OneTemporary

D54760.id.diff

diff --git a/stand/lua/config.lua b/stand/lua/config.lua
--- a/stand/lua/config.lua
+++ b/stand/lua/config.lua
@@ -513,6 +513,22 @@
end
end
+-- Auto-load modules required for explicit vfs paths
+-- this allows bhyveload to pass just the env var in
+-- and required modules can be autoloaded, allowing
+-- bhyve to boot from a default FreeBSD install.
+local function enableOptionalRootFSModules()
+ local mountfrom = loader.getenv("vfs.root.mountfrom")
+ if mountfrom == nil then
+ return
+ end
+
+ -- Check for p9fs root and enable virtio_p9fs module
+ if mountfrom:match('^p9fs:') then
+ config.enableModule("virtio_p9fs")
+ end
+end
+
-- Module exports
config.verbose = false
@@ -858,6 +874,7 @@
hook.runAll("kernel.loaded")
print(MSG_MODLOADING)
+ enableOptionalRootFSModules()
status = loadModule(modules, not config.verbose)
hook.runAll("modules.loaded")
return status

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 15, 9:13 AM (15 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27723783
Default Alt Text
D54760.id.diff (899 B)

Event Timeline