xref: /illumos-gate/usr/src/man/man5/bhyve_config.5 (revision 1be29f6873e7eda479384e40705e25866a793ab4)
1.\" SPDX-License-Identifier: BSD-2-Clause
2.\"
3.\" Copyright (c) 2021 John H. Baldwin <jhb@FreeBSD.org>
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" Portions Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
27.\"
28.Dd November 14, 2024
29.Dt BHYVE_CONFIG 5
30.Os
31.Sh NAME
32.Nm bhyve_config
33.Nd "bhyve configuration variables"
34.Sh DESCRIPTION
35.Xr bhyve 8
36uses a hierarchical tree of configuration variables to describe global and
37per-device settings.
38Internal nodes in this tree do not have a value,
39only leaf nodes have values.
40This manual describes the configuration variables understood by
41.Xr bhyve 8 .
42If additional variables are defined,
43.Xr bhyve 8
44will ignore them and will not emit errors for unknown variables.
45However, these additional variables can be referenced by other
46variables as described below.
47.Sh VARIABLE VALUES
48Configuration variable values are stored as strings.
49A configuration variable value may refer to one or more other
50configuration values by name.
51Instances of the pattern
52.Sq % Ns Pq Ar var
53are replaced by the value of the configuration variable
54.Va var .
55To avoid unwanted expansion,
56.Sq %
57characters can be escaped by a leading
58.Sq % .
59For example,
60if a configuration variable
61.Va disk
62uses the value
63.Pa /dev/zvol/bhyve/%(name) ,
64then the final value of the
65.Va disk
66variable will be set to the path of a ZFS volume whose name matches
67the name of the virtual machine on the pool
68.Pa bhyve .
69.Pp
70Some configuration variables may be interpreted as a boolean value.
71For those variables the following case-insensitive values may be used to
72indicate true:
73.Pp
74.Bl -bullet -offset indent -compact
75.It
76true
77.It
78on
79.It
80yes
81.It
821
83.El
84.Pp
85The following values may be used to indicate false:
86.Pp
87.Bl -bullet -offset indent -compact
88.It
89false
90.It
91off
92.It
93no
94.It
950
96.El
97.Pp
98Some configuration variables may be interpreted as an integer.
99For those variables,
100any syntax supported by
101.Xr strtoul 3C
102may be used.
103.Sh GLOBAL SETTINGS
104.Ss Architecture Neutral Settings
105.Bl -column "memory.guest_in_core" "integer" "Default"
106.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
107.It Va name Ta string Ta Ta
108The name of the VM.
109.It Va cpus Ta integer Ta 1 Ta
110The total number of virtual CPUs.
111.It Va cores Ta integer Ta 1 Ta
112The number of virtual cores in each virtual socket.
113.It Va threads Ta integer Ta 1 Ta
114The number of virtual CPUs in each virtual core.
115.It Va sockets Ta integer Ta 1 Ta
116The number of virtual sockets.
117.It Va memory.size Ta string Ta 256M Ta
118Guest physical memory size.
119The size argument may be suffixed with one of K, M, G or T (either upper
120or lower case) to indicate a multiple of kibibytes, mebibytes, gibibytes,
121or tebibytes.
122If no suffix is given, the value is assumed to be in mebibytes.
123.It Va memory.wired Ta bool Ta false Ta
124Wire guest memory.
125.It Va bootrom Ta path Ta Ta
126Path to a boot ROM.
127During initialization of the guest, the contents of this file are copied into
128the guest's memory.
129If a boot ROM is present, a firmware interface device is
130also enabled for use by the boot ROM.
131.It Va bootvars Ta path Ta Ta
132Path to boot VARS.
133The contents of this file are copied beneath the boot ROM.
134Firmware can write to it to save variables.
135Variables will be persistent across guest reboots.
136.It Va acpi_tables Ta bool Ta false Ta
137Generate ACPI tables.
138.It Va acpi_tables_in_memory Ta bool Ta true Ta
139.Xr bhyve 8
140always exposes ACPI tables by FwCfg.
141For backward compatibility bhyve copies them into the guest memory as well.
142This can cause problems if the guest uses the in-memory version, since certain
143advanced features, such as TPM emulation, are exposed only via FwCfg.
144Therefore, it is recommended to set this flag to false when running Windows
145guests.
146.It Va destroy_on_poweroff Ta bool Ta false Ta
147Destroy the VM on guest-initiated power-off.
148.It Va gdb.address Ta string Ta localhost Ta
149Hostname, IP address, or IPv6 address for the debug server.
150.It Va gdb.port Ta integer Ta 0 Ta
151TCP port number for the debug server.
152If this is set to a non-zero value, a debug server
153will listen for connections on this port.
154.It Va gdb.wait Ta bool Ta false Ta
155If the debug server is enabled, wait for a debugger to connect
156before starting the guest.
157.It Va keyboard.layout Ta string Ta Ta
158Specify the keyboard layout name with the file name in
159.Pa /usr/share/bhyve/kbdlayout .
160This value only works when loaded with UEFI mode for VNC, and when a VNC client
161that doesn't support the QEMU Extended Key Event Message us used.
162.It Va pci.enable_bars Ta bool Ta Ta
163Enable and map PCI BARs before executing any guest code.
164This setting is true by default but can be disabled to work around problems
165with guests that remap BARs themselves
166.Pq e.g. u-boot .
167.It Va rtc.use_localtime Ta bool Ta true Ta
168The real time clock uses the local time of the host.
169If this is set to false, the real time clock uses UTC.
170.It Va uuid Ta string Ta Ta
171The universally unique identifier (UUID) to use in the guest's
172System Management BIOS System Information structure.
173If an explicit value is not set, a valid UUID is generated from
174the host's hostname and the VM name.
175.It Va virtio_msix Ta bool Ta true Ta
176Use MSI-X interrupts for PCI VirtIO devices.
177If set to false, MSI interrupts are used instead.
178.It Va config.dump Ta bool Ta false Ta
179If this value is set to true then, after parsing command line options,
180.Xr bhyve 8
181will write all of its configuration variables to
182.Dv stdout
183and exit.
184No VM will be started.
185.It Va privileges.debug Ta bool Ta false Ta
186Enable debug messages relating to privilege management.
187These messages are sent to
188.Dv stdout .
189.It Va rfb.debug Ta bool Ta false Ta
190Enable debug messages relating to the RFB
191.Pq VNC
192server.
193.It Va viona.debug Ta bool Ta false Ta
194Enable debug messages relating to the accelerated virtio network device.
195These messages are sent to
196.Dv stdout .
197.It Va xhci.debug Ta bool Ta false Ta
198Enable debug messages relating to the emulated XHCI
199.Pq USB
200controller.
201These messages are sent to
202.Dv stderr .
203.It Va bios.vendor Ta string Ta BHYVE Ta
204This value is used for the guest's System Management BIOS System Information
205structure.
206.It Va bios.version Ta string Ta 14.0 Ta
207This value is used for the guest's System Management BIOS System Information
208structure.
209.It Va bios.release_date Ta string Ta 10/17/2021 Ta
210This value is used for the guest's System Management BIOS System Information
211structure.
212.It Va system.family_name Ta string Ta Virtual Machine Ta
213Family the computer belongs to.
214This value is used for the guest's System Management BIOS System Information
215structure.
216.It Va system.manufacturer Ta string Ta illumos Ta
217This value is used for the guest's System Management BIOS System Information
218structure.
219.It Va system.product_name Ta string Ta BHYVE Ta
220This value is used for the guest's System Management BIOS System Information
221structure.
222.It Va system.serial_number Ta string Ta None Ta
223This value is used for the guest's System Management BIOS System Information
224structure.
225.It Va system.sku Ta string Ta None Ta
226Stock keeping unit of the computer.
227It's also called product ID or purchase order number.
228This value is used for the guest's System Management BIOS System Information
229structure.
230.It Va system.version Ta string Ta 1.0 Ta
231This value is used for the guest's System Management BIOS System Information
232structure.
233.It Va board.manufacturer Ta string Ta illumos Ta
234This value is used for the guest's System Management BIOS System Information
235structure.
236.It Va board.product_name Ta string Ta BHYVE Ta
237This value is used for the guest's System Management BIOS System Information
238structure.
239.It Va board.version Ta string Ta 1.0 Ta
240This value is used for the guest's System Management BIOS System Information
241structure.
242.It Va board.serial_number Ta string Ta None Ta
243This value is used for the guest's System Management BIOS System Information
244structure.
245.It Va board.asset_tag Ta string Ta None Ta
246This value is used for the guest's System Management BIOS System Information
247structure.
248.It Va board.location Ta string Ta None Ta
249Describes the board's location within the chassis.
250This value is used for the guest's System Management BIOS System Information
251structure.
252.It Va chassis.manufacturer Ta string Ta illumos Ta
253This value is used for the guest's System Management BIOS System Information
254structure.
255.It Va chassis.version Ta string Ta 1.0 Ta
256This value is used for the guest's System Management BIOS System Information
257structure.
258.It Va chassis.serial_number Ta string Ta None Ta
259This value is used for the guest's System Management BIOS System Information
260structure.
261.It Va chassis.asset_tag Ta string Ta None Ta
262This value is used for the guest's System Management BIOS System Information
263structure.
264.It Va chassis.sku Ta string Ta None Ta
265Stock keeping unit of the chassis.
266It's also called product ID or purchase order number.
267This value is used for the guest's System Management BIOS System Information
268structure.
269.It Va smbios.family Ta string Ta Virtual Machine Ta
270Legacy alias for
271.Va system.family_name ,
272do not use in new configurations.
273.It Va smbios.manufacturer Ta string Ta illumos Ta
274Legacy alias for
275.Va system.manufacturer ,
276do not use in new configurations.
277.It Va smbios.product Ta string Ta BHYVE Ta
278Legacy alias for
279.Va system.product_name ,
280do not use in new configurations.
281.It Va smbios.serial Ta string Ta None Ta
282Legacy alias for
283.Va system.serial_number ,
284do not use in new configurations.
285.It Va smbios.sku Ta string Ta None Ta
286Legacy alias for
287.Va system.sku ,
288do not use in new configurations.
289.It Va smbios.version Ta string Ta 1.0 Ta
290Legacy alias for
291.Va system.version ,
292do not use in new configurations.
293.El
294.Ss x86-Specific Settings
295.Bl -column "x86.vmexit_on_pause" "integer" "Default"
296.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
297.It Va x86.mptable Ta bool Ta true Ta
298Generate an MPTable.
299.It Va x86.x2apic Ta bool Ta false Ta
300Configure guest's local APICs in x2APIC mode.
301.It Va x86.strictio Ta bool Ta false Ta
302Exit if a guest accesses an I/O port that is not emulated.
303By default, writes are ignored and reads return all bits set.
304.It Va x86.strictmsr Ta bool Ta true Ta
305Inject a general protection fault if a guest accesses a Model Specific
306Register (MSR) that is not emulated.
307If this is false, writes are ignored and reads return zero.
308.It Va x86.vmexit_on_hlt Ta bool Ta false Ta
309Force a VM exit when a guest CPU executes the
310.Dv HLT
311instruction.
312This allows idle guest CPUs to yield the host CPU.
313.It Va x86.vmexit_on_pause Ta bool Ta false Ta
314Force a VM exit when a guest CPU executes the
315.Dv PAUSE
316instruction.
317.El
318.Sh DEVICE SETTINGS
319Device settings are stored under a device node.
320The device node's name is set by the parent bus of the device.
321.Ss PCI Device Settings
322PCI devices are described by a device node named
323.Dq pci . Ns Ar bus . Ns Ar slot . Ns Ar function
324where each of
325.Ar bus ,
326.Ar slot ,
327and
328.Ar function
329are formatted as decimal values with no padding.
330All PCI device nodes must contain a configuration variable named
331.Dq device
332which specifies the device model to use.
333The following PCI device models are supported:
334.Bl -tag -width indent
335.It Li hostbridge
336Provide a simple PCI-Host bridge device.
337This is usually configured at pci0:0:0 and is required by most guest
338operating systems.
339.It Li ahci
340AHCI storage controller.
341.It Li e1000
342Intel e82545 network interface.
343.It Li fbuf
344VGA framebuffer device attached to VNC server.
345.It Li lpc
346LPC PCI-ISA bridge with COM1-COM4 16550 serial ports,
347a boot ROM, and, optionally, a TPM module, a fwcfg type and a debug/test device.
348This device must be configured on bus 0.
349.It Li nvme
350NVM Express (NVMe) controller.
351.It Li passthru
352PCI pass-through device.
353.It Li uart
354PCI 16550 serial device.
355.It Li virtio-9p
356VirtIO 9p (VirtFS) interface.
357.It Li virtio-blk
358VirtIO block storage interface.
359.It Li virtio-console
360VirtIO console interface.
361.It Li virtio-net-viona
362Accelerated VirtIO network interface.
363.It Li net-viona
364Legacy VirtIO network interface.
365.It Li virtio-rnd
366VirtIO random number generator interface.
367.It Li xhci
368Extensible Host Controller Interface (XHCI) USB controller.
369.El
370.Ss USB Device Settings
371USB controller devices contain zero or more child USB devices
372attached to slots.
373Each USB device stores its settings in a node named
374.Dq slot. Ns Va N
375under the controller's device node.
376.Va N
377is the number of the slot to which the USB device is attached.
378Note that USB slot numbers begin at 1.
379All USB device nodes must contain a configuration variable named
380.Dq device
381which specifies the device model to use.
382The following USB device models are supported:
383.Bl -tag -width indent
384.It Li tablet
385A USB tablet device which provides precise cursor synchronization
386when using VNC.
387.El
388.Ss Block Device Settings
389Block devices use the following settings to configure their backing store.
390These settings are stored in the configuration node of the respective device.
391.Bl -column "sectorsize" "logical[/physical]" "Default"
392.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
393.It path Ta string Ta Ta
394The path of the file or disk device to use as the backing store.
395.It nocache Ta bool Ta false Ta
396Disable caching on the backing file by opening the backing file with
397.Dv O_DIRECT .
398.It nodelete Ta bool Ta false Ta
399Disable emulation of guest trim requests via
400.Dv DIOCGDELETE
401requests.
402.It sync Ta bool Ta false Ta
403Write changes to the backing file with synchronous writes.
404.It direct Ta bool Ta false Ta
405An alias for
406.Va sync .
407.It ro Ta bool Ta false Ta
408Disable writes to the backing file.
409.It sectorsize Ta Va logical Ns Op / Ns Va physical Ta Ta
410Specify the logical and physical sector size of the emulated disk.
411If the physical size is not specified, it is set to be equal to the logical
412size.
413.El
414.Ss virtio-net-viona Network Backend Settings
415Viona network devices use the following settings to configure their backend.
416.Bl -column "feature_flags" "string" "Default"
417.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
418.It vnic Ta string Ta Ta
419The VNIC to use for the network connection.
420.It feature_mask Ta integer Ta 0 Ta
421Specify a mask to apply to the virtio features advertised to the guest.
422.El
423.Pp
424Viona network devices have the ability to lend out their TX buffers, which
425can occasionally cause issues if they are not returned.
426This will result in the guest not being able to send any network packets,
427including TCP ACKs, resulting in the guest becoming completely unreachable.
428The default has changed to now always copy TX buffers.
429A temporary tunable has been added
430.Pq which will be removed when this has been properly addressed
431to restore the ability for the driver to loan out TX buffers, which is enabled
432by setting the variable
433.Sy viona:viona_default_tx_copy
434to 0 in
435.Xr system 5 .
436.Ss Other Network Backend Settings
437Other network devices use the following settings to configure their backend.
438.Bl -column "feature_flags" "string" "Default"
439.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
440.It vnic Ta string Ta Ta
441The VNIC to use for the network connection.
442.It promiscphys Ta bool Ta false Ta
443Enable promiscuous mode at the physical level.
444.It promiscsap Ta bool Ta true Ta
445Enable promiscuous mode at the SAP level.
446.It promiscmulti Ta bool Ta true Ta
447Enable promiscuous mode for all multicast addresses.
448.It promiscrxonly Ta bool Ta true Ta
449The selected promiscuous modes are only enabled for received traffic.
450.El
451.Ss UART Device Settings
452.Bl -column "Name" "Format" "Default"
453.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
454.It Va path Ta path Ta Ta
455Backend device for the serial port.
456Either the pathname of a character device or
457.Dq stdio
458to use standard input and output of the
459.Xr bhyve 8
460process.
461.El
462.Ss Host Bridge Settings
463Host Bridge devices use the following settings.
464When configuring parameters, either the
465.Va model
466by itself, or both of
467.Va vendor
468and
469.Va devid
470must be specified.
471The vendor and device IDs can be specified using the legacy
472.Va vendor
473and
474.Va devid ,
475or via the new
476.Va pcireg.vendor
477and
478.Va pcireg.device
479properties.
480.Bl -column "pcireg.*" "integer" "Default"
481.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
482.It Va model Ta string Ta netapp Ta
483Specify a hostbridge model to emulate.
484Valid model strings, and their associated vendor and device IDs are:
485.Sy amd Pq 0x1022/0x7432 ,
486.Sy netapp Pq 0x1275/0x1275 ,
487.Sy i440fx Pq 0x8086/0x1237
488and
489.Sy q35 Pq 0x8086/0x29b0 .
490.It Va vendor Ta integer Ta 0x1275 Ta
491PCI vendor ID.
492.It Va devid Ta integer Ta 0x1275 Ta
493PCI device ID.
494.It Va pcireg.* Ta integer Ta Ta
495Values of PCI register.
496.Bl -column "device" "Default"
497.It Sy Name Ta Sy Type Ta Sy Default
498.It Va vendor Ta integer Ta 0x1275
499.It Va device Ta integer Ta 0x1275
500.El
501.El
502.Ss AHCI Controller Settings
503AHCI controller devices contain zero or more ports each of which
504provides a storage device.
505Each port stores its settings in a node named
506.Dq port. Ns Va N
507under the controller's device node.
508The
509.Va N
510values are formatted as successive decimal values starting with 0.
511In addition to the block device settings described above, each
512port supports the following settings:
513.Bl -column "model" "integer" "generated"
514.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
515.It Va type Ta string Ta Ta
516The type of storage device to emulate.
517Must be set to either
518.Dq cd
519or
520.Dq hd .
521.It Va nmrr Ta integer Ta 0 Ta
522Nominal Media Rotation Rate, also known as RPM.
523A value 1 of indicates a device with no rate such as a Solid State Disk.
524.It Va ser Ta string Ta generated Ta
525Serial number of up to twenty characters.
526A default serial number is generated using a hash of the backing
527store's pathname.
528.It Va rev Ta string Ta 001 Ta
529Revision number of up to eight characters.
530.It Va model Ta string Ta Ta
531Model number of up to forty characters.
532Separate default model strings are used for
533.Dq cd
534and
535.Dq hd
536device types.
537.El
538.Ss Frame Buffer Settings
539.Bl -column "password" "[IP:]port" "127.0.0.1:5900"
540.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
541.It Va wait Ta bool Ta false Ta
542Wait for a remote connection before starting the VM.
543.It Va rfb Ta Oo Ar IP Ns \&: Oc Ns Ar port Ta 127.0.0.1:5900 Ta
544TCP address to listen on for remote connections.
545The IP address must be given as a numeric address.
546IPv6 addresses must be enclosed in square brackets and
547support scoped identifiers as described in
548.Xr getaddrinfo 3SOCKET .
549A bare port number may be given in which case the IPv4
550localhost address is used.
551.It Va unix Ta string Ta Ta
552UNIX socket to listen on for VNC connections.
553.It Va vga Ta string Ta io Ta
554VGA configuration.
555More details are provided in
556.Xr bhyve 8 .
557.It Va w Ta integer Ta 1024 Ta
558Frame buffer width in pixels.
559.It Va h Ta integer Ta 768 Ta
560Frame buffer height in pixels.
561.It Va password Ta string Ta Ta
562Password to use for VNC authentication.
563This type of authentication is known to be cryptographically weak and is not
564intended for use on untrusted networks.
565.El
566.Ss LPC Device Settings
567The LPC bridge stores its configuration under a top-level
568.Va lpc
569node rather than under the PCI LPC device's node.
570The following nodes are available under
571.Va lpc :
572.Bl -column "pc-testdev" "Format" "Default"
573.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
574.It Va com1 Ta node Ta Ta
575Settings for the COM1 serial port device.
576.It Va com2 Ta node Ta Ta
577Settings for the COM2 serial port device.
578.It Va com3 Ta node Ta Ta
579Settings for the COM3 serial port device.
580.It Va com4 Ta node Ta Ta
581Settings for the COM4 serial port device.
582.It Va fwcfg Ta string Ta bhyve Ta
583The fwcfg type to be used.
584Supported values are
585.Dq bhyve
586for fwctl and
587.Dq qemu
588for fwcfg.
589.It Va pc-testdev Ta bool Ta false Ta
590Enable the PC debug/test device.
591.It Va pcireg.* Ta integer Ta Ta
592Values of PCI register.
593This value is required for the Intel GOP driver to work properly.
594.Bl -column "subvendor" "Default"
595.It Sy Name Ta Sy Default
596.It Va vendor Ta 0x8086
597.It Va device Ta 0x7000
598.It Va revid Ta 0
599.It Va subvendor Ta 0
600.It Va subdevice Ta 0
601.El
602.El
603.Ss TPM Device Settings
604The TPM device stores its configuration under a top-level
605.Va tpm
606node rather than under the LPC TPM device's node.
607Only one TPM device is supported.
608The following nodes are available under
609.Va tpm :
610.Bl -column "tpm.version" "Format" "Default"
611.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
612.It Va tpm.path Ta string Ta Ta
613Path to the TPM backend.
614Depending on the
615.Va tpm.type ,
616this is either the host TPM device, typically
617.Pa /dev/tpm ,
618or any UNIX domain socket on which a
619.Sy swtpm
620process is listening.
621.It Va tpm.type Ta string Ta Ta
622Type of the TPM device passed to the guest.
623This can be either
624.Dq passthru
625to use the host TPM devices, or
626.Dq swtpm
627to connect to a running
628.Sy swtpm
629process.
630.It Va tpm.version Ta string Ta 2.0 Ta
631Version of the TPM device according to the TCG specification.
632Currently, only version 2.0 is supported.
633.El
634.Ss NVMe Controller Settings
635Each NVMe controller supports a single storage device.
636The device can be backed either by a memory disk described by the
637.Va ram
638variable, or a block device using the block device settings described above.
639In addition, each controller supports the following settings:
640.Bl -column "ioslots" "Format" "Default"
641.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
642.It Va maxq Ta integer Ta 16 Ta
643Maximum number of I/O submission and completion queue pairs.
644.It Va qsz Ta integer Ta 2058 Ta
645Number of elements in each I/O queue.
646.It Va ioslots Ta integer Ta 8 Ta
647Maximum number of concurrent I/O requests.
648.It Va sectsz Ta integer Ta Ta
649Sector size.
650Can be one of 512, 4096, or 8192.
651Devices backed by a memory disk use 4096 as the default.
652Devices backed by a block device use the block device's sector size
653as the default.
654.It Va ser Ta string Ta Ta
655Serial number of up to twenty characters.
656A default serial number is generated using a hash of the device's PCI address.
657.It Va eui64 Ta integer Ta Ta
658IEEE Extended Unique Identifier.
659If an EUI is not provided, a default is generated using a checksum of the
660device's PCI address.
661.It Va dsm Ta string Ta auto Ta
662Whether or not to advertise Dataset Management (DSM) support.
663One of
664.Dq auto ,
665.Dq enable ,
666or
667.Dq disable .
668The
669.Dq auto
670setting only advertises support if the backing store supports
671resource freeing, for example via TRIM.
672.It Va ram Ta integer Ta Ta
673If set, allocate a memory disk as the backing store.
674The value of this variable is the size of the memory disk in megabytes.
675.El
676.Ss PCI Passthrough Settings
677.Bl -column "Name" "integer" "Default"
678.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
679.It Va path Ta string Ta Ta
680Path to a PCI passthrough device in the form
681.Pa /dev/ppt Ns Ar N
682where
683.Ar N
684is the device number.
685.It Va rom Ta path Ta Ta
686ROM file of the device which will be executed by OVMF to initialise the device.
687.El
688.Ss VirtIO 9p Settings
689Each VirtIO 9p device exposes a single filesystem from a host path.
690.Bl -column "sharename" "Format" "Default"
691.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
692.It Va sharename Ta string Ta Ta
693The share name exposed to the guest.
694.It Va path Ta path Ta Ta
695The path of a directory on the host to export to the guest.
696.It Va ro Ta bool Ta false Ta
697If true, the guest filesystem is read-only.
698.El
699.Ss VirtIO Block Device Settings
700In addition to the block device settings described above, each
701VirtIO block device supports the following settings:
702.Bl -column "model" "integer" "generated"
703.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
704.It Va ser Ta string Ta generated Ta
705Serial number of up to twenty characters.
706A default serial number is generated using a hash of the backing
707store's pathname.
708.El
709.Ss VirtIO Console Device Settings
710Each VirtIO Console device contains one or more console ports.
711Each port stores its settings in a node named
712.Dq port. Ns Va N
713under the controller's device node.
714The
715.Va N
716values are formatted as successive decimal values starting with 0.
717Each port supports the following settings:
718.Bl -column "Name" "Format" "Default"
719.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
720.It Va name Ta string Ta Ta
721The name of the port exposed to the guest.
722.It Va path Ta path Ta Ta
723The path of a UNIX domain socket providing the host connection for the port.
724.El
725.Sh SEE ALSO
726.Xr strtoul 3C ,
727.Xr getaddrinfo 3SOCKET ,
728.Xr bhyve 8
729