Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147480861
D54760.id169977.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
930 B
Referenced Files
None
Subscribers
None
D54760.id169977.diff
View Options
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 loadRootFSModules()
+ 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
@@ -914,4 +930,6 @@
hook.registerType("config.reloaded")
hook.registerType("kernel.loaded")
hook.registerType("modules.loaded")
+-- Load additional root mount plumbing if required
+hook.register("config.loaded", loadRootFSModules)
return config
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 8:13 AM (20 m, 35 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27717271
Default Alt Text
D54760.id169977.diff (930 B)
Attached To
Mode
D54760: loader/lua: auto-load p9fs if vfs.root.mountfrom requires it
Attached
Detach File
Event Timeline
Log In to Comment