BHYVELOAD(8)
β¨ bhyveload(8) β load a FreeBSD guest inside a bhyve virtual machine β¨
okay bestie, welcome to the bhyveload(8) page from the System Managerβs Manual. This is the load-a-FreeBSD-guest-inside-a-bhyve(4)-virtual-machine situation, and yes, itβs giving main character energy. π
πΈ NAME πΈ
bhyveload β load a FreeBSD guest inside a bhyve(4) virtual machine. No cap, thatβs the whole vibe of this icon. π
β SYNOPSIS β
bhyveload [-C] [-S] [-c cons-dev] [-d disk-path] [-e name=value]
[-h host-path] [-l os-loader] [-m memsize[K|k|M|m|G|g|T|t]]
vmname
π¦ DESCRIPTION π¦
So bhyveload is used to load a FreeBSD guest inside a bhyve(4) virtual machine. Thatβs the assignment. π«Ά
bhyveload is based on loader(8) and will present an interface identical to the FreeBSD loader on the userβs terminal. This behavior can be changed by specifying a different OS loader.
The virtual machine is identified as vmname and will be created if it does not already exist. Iconic, honestly.
π OPTIONS π
The following options are available, bestie β collect them all: β¨
-c cons-devβcons-devis atty(4)device to use forbhyveloadterminal I/O.
The text string "stdio" is also accepted and selects the use of unbuffered standard I/O. This is the default value. Lowkey the default bestie.
-d disk-pathβ Thedisk-pathis the pathname of the guestβs boot disk image.-e name=valueβ Set the FreeBSD loader environment variablenametovalue.
The option may be used more than once to set more than one environment variable. Environment variable stacking? We love to see it.
-h host-pathβ Thehost-pathis the directory at the top of the guestβs boot filesystem.-l os-loaderβ Specify a different OS loader. By defaultbhyveloadwill use/boot/userboot.so, which presents a standard FreeBSD loader.-m memsize[K|k|M|m|G|g|T|t]βmemsizeis the amount of memory allocated to the guest.
The memsize argument may be suffixed with one of K, M, G or T (either upper or lower case) to indicate a multiple of Kilobytes, Megabytes, Gigabytes or Terabytes respectively.
memsize defaults to 256M. β¨
-Cβ Include guest memory in the core file whenbhyveloaddumps core. This is intended for debugging an OS loader as it allows inspection of the guest memory.-Sβ Wire guest memory.
π EXAMPLES π
To create a virtual machine named freebsd-vm that boots off the ISO image /freebsd/release.iso and has 1GB memory allocated to it:
bhyveload -m 1G -d /freebsd/release.iso freebsd-vm
To create a virtual machine named test-vm with 256MB of memory allocated, the guest root filesystem under the host directory /user/images/test and terminal I/O sent to the nmdm(4) device /dev/nmdm1B:
bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm
π§ SEE ALSO π§
Go peek at bhyve(4), nmdm(4), vmm(4), bhyve(8), and loader(8) β all the lore is there. π
π HISTORY π
bhyveload first appeared in FreeBSD 10.0, and was developed at NetApp Inc. Periodt. π
π AUTHORS π
bhyveload was developed by Neel Natu <neel@FreeBSD.org> at NetApp Inc with a lot of help from Doug Rabson <dfr@FreeBSD.org>. Collab royalty, fr fr. π
π BUGS π
bhyveload can only load FreeBSD as a guest. Thatβs the limit, bestie β no cap.
π₯ SECURITY CONSIDERATIONS π₯
Note that in some configurations, bhyveload will execute guest loader scripts in the context of the host machine. Note, however, that bhyveload will enter a capsicum(4) sandbox before it loads the os-loader or executes any loader scripts. On the host filesystem, the sandbox will only have access to the path specified by the -h flag, the contents of the /boot directory if -l was not specified, and the chosen console device. π«Ά
Note that the guest loader scripts are already subject to some limitations that are not relaxed simply because we are running in userland. For instance, any I/O on the loaderβs βhostβ device that can be done in loader scripts is limited to the interface that bhyveload provides, which itself will restrict paths that can be touched to those within a specified -h directory, if any. Access to files within /boot inside the sandbox would require arbitrary code execution in userboot, and userboot is usually provided by the host machine rather than anything that is a part of the guest image. All access to the -h directory as well as /boot is strictly read-only in the sandbox. π
π Thatβs the whole page, bestie β brought to you by the Debian flavor of BHYVELOAD(8), dated January 12, 2024. Stay slaying in your bhyve VM! π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2012 NetApp Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms