Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177535872
D61104.1794654231.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D61104.1794654231.diff
View Options
diff --git a/sys/amd64/conf/OCIBHYVE b/sys/amd64/conf/OCIBHYVE
new file mode 100644
--- /dev/null
+++ b/sys/amd64/conf/OCIBHYVE
@@ -0,0 +1,51 @@
+#
+# OCIBHYVE -- Kernel configuration file for FreeBSD/amd64 bhyve guests
+# that boot with bhyveload(8) and need no modules
+#
+# This is the amd64 twin of sys/arm64/conf/OCIBHYVE. On arm64 bhyve(8)
+# boots the kernel directly as its boot ROM, and nothing can load
+# modules. On amd64 bhyveload(8) loads the kernel, and could load
+# modules too, but a kernel with the same drivers built in boots the
+# same way on both platforms, and skips the module loads. For example:
+#
+# bhyveload -h /path/to/boot -m 256M -c /dev/nmdm0A \
+# -e vfs.root.mountfrom=p9fs:root vm
+# bhyve -s 0,hostbridge -s 1,virtio-9p,root=/path/to/root \
+# -s 2,virtio-rnd -s 31,lpc -l com1,/dev/nmdm0A -m 256M vm
+#
+# where /path/to/boot/kernel/kernel is this kernel.
+#
+# ocibhyve, an OCI runtime that runs each container in a bhyve VM, uses it
+# this way, with the container's root over virtio-9p.
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config
+#
+
+include GENERIC
+include "std.nodebug"
+
+ident OCIBHYVE
+
+# A root file system and volumes shared from the host over virtio-9p.
+options P9FS
+device virtio_p9fs
+
+# Control and data channels to the host.
+device virtio_console
+
+# bhyve's virtio-rnd seeds the random device. Without it, reads of
+# /dev/random wait many seconds for entropy.
+device virtio_random
+
+# Mounts a guest may need, normally loaded as modules.
+options NULLFS
+options FDESCFS
+
+# bhyve has no AT keyboard controller, and probing for one takes about
+# 1.7 seconds.
+nodevice atkbdc
+nodevice atkbd
+nodevice psm
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -131,6 +131,11 @@
kernel configuration in
.Pa sys/arm64/conf
builds such a kernel.
+On amd64 the same configuration in
+.Pa sys/amd64/conf
+builds a kernel with those drivers for
+.Xr bhyveload 8 ,
+so it loads no modules.
.Pp
.Nm
runs until the guest operating system reboots (if
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 11:03 AM (5 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41712366
Default Alt Text
D61104.1794654231.diff (2 KB)
Attached To
Mode
D61104: amd64: Add OCIBHYVE, the twin of the arm64 bhyve guest kernel
Attached
Detach File
Event Timeline