BHYVE_CONFIG(5)
๐ฆ NAME ๐ฆ
okay so bestie, this is the bhyve_config(5) page from the File Formats Manual โ it's all about bhyve_config: bhyve configuration variables. periodt. ๐
โจ DESCRIPTION โจ
bhyve(8) uses a hierarchical tree of configuration variables to describe global and per-device settings. Internal nodes in this tree do not have a value โ only leaf nodes have values. This manual describes the configuration variables understood by bhyve(8). If additional variables are defined, bhyve(8) will ignore them and will not emit errors for unknown variables. However โ plot twist โ these additional variables can be referenced by other variables, as described below. ๐
๐ VARIABLE VALUES ๐
Configuration variable values are stored as strings. A configuration variable value may refer to one or more other configuration values by name. Instances of the pattern %(var) are replaced by the value of the configuration variable var. To avoid unwanted expansion, % characters can be escaped by a leading %.
For example, if a configuration variable disk uses the value /dev/zvol/bhyve/%(name), then the final value of the disk variable will be set to the path of a ZFS volume whose name matches the name of the virtual machine on the pool bhyve. no cap, that's the moment. ๐ธ
Some configuration variables may be interpreted as a boolean value. For those variables, the following case-insensitive values may be used to indicate true:
trueonyes1
The following values may be used to indicate false:
falseoffno0
Some configuration variables may be interpreted as an integer. For those variables, any syntax supported by strtol(3) may be used. ๐ง
๐ GLOBAL SETTINGS ๐
๐งธ Architecture Neutral Settings ๐งธ
okay bestie, these are the global knobs that don't care what architecture you're running, and they are everything when you're setting up a VM. Each one is a config key, so keep the names exactly as written, mwah ๐
nameโ string, default: nothing listed. The name of the VM. Give her a name, she deserves one ๐cpusโ integer, default:1. The total number of virtual CPUs.coresโ integer, default:1. The number of virtual cores in each virtual socket.threadsโ integer, default:1. The number of virtual CPUs in each virtual core.socketsโ integer, default:1. The number of virtual sockets.memory.guest_in_coreโ bool, default:false. Include guest memory in the core file.memory.sizeโ string, default:256M. Guest physical memory size in bytes. The value must be formatted as described inexpand_number(3)๐memory.wiredโ bool, default:false. Wire guest memory.bootromโ path, default: nothing listed. Path to a boot ROM. During initialization of the guest, the contents of this file are copied into the guest's memory. If a boot ROM is present, a firmware interface device is also enabled for use by the boot ROM. very demure, very firmware โจbootvarsโ path, default: nothing listed. Path to boot VARS. The contents of this file are copied beneath the boot ROM. Firmware can write to it to save variables. All variables will be persistent even on reboots of the guest.acpi_tablesโ bool, default:true. Generate ACPI tables.acpi_tables_in_memoryโ bool, default:true.bhyve(8)always exposes ACPI tables byfw_cfg. For backward compatibilitybhyvecopies them into the guest memory as well. This can cause problems if the guest uses the in-memory version, since certain advanced features, such asTPMemulation, are exposed only viafw_cfg. Therefore, it is recommended to set this flag tofalsewhen running Windows guests ๐destroy_on_poweroffโ bool, default:false. Destroy the VM on guest-initiated power-off.gdb.addressโ string, default:localhost. Hostname, IP address, or IPv6 address for the debug server.gdb.portโ integer, default:0. TCP port number for the debug server. If this is set to a non-zero value, a debug server will listen for connections on this port.gdb.waitโ bool, default:false. If the debug server is enabled, wait for a debugger to connect before starting the guest.keyboard.layoutโ string, default: nothing listed. Specify the keyboard layout name with the file name in/usr/share/bhyve/kbdlayout. This value only works when loaded with UEFI mode for VNC, and used a VNC client that don't support QEMU Extended Key Event Message (e.g.TightVNC).pci.enable_barsโ bool, default: not one fixed value. Enable and map PCI BARs before executing any guest code. This setting isfalseby default when using a boot ROM andtrueotherwise.rtc.use_localtimeโ bool, default:true. The real time clock uses the local time of the host. If this is set tofalse, the real time clock uses UTC.uuidโ string, default: nothing listed. The universally unique identifier (UUID) to use in the guest's System Management BIOS System Information structure. If an explicit value is not set, a valid UUID is generated from the host's hostname and the VM name.virtio_msixโ bool, default:true. Use MSI-X interrupts for PCI VirtIO devices. If set tofalse, MSI interrupts are used instead.config.dumpโ bool, default:false. If this value is set totrueafterbhyve(8)has finished parsing command line options, thenbhyve(8)will write all of its configuration variables tostdoutand exit. No VM will be started. periodt, she said what she said ๐bios.vendorโ string, default:BHYVE. This value is used for the guest's System Management BIOS System Information structure.bios.versionโ string, default:14.0. This value is used for the guest's System Management BIOS System Information structure.bios.release_dateโ string, default:10/17/2021. This value is used for the guest's System Management BIOS System Information structure.system.family_nameโ string, default:Virtual Machine. Family the computer belongs to. This value is used for the guest's System Management BIOS System Information structure.system.manufacturerโ string, default:FreeBSD. This value is used for the guest's System Management BIOS System Information structure.system.product_nameโ string, default:BHYVE. This value is used for the guest's System Management BIOS System Information structure.system.serial_numberโ string, default:None. This value is used for the guest's System Management BIOS System Information structure.system.skuโ string, default:None. Stock keeping unit of the computer. It's also called product ID or purchase order number. This value is used for the guest's System Management BIOS System Information structure.system.versionโ string, default:1.0. This value is used for the guest's System Management BIOS System Information structure.board.manufacturerโ string, default:FreeBSD. This value is used for the guest's System Management BIOS System Information structure.board.product_nameโ string, default:BHYVE. This value is used for the guest's System Management BIOS System Information ๐ซถboard.versionโ string, default1.0. Feeds the guest's System Management BIOS System Information structure. ๐งพboard.serial_numberโ string, defaultNone. Same deal: it goes in the guest's System Management BIOS System Information structure.board.asset_tagโ string, defaultNone. Yep, also the guest's System Management BIOS System Information structure.board.locationโ string, defaultNone. Describes where the board sits inside the chassis, and โ say it with me โ this value is used for the guest's System Management BIOS System Information structure. ๐chassis.manufacturerโ string, defaultFreeBSD. Goes into the guest's System Management BIOS System Information structure. ๐ญchassis.versionโ string, default1.0. Into the guest's System Management BIOS System Information structure it goes.chassis.serial_numberโ string, defaultNone. Guest's System Management BIOS System Information structure. You know the drill bestie. ๐chassis.asset_tagโ string, defaultNone. System Management BIOS System Information structure, guest edition.chassis.skuโ string, defaultNone. Stock keeping unit of the chassis โ it's also called product ID or purchase order number, iykyk. And (last time, promise) this value is used for the guest's System Management BIOS System Information structure. ๐ท๏ธ
โจ x86-Specific Settings โจ
Okay so this is the x86 flavour pack, bestie โ every knob below is <italic>format</italic>, <italic>default</italic>, what it does ๐
x86.mptableโ bool, defaulttrue. Generate an MPTable.x86.x2apicโ bool, defaultfalse. Configure the guest's local APICs in x2APIC mode.x86.strictioโ bool, defaultfalse. Exit if a guest accesses an I/O port that is not emulated. By default, writes are ignored and reads return all bits set. ๐ค (strict mode is strict)x86.strictmsrโ bool, defaulttrue. Inject a general protection fault if a guest accesses a Model Specific Register (MSR) that is not emulated. If this isfalse, writes are ignored and reads return zero. ๐จx86.verbosemsrโ bool, defaultfalse. Enable verbose MSR print out. When this option istrue, messages related to reading from (rdmsr) and writing to (wrmsr) MSRs on virtual CPUs will be printed out. This can be useful for debugging purposes. ngl this is the "let me see everything" button ๐x86.vmexit_on_hltโ bool, defaultfalse. Force a VM exit when a guest CPU executes theHLTinstruction. This allows idle guest CPUs to yield the host CPU. ๐x86.vmexit_on_pauseโ bool, defaultfalse. Force a VM exit when a guest CPU executes thePAUSEinstruction.
๐ DEVICE SETTINGS ๐
So device settings live under a device node, and the node's name is set by the parent bus of the device. Cute little hierarchy, no cap. ๐๏ธ
๐ PCI Device Settings
PCI devices are described by a device node named pci.bus.slot.function where each of bus, slot, and function are formatted as decimal values with no padding (so like, no zero-padding, bestie โ don't get fancy). Every single PCI device node must contain a configuration variable named device which specifies the device model to use. Here's the roster of supported PCI device models ๐:
hostbridgeโ Provide a simple PCI-Host bridge device. This is usually configured atpci0:0:0and is required by most guest operating systems. Basically the main character of the PCI world. ๐ซถahciโ AHCI storage controller.e1000โ Intel e82545 network interface.fbufโ VGA framebuffer device attached to VNC server.lpcโ LPC PCI-ISA bridge withCOM1-COM416550 serial ports, a boot ROM, and, optionally, a TPM module, afw_cfgtype, and a debug/test device. This device must be configured on bus 0. ๐จhdaโ High Definition audio controller.nvmeโ NVM Express (NVMe) controller.passthruโ PCI pass-through device.uartโ PCI 16550 serial device.virtio-9pโ VirtIO 9p (VirtFS) interface.virtio-blkโ VirtIO block storage interface.virtio-consoleโ VirtIO console interface.virtio-inputโ VirtIO input interface.virtio-netโ VirtIO network interface.virtio-rndโ VirtIO RNG interface.virtio-scsiโ VirtIO SCSI interface.xhciโ Extensible Host Controller Interface (XHCI) USB controller.
๐ฆ USB Device Settings
USB controller devices contain zero or more child USB devices attached to slots. Each USB device stores its settings in a node named slot.N under the controller's device node, where N is the number of the slot the USB device is attached to. Heads up though: USB slot numbers begin at 1. ๐จ Every USB device node must contain a configuration variable named device which specifies the device model to use. The supported USB device models are:
tabletโ A USB tablet device which provides precise cursor synchronization when using VNC. ๐ฑ๏ธโจ
๐ Block Device Settings
Block devices use the settings below to configure their backing store, and these live in the configuration node of the respective device. ๐พ
pathโ string, no default. The path of the file or disk device to use as the backing store.nocacheโ bool, defaultfalse. Disable caching on the backing file by opening the backing file withO_DIRECT.nodeleteโ bool, defaultfalse. Disable emulation of guest trim requests viaDIOCGDELETErequests.syncโ bool, defaultfalse. Write changes to the backing file with synchronous writes.directโ bool, defaultfalse. An alias forsync.roโ bool, defaultfalse. Disable writes to the backing file. ๐sectorsizeโ formatlogical[/physical], no default. Specify the logical and physical sector size of the emulated disk. If the physical size is not specified, it is equal to the logical size. ๐งฎ
๐ง Network Backend Settings
Network devices use the settings below to configure their backend. The backend is the one responsible for passing packets between the device model and a desired destination โ think of it as the group-chat relay bestie. ๐จ Configuring a backend requires setting the backend variable. The type of a backend can either be set explicitly via the type variable, or it can be inferred from the value of backend (she's flexible like that ๐
).
The following types of backends are supported:
tapโ Use thetap(4)interface named inbackendas the backend.netgraphโ Use anetgraph(4)socket hook as the backend. This backend uses these additional variables:pathโ string, no default. The name of thenetgraph(4)destination node.peerhookโ string, no default. The name of the destination hook.socketโ string, no default. The name of the createdng_socket(4)node.hookโ string, defaultvmlink. The name of the source hook on the createdng_socket(4)node.
netmapโ Usenetmap(4)either on a network interface or a port on avale(4)bridge as the backend. The value ofbackendis passed tonm_opento connect to a netmap port. ๐slirpโ Use theslirpbackend to provide a userspace network stack. Thehostfwdvariable is used to configure how packets from the host are translated before being sent to the guest. ๐hostfwdโ format: string, no default. It's a semicolon-separated list of host forwarding rules, and each rule looks likeproto:haddr:hport-gaddr:gport, whereprotois eithertcporudp. And here's the cute part: if the guest address is equal to the empty string, packets get forwarded to the first DHCP-assigned address in the guest. ๐ซ
If type isn't specified explicitly, it gets inferred from backend based on these patterns, bestie:
tapNโtapvmnetNโtapnetgraphโnetgraphnetmap:interfaceโnetmapvalebridge:portโnetmap
๐ UART Device Settings ๐
pathโ format: path, no default. This is the backend device for the serial port. It's either the pathname of a character device, orstdioto use the standard input and output of thebhyve(8)process. Classic either/or, iconic behavior. โจtcpโ format:[IP:]port, no default. TCP address to listen on for remote connections. The IP address must be given as a numeric address (no names, she's picky ๐ ). IPv6 addresses must be enclosed in square brackets and supports scoped identifiers as described ingetaddrinfo(3).
๐ธ Host Bridge Settings ๐ธ
pcireg.*โ format: integer, no default. Values of PCI register. The lineup:vendorโ integer โ default0x1275deviceโ integer โ default0x1275
๐ AHCI Controller Settings ๐
Okay so AHCI controller devices contain zero or more ports, and each one provides a storage device. Every port stores its settings in a node named port.N under the controller's device node โ and the N values are formatted as successive decimal values starting with 0. So port.0, port.1, port.2, you get it. ๐ฆ
On top of the block device settings described above, each port supports these:
typeโ format: string, no default. The type of storage device to emulate. Must be set to eithercdorhd. No third option, she said what she said. ๐คnmrrโ format: integer, default0. Nominal Media Rotation Rate, also known as RPM. A value1of indicates that the device is a solid state drive, i.e, non-rotational. (That's literally how the manpage says it โ "a value 1 of indicates" โ I'm not touching it, it's part of the lore now ๐)serโ format: string, default: generated. Serial number of up to twenty characters. A default serial number is generated using a hash of the backing store's pathname. She makes her own, she doesn't need you. โจrevโ format: string, default001. Revision number of up to eight characters.modelโ format: string, no default. Model number of up to forty characters. Separate default model strings are used forcdandhddevice types โ so they don't even share a default, very independent of them. ๐ซถ
๐ e1000 Settings ๐
In addition to the network backend settings, Intel e82545 network interfaces support these variables:
macโ format: MAC address, default: generated. The MAC address. If you don't specify it, the MAC address is derived from a fixed OUI, and the remaining bytes from an MD5 hash of the slot and function numbers and the device name. If you do specify it, it must be a unicast MAC address. No funny business. ๐ฅ
๐ผ๏ธ Frame Buffer Settings ๐ผ๏ธ
waitโ format: bool, defaultfalse. Wait for a remote connection before starting the VM. She'll wait for you, bestie. ๐ฅบrfbโ format:[IP:]port, default127.0.0.1:5900. TCP address to listen on for remote connections. The IP address must be given as a numeric address. IPv6 addresses must be enclosed in square brackets and support scoped identifiers as described ingetaddrinfo(3). A bare port number may be given, in which case the IPv4 localhost address is used. Convenient fr fr.rfbโ format:unix:my/unix.sock, no default. Alternatively, provide a path to a UNIX domain socket. Yes,rfbshows up twice โ she contains multitudes. ๐vgaโ format: string, defaultio. VGA configuration. More details are provided inbhyve(8)โ go read that one too, I'm serious. ๐wโ format: integer, default1024. Frame buffer width in pixels.hโ format: integer, default768. Frame buffer height in pixels.passwordโ format: string, no default. Password to use for VNC authentication.
โ ๏ธ Heads up: this type of authentication is known to be cryptographically weak and is not intended for use on untrusted networks. I'm not being dramatic, that's literally in the manpage โ do not take this to a coffee shop wifi. ๐
๐ง High Definition Audio Settings ๐ง
playโ format: path, no default. Host playback device, typically/dev/dsp0.recโ format: path, no default. Host recording device, typically/dev/dsp0.
Both start at /dev/dsp0, so yes, playback and recording are matching. Couple goals honestly. ๐
๐ง LPC Device Settings ๐ง
Small plot twist: the LPC bridge stores its configuration under a top-level lpc node rather than under the PCI LPC device's node. (Not like the others, she's built different. Periodt.) These nodes are available under lpc:
com1โ format: node, no default. Settings for the COM1 serial port device.com2โ format: node, no default. Settings for the COM2 serial port device.com3โ format: node, no default. Settings for the COM3 serial port device.com4โ format: node, no default. Settings for the COM4 serial port device.fwcfgโ format: string, defaultbhyve. The fw_cfg type to be used. Supported values arebhyvefor fwctl andqemufor fw_cfg. Pick your fighter. โ๏ธpc-testdevโ format: bool, defaultfalse. Enable the PC debug/test device.pcireg.*โ format: integer, no default. Values of PCI register. It also accepts the valuehostto use the pci id of the host system. This value is required for the Intel GOP driver to work properly โ so if the graphics are acting up, this is your girl. ๐ซถ The registers:vendorโ default0x8086deviceโ default0x7000revidโ default0subvendorโ default0subdeviceโ default0
๐ TPM Device Settings ๐
Same energy as LPC: the TPM device stores its configuration under a top-level tpm node rather than under the LPC TPM device's node. Only one TPM device is supported โ one and only one, she's monogamous like that. ๐ Available under tpm:
tpm.pathโ format: string, no default. Path to the TPM backend. Depending on thetpm.type, this is either the host TPM device, typically/dev/tpm0, or any UNIX domain socket on which aswtpmprocess is listening.tpm.typeโ format: string, no default. Type of the TPM device passed to the guest. This can be eitherpassthruto use the host TPM devices, orswtpmto connect to a runningswtpmprocess.tpm.versionโ format: string, default2.0. Version of the TPM device according to the TCG specification. Currently, only version 2.0 is supported โ so don't go asking for anything else, it's not happening. ๐ญ
๐ NVMe Controller Settings ๐
Each NVMe controller supports a single storage device. The device can be backed either by a memory disk described by the ram variable, or a block device using the block device settings described above. In addition, each controller supports the following settings:
maxq(integer, default:16) โ the max number of I/O submission + completion queue pairs. yes, pairs. it's giving matched-set energy ๐ฅqsz(integer, default:2058) โ how many elements live in each I/O queue.2058, iconic number, no notes.ioslots(integer, default:8) โ the maximum number of concurrent I/O requests. eight lanes, don't clog them ๐ญsectsz(integer, no default) โ the sector size. it can literally only be one of512,4096, or8192. devices backed by a memory disk default to4096; devices backed by a block device just steal the block device's own sector size as their default. lowkey flexible like that ๐ser(string, no default) โ the serial number, up to twenty characters bestie. and if you don't give one? a default serial number gets generated using a hash of the device's PCI address. it makes its own โจeui64(integer, no default) โ the IEEE Extended Unique Identifier. if no EUI is provided, a default is generated using a checksum of the device's PCI address. again: it handles it ๐dsm(string, default:auto) โ whether or not to advertise Dataset Management support. must be one of"auto","enable", or"disable". the"auto"setting only advertises support if the backing store supports resource freeing, for example via TRIM. she checks first, she's polite ๐ram(integer, no default) โ if set, allocate a memory disk as the backing store. the value of this variable is the size of the memory disk in megabytes. set it and it's ram-disk o'clock ๐ง
๐ PCI Passthrough Settings ๐
fr fr: the ppt(4) device driver must be attached to the PCI device being passed through. no driver, no passthrough, periodt.
the device you're passing through can be identified either by name or by its host PCI bus location. pick your fighter ๐
bus(integer, no default) โ host PCI bus address of the device to pass through.slot(integer, no default) โ host PCI slot address of the device to pass through.func(integer, no default) โ host PCI function address of the device to pass through.pptdev(string, no default) โ name of appt(4)device to pass through.rom(path, no default) โ ROM file of the device, which will be executed by OVMF to init the device. OVMF does the little startup ritual ๐
๐ฆ VirtIO 9p Settings ๐ฆ
each VirtIO 9p device exposes a single filesystem from a host path. one device, one share, that's the rule ๐ซถ
sharename(string, no default) โ the share name exposed to the guest.path(path, no default) โ the path of a directory on the host to export to the guest.ro(bool, default:false) โ if true, the guest filesystem is read-only. protect the host files, bestie ๐ก๏ธ
โญ VirtIO Block Device Settings โญ
in addition to the block device settings described above, each VirtIO block device supports the following settings:
ser(string, default: generated) โ serial number of up to twenty characters. a default serial number is generated using a hash of the backing store's pathname. notice that's the pathname, not the PCI address โ different hash source, iykyk ๐
๐ VirtIO Console Device Settings ๐
each VirtIO Console device contains one or more console ports. each port stores its settings in a node named "port.N" under the controller's device node โ and the N values are formatted as successive decimal values starting with 0. so port.0, port.1, port.2, you get it ๐
each port supports the following settings:
name(string, no default) โ the name of the port exposed to the guest.path(path, no default) โ the path of a UNIX domain socket providing the host connection for the port. socket-based connection, very demure ๐
๐ธ VirtIO Input Interface Settings ๐ธ
each VirtIO Input device contains one input event device. all input events of the input event device are send to the guest by the VirtIO Input interface. VirtIO Input Interfaces support the following variables:
path(path, no default) โ the path of the input event device exposed to the guest.
๐ VirtIO Network Interface Settings ๐
in addition to the network backend settings, VirtIO network interfaces support the following variables:
mac(MAC address, default: generated) โ the MAC address. if not specified, it's derived from a fixed OUI, and the remaining bytes from an MD5 hash of the slot and function numbers and the device name. if specified, it must be a unicast MAC address. no multicast shenanigans, she said what she said ๐mtu(integer, default:1500) โ the largest supported MTU advertised to the guest. classic1500, the main character of MTUs ๐
๐ฅ VirtIO SCSI Settings ๐ฅ
dev(path, no default) โ the path of a CAM target layer (CTL) device to export:/dev/cam/ctl[pp.vp]. keep that path exactly as written, bestie,[pp.vp]and all ๐ซกiid(integer, default:0) โ initiator ID to use when sending requests to the CTL port.
๐ SEE ALSO ๐
expand_number(3), getaddrinfo(3), strtol(3), netgraph(4), netmap(4), ng_socket(4), tap(4), vale(4), vmnet(4), bhyve(8)
like, go read these too. they're the supporting cast and honestly they ate ๐
aaaand that's the whole page, bestie โ you made it to the end, I'm so proud of you ๐ฅน๐ this one's from Debian, dated December 26, 2025, and it's the BHYVE_CONFIG(5) page, so if you ever need to double-check a variable you know exactly where to find me. mwah ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- ๐ the page's license: BSD-2-Clause
- Copyright (c) 2021 John H. Baldwin <jhb@FreeBSD.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms