xref: /freebsd/usr.sbin/bhyve/bhyve_config.5 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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.Dd November 20, 2023
27.Dt BHYVE_CONFIG 5
28.Os
29.Sh NAME
30.Nm bhyve_config
31.Nd "bhyve configuration variables"
32.Sh DESCRIPTION
33.Xr bhyve 8
34uses a hierarchical tree of configuration variables to describe global and
35per-device settings.
36Internal nodes in this tree do not have a value,
37only leaf nodes have values.
38This manual describes the configuration variables understood by
39.Xr bhyve 8 .
40If additional variables are defined,
41.Xr bhyve 8
42will ignore them and will not emit errors for unknown variables.
43However, these additional variables can be referenced by other
44variables as described below.
45.Sh VARIABLE VALUES
46Configuration variable values are stored as strings.
47A configuration variable value may refer to one or more other
48configuration values by name.
49Instances of the pattern
50.Sq % Ns Pq Ar var
51are replaced by the value of the configuration variable
52.Va var .
53To avoid unwanted expansion,
54.Sq %
55characters can be escaped by a leading
56.Sq % .
57For example,
58if a configuration variable
59.Va disk
60uses the value
61.Pa /dev/zvol/bhyve/%(name) ,
62then the final value of the
63.Va disk
64variable will be set to the path of a ZFS volume whose name matches
65the name of the virtual machine on the pool
66.Pa bhyve .
67.Pp
68Some configuration variables may be interpreted as a boolean value.
69For those variables the following case-insensitive values may be used to
70indicate true:
71.Pp
72.Bl -bullet -offset indent -compact
73.It
74true
75.It
76on
77.It
78yes
79.It
801
81.El
82.Pp
83The following values may be used to indicate false:
84.Pp
85.Bl -bullet -offset indent -compact
86.It
87false
88.It
89off
90.It
91no
92.It
930
94.El
95.Pp
96Some configuration variables may be interperted as an integer.
97For those variables,
98any syntax supported by
99.Xr strtol 3
100may be used.
101.Sh GLOBAL SETTINGS
102.Ss Architecture Neutral Settings
103.Bl -column "memory.guest_in_core" "integer" "Default"
104.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
105.It Va name Ta string Ta Ta
106The name of the VM.
107.It Va cpus Ta integer Ta 1 Ta
108The total number of virtual CPUs.
109.It Va cores Ta integer Ta 1 Ta
110The number of virtual cores in each virtual socket.
111.It Va threads Ta integer Ta 1 Ta
112The number of virtual CPUs in each virtual core.
113.It Va sockets Ta integer Ta 1 Ta
114The number of virtual sockets.
115.It Va memory.guest_in_core Ta bool Ta false Ta
116Include guest memory in core file.
117.It Va memory.size Ta string Ta 256M Ta
118Guest physical memory size in bytes.
119The value must be formatted as described in
120.Xr expand_number 3 .
121.It Va memory.wired Ta bool Ta false Ta
122Wire guest memory.
123.It Va acpi_tables Ta bool Ta true Ta
124Generate ACPI tables.
125.It Va acpi_tables_in_memory Ta bool Ta true Ta
126.Xr bhyve 8
127always exposes ACPI tables by FwCfg.
128For backward compatibility bhyve copies them into the guest memory as well.
129This can cause problems if the guest uses the in-memory version, since certain
130advanced features, such as TPM emulation, are exposed only via FwCfg.
131Therefore, it is recommended to set this flag to false when running Windows guests.
132.It Va destroy_on_poweroff Ta bool Ta false Ta
133Destroy the VM on guest-initiated power-off.
134.It Va gdb.address Ta string Ta localhost Ta
135Hostname, IP address, or IPv6 address for the debug server.
136.It Va gdb.port Ta integer Ta 0 Ta
137TCP port number for the debug server.
138If this is set to a non-zero value, a debug server
139will listen for connections on this port.
140.It Va gdb.wait Ta bool Ta false Ta
141If the debug server is enabled, wait for a debugger to connect
142before starting the guest.
143.It Va keyboard.layout Ta string Ta Ta
144Specify the keyboard layout name with the file name in
145.Ar /usr/share/bhyve/kbdlayout .
146This value only works when loaded with UEFI mode for VNC, and
147used a VNC client that don't support QEMU Extended Key Event
148Message (e.g. TightVNC).
149.It Va tpm.path Ta string Ta Ta
150Path to the host TPM device.
151This is typically /dev/tpm0.
152.It Va tpm.type Ta string Ta Ta
153Type of the TPM device passed to the guest.
154Currently, only "passthru" is supported.
155.It Va tpm.version Ta string Ta 2.0 Ta
156Version of the TPM device according to the TCG specification.
157Currently, only version 2.0 is supported.
158.It Va rtc.use_localtime Ta bool Ta true Ta
159The real time clock uses the local time of the host.
160If this is set to false, the real time clock uses UTC.
161.It Va uuid Ta string Ta Ta
162The universally unique identifier (UUID) to use in the guest's
163System Management BIOS System Information structure.
164If an explicit value is not set, a valid UUID is generated from
165the host's hostname and the VM name.
166.It Va virtio_msix Ta bool Ta true Ta
167Use MSI-X interrupts for PCI VirtIO devices.
168If set to false, MSI interrupts are used instead.
169.It Va config.dump Ta bool Ta false Ta
170If this value is set to true after
171.Xr bhyve 8
172has finished parsing command line options,
173then
174.Xr bhyve 8
175will write all of its configuration variables to stdout and exit.
176No VM will be started.
177.It Va bios.vendor Ta string Ta BHYVE Ta
178This value is used for the guest's System Management BIOS System Information structure.
179.It Va bios.version Ta string Ta 14.0 Ta
180This value is used for the guest's System Management BIOS System Information structure.
181.It Va bios.release_date Ta string Ta 10/17/2021 Ta
182This value is used for the guest's System Management BIOS System Information structure.
183.It Va system.family_name Ta string Ta Virtual Machine Ta
184Family the computer belongs to.
185This value is used for the guest's System Management BIOS System Information structure.
186.It Va system.manufacturer Ta string Ta FreeBSD Ta
187This value is used for the guest's System Management BIOS System Information structure.
188.It Va system.product_name Ta string Ta BHYVE Ta
189This value is used for the guest's System Management BIOS System Information structure.
190.It Va system.serial_number Ta string Ta None Ta
191This value is used for the guest's System Management BIOS System Information structure.
192.It Va system.sku Ta string Ta None Ta
193Stock keeping unit of the computer.
194It's also called product ID or purchase order number.
195This value is used for the guest's System Management BIOS System Information structure.
196.It Va system.version Ta string Ta 1.0 Ta
197This value is used for the guest's System Management BIOS System Information structure.
198.It Va board.manufacturer Ta string Ta FreeBSD Ta
199This value is used for the guest's System Management BIOS System Information structure.
200.It Va board.product_name Ta string Ta BHYVE Ta
201This value is used for the guest's System Management BIOS System Information structure.
202.It Va board.version Ta string Ta 1.0 Ta
203This value is used for the guest's System Management BIOS System Information structure.
204.It Va board.serial_number Ta string Ta None Ta
205This value is used for the guest's System Management BIOS System Information structure.
206.It Va board.asset_tag Ta string Ta None Ta
207This value is used for the guest's System Management BIOS System Information structure.
208.It Va board.location Ta string Ta None Ta
209Describes the board's location within the chassis.
210This value is used for the guest's System Management BIOS System Information structure.
211.It Va chassis.manufacturer Ta string Ta FreeBSD Ta
212This value is used for the guest's System Management BIOS System Information structure.
213.It Va chassis.version Ta string Ta 1.0 Ta
214This value is used for the guest's System Management BIOS System Information structure.
215.It Va chassis.serial_number Ta string Ta None Ta
216This value is used for the guest's System Management BIOS System Information structure.
217.It Va chassis.asset_tag Ta string Ta None Ta
218This value is used for the guest's System Management BIOS System Information structure.
219.It Va chassis.sku Ta string Ta None Ta
220Stock keeping unit of the chassis.
221It's also called product ID or purchase order number.
222This value is used for the guest's System Management BIOS System Information structure.
223.El
224.Ss x86-Specific Settings
225.Bl -column "x86.vmexit_on_pause" "integer" "Default"
226.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
227.It Va x86.mptable Ta bool Ta true Ta
228Generate an MPTable.
229.It Va x86.x2apic Ta bool Ta false Ta
230Configure guest's local APICs in x2APIC mode.
231.It Va x86.strictio Ta bool Ta false Ta
232Exit if a guest accesses an I/O port that is not emulated.
233By default, writes are ignored and reads return all bits set.
234.It Va x86.strictmsr Ta bool Ta true Ta
235Inject a general protection fault if a guest accesses a Model Specific
236Register (MSR) that is not emulated.
237If this is false, writes are ignored and reads return zero.
238.It Va x86.vmexit_on_hlt Ta bool Ta false Ta
239Force a VM exit when a guest CPU executes the
240.Dv HLT
241instruction.
242This allows idle guest CPUs to yield the host CPU.
243.It Va x86.vmexit_on_pause Ta bool Ta false Ta
244Force a VM exit when a guest CPU executes the
245.Dv PAUSE
246instruction.
247.El
248.Sh DEVICE SETTINGS
249Device settings are stored under a device node.
250The device node's name is set by the parent bus of the device.
251.Ss PCI Device Settings
252PCI devices are described by a device node named
253.Dq pci . Ns Ar bus . Ns Ar slot . Ns Ar function
254where each of
255.Ar bus ,
256.Ar slot ,
257and
258.Ar function
259are formatted as decimal values with no padding.
260All PCI device nodes must contain a configuration variable named
261.Dq device
262which specifies the device model to use.
263The following PCI device models are supported:
264.Bl -tag -indent
265.It Li hostbridge
266Provide a simple PCI-Host bridge device.
267This is usually configured at pci0:0:0 and is required by most guest
268operating systems.
269.It Li ahci
270AHCI storage controller.
271.It Li e1000
272Intel e82545 network interface.
273.It Li fbuf
274VGA framebuffer device attached to VNC server.
275.It Li lpc
276LPC PCI-ISA bridge with COM1-COM4 16550 serial ports,
277a boot ROM,
278an optional fwcfg type,
279and an optional debug/test device.
280This device must be configured on bus 0.
281.It Li hda
282High Definition audio controller.
283.It Li nvme
284NVM Express (NVMe) controller.
285.It Li passthru
286PCI pass-through device.
287.It Li uart
288PCI 16550 serial device.
289.It Li virtio-9p
290VirtIO 9p (VirtFS) interface.
291.It Li virtio-blk
292VirtIO block storage interface.
293.It Li virtio-console
294VirtIO console interface.
295.It Li virtio-input
296VirtIO input interface.
297.It Li virtio-net
298VirtIO network interface.
299.It Li virtio-rnd
300VirtIO RNG interface.
301.It Li virtio-scsi
302VirtIO SCSI interface.
303.It Li xhci
304Extensible Host Controller Interface (XHCI) USB controller.
305.El
306.Ss USB Device Settings
307USB controller devices contain zero or more child USB devices
308attached to slots.
309Each USB device stores its settings in a node named
310.Dq slot. Ns Va N
311under the controller's device node.
312.Va N
313is the number of the slot to which the USB device is attached.
314Note that USB slot numbers begin at 1.
315All USB device nodes must contain a configuration variable named
316.Dq device
317which specifies the device model to use.
318The following USB device models are supported:
319.Bl -tag -indent
320.It Li tablet
321A USB tablet device which provides precise cursor synchronization
322when using VNC.
323.El
324.Ss Block Device Settings
325Block devices use the following settings to configure their backing store.
326These settings are stored in the configuration node of the respective device.
327.Bl -column "sectorsize" "logical[/physical]" "Default"
328.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
329.It path Ta string Ta Ta
330The path of the file or disk device to use as the backing store.
331.It nocache Ta bool Ta false Ta
332Disable caching on the backing file by opening the backing file with
333.Dv O_DIRECT .
334.It nodelete Ta bool Ta false Ta
335Disable emulation of guest trim requests via
336.Dv DIOCGDELETE
337requests.
338.It sync Ta bool Ta false Ta
339Write changes to the backing file with synchronous writes.
340.It direct Ta bool Ta false Ta
341An alias for
342.Va sync .
343.It ro Ta bool Ta false Ta
344Disable writes to the backing file.
345.It sectorsize Ta Va logical Ns Op / Ns Va physical Ta Ta
346Specify the logical and physical sector size of the emulated disk.
347If the physical size is not specified,
348it is equal to the logical size.
349.El
350.Ss Network Backend Settings
351Network devices use the following settings to configure their backend.
352The backend is responsible for passing packets between the device model
353and a desired destination.
354Configuring a backend requires setting the
355.Va backend
356variable.
357The type of a backend can either be set explicitly via the
358.Va type
359variable
360or it can be inferred from the value of
361.Va backend .
362.Pp
363The following types of backends are supported:
364.Bl -tag -width "netgraph"
365.It tap
366Use the
367.Xr tap 4
368interface named in
369.Va backend
370as the backend.
371.It netgraph
372Use a
373.Xr netgraph 4
374socket hook as the backend.
375This backend uses the following additional variables:
376.Bl -column "peerhook" "Format" "Default"
377.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
378.It Va path Ta string Ta Ta
379The name of the
380.Xr netgraph 4
381destination node.
382.It Va peerhook Ta string Ta Ta
383The name of the destination hook.
384.It Va socket Ta string Ta Ta
385The name of the created
386.Xr ng_socket 4
387node.
388.It Va hook Ta string Ta vmlink Ta
389The name of the source hook on the created
390.Xr ng_socket 4
391node.
392.El
393.It netmap
394Use
395.Xr netmap 4
396either on a network interface or a port on a
397.Xr vale 4
398bridge as the backend.
399The value of
400.Va backend
401is passed to
402.Xr nm_open
403to connect to a netmap port.
404.It slirp
405Use the slirp backend to provide a userspace network stack.
406The
407.Va hostfwd
408variable is used to configure how packets from the host are translated
409before being sent to the guest.
410.Bl -column "peerhook" "Format" "Default"
411.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
412.It Va hostfwd Ta string Ta Ta
413A semicolon-separated list of host forwarding rules, each of the form
414.Ar proto:haddr:hport-gaddr:gport ,
415where
416.Ar proto
417is either
418.Ql tcp
419or
420.Ql udp .
421If the guest address is equal to the empty string, packets will be
422forwarded to the first DHCP-assigned address in the guest.
423.El
424.El
425.Pp
426If
427.Va type
428is not specified explicitly, then it is inferred from
429.Va backend
430based on the following patterns:
431.Bl -column -offset indent "valuebridge:port"
432.It Sy Pattern Ta Sy Type
433.It tap Ns Va N Ta tap
434.It vmnet Ns Va N Ta tap
435.It netgraph Ta netgraph
436.It netmap: Ns Va interface Ta netmap
437.It vale Ns Va bridge : Ns Va port Ta netmap
438.El
439.Ss UART Device Settings
440.Bl -column "Name" "Format" "Default"
441.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
442.It Va path Ta path Ta Ta
443Backend device for the serial port.
444Either the pathname of a character device or
445.Dq stdio
446to use standard input and output of the
447.Xr bhyve 8
448process.
449.El
450.Ss Host Bridge Settings
451.Bl -column "pcireg.*" "integer" "Default"
452.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
453.It Va pcireg.* Ta integer Ta Ta
454Values of PCI register.
455.Bl -column "device" "Default"
456.It Sy Name Ta Sy Default
457.It Va vendor Ta integer Ta 0x1275 Ta
458.It Va device Ta integer Ta 0x1275 Ta
459.El
460.El
461.Ss AHCI Controller Settings
462AHCI controller devices contain zero or more ports each of which
463provides a storage device.
464Each port stores its settings in a node named
465.Dq port. Ns Va N
466under the controller's device node.
467The
468.Va N
469values are formatted as successive decimal values starting with 0.
470In addition to the block device settings described above, each
471port supports the following settings:
472.Bl -column "model" "integer" "generated"
473.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
474.It Va type Ta string Ta Ta
475The type of storage device to emulate.
476Must be set to either
477.Dq cd
478or
479.Dq hd .
480.It Va nmrr Ta integer Ta 0 Ta
481Nominal Media Rotation Rate, also known as RPM.
482A value 1 of indicates a device with no rate such as a Solid State Disk.
483.It Va ser Ta string Ta generated Ta
484Serial number of up to twenty characters.
485A default serial number is generated using a hash of the backing
486store's pathname.
487.It Va rev Ta string Ta 001 Ta
488Revision number of up to eight characters.
489.It Va model Ta string Ta Ta
490Model number of up to forty characters.
491Separate default model strings are used for
492.Dq cd
493and
494.Dq hd
495device types.
496.El
497.Ss e1000 Settings
498In addition to the network backend settings,
499Intel e82545 network interfaces support the following variables:
500.Bl -column "Name" "MAC address" "generated"
501.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
502.It Va mac Ta MAC address Ta generated Ta
503MAC address.
504If an explicit address is not provided,
505a MAC address is generated from a hash of the device's PCI address.
506.El
507.Ss Frame Buffer Settings
508.Bl -column "password" "[IP:]port" "127.0.0.1:5900"
509.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
510.It Va wait Ta bool Ta false Ta
511Wait for a remote connection before starting the VM.
512.It Va rfb Ta Oo Ar IP Ns : Oc Ns Ar port Ta 127.0.0.1:5900 Ta
513TCP address to listen on for remote connections.
514The IP address must be given as a numeric address.
515IPv6 addresses must be enclosed in square brackets and
516support scoped identifiers as described in
517.Xr getaddrinfo 3 .
518A bare port number may be given in which case the IPv4
519localhost address is used.
520.It Va vga Ta string Ta io Ta
521VGA configuration.
522More details are provided in
523.Xr bhyve 8 .
524.It Va w Ta integer Ta 1024 Ta
525Frame buffer width in pixels.
526.It Va h Ta integer Ta 768 Ta
527Frame buffer height in pixels.
528.It Va password Ta string Ta Ta
529Password to use for VNC authentication.
530This type of authentication is known to be cryptographically weak and is not
531intended for use on untrusted networks.
532.El
533.Ss High Definition Audio Settings
534.Bl -column "Name" "Format" "Default"
535.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
536.It Va play Ta path Ta Ta
537Host playback device,
538typically
539.Pa /dev/dsp0 .
540.It Va rec Ta path Ta Ta
541Host recording device,
542typically
543.Pa /dev/dsp0 .
544.El
545.Ss LPC Device Settings
546The LPC bridge stores its configuration under a top-level
547.Va lpc
548node rather than under the PCI LPC device's node.
549The following nodes are available under
550.Va lpc :
551.Bl -column "pc-testdev" "Format" "Default"
552.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
553.It Va bootrom Ta path Ta Ta
554Path to a boot ROM.
555The contents of this file are copied into the guest's
556memory ending just before the 4GB physical address.
557If a boot ROM is present, a firmware interface device is
558also enabled for use by the boot ROM.
559.It Va bootvars Ta path Ta Ta
560Path to boot VARS.
561The contents of this file are copied beneath the boot ROM.
562Firmware can write to it to save variables.
563All variables will be persistent even on reboots of the guest.
564.It Va com1 Ta node Ta Ta
565Settings for the COM1 serial port device.
566.It Va com2 Ta node Ta Ta
567Settings for the COM2 serial port device.
568.It Va com3 Ta node Ta Ta
569Settings for the COM3 serial port device.
570.It Va com4 Ta node Ta Ta
571Settings for the COM4 serial port device.
572.It Va fwcfg Ta string Ta bhyve Ta
573The fwcfg type to be used.
574Supported values are
575.Dq bhyve
576for fwctl and
577.Dq qemu
578for fwcfg.
579.It Va pc-testdev Ta bool Ta false Ta
580Enable the PC debug/test device.
581.It Va pcireg.* Ta integer Ta Ta
582Values of PCI register.
583It also accepts the value
584.Ar host
585to use the pci id of the host system.
586This value is required for the Intel GOP driver to work properly.
587.Bl -column "subvendor" "Default"
588.It Sy Name Ta Sy Default
589.It Va vendor Ta 0x8086
590.It Va device Ta 0x7000
591.It Va revid Ta 0
592.It Va subvendor Ta 0
593.It Va subdevice Ta 0
594.El
595.El
596.Ss NVMe Controller Settings
597Each NVMe controller supports a single storage device.
598The device can be backed either by a memory disk described by the
599.Va ram
600variable, or a block device using the block device settings described above.
601In addition, each controller supports the following settings:
602.Bl -column "ioslots" "Format" "Default"
603.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
604.It Va maxq Ta integer Ta 16 Ta
605Maximum number of I/O submission and completion queue pairs.
606.It Va qsz Ta integer Ta 2058 Ta
607Number of elements in each I/O queue.
608.It Va ioslots Ta integer Ta 8 Ta
609Maximum number of concurrent I/O requests.
610.It Va sectsz Ta integer Ta Ta
611Sector size.
612Can be one of 512, 4096, or 8192.
613Devices backed by a memory disk use 4096 as the default.
614Devices backed by a block device use the block device's sector size
615as the default.
616.It Va ser Ta string Ta Ta
617Serial number of up to twenty characters.
618A default serial number is generated using a hash of the device's PCI address.
619.It Va eui64 Ta integer Ta Ta
620IEEE Extended Unique Identifier.
621If an EUI is not provided, a default is generated using a checksum of the
622device's PCI address.
623.It Va dsm Ta string Ta auto Ta
624Whether or not to advertise DataSet Management support.
625One of
626.Dq auto ,
627.Dq enable ,
628or
629.Dq disable .
630The
631.Dq auto
632setting only advertises support if the backing store supports
633resource freeing, for example via TRIM.
634.It Va ram Ta integer Ta Ta
635If set, allocate a memory disk as the backing store.
636The value of this variable is the size of the memory disk in megabytes.
637.El
638.Ss PCI Passthrough Settings
639The
640.Xr ppt 4
641device driver must be attached to the
642PCI device being passed through.
643The device to pass through can be identified either by name or its
644host PCI bus location.
645.Bl -column "Name" "integer" "Default"
646.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
647.It Va bus Ta integer Ta Ta
648Host PCI bus address of device to pass through.
649.It Va slot Ta integer Ta Ta
650Host PCI slot address of device to pass through.
651.It Va func Ta integer Ta Ta
652Host PCI function address of device to pass through.
653.It Va pptdev Ta string Ta Ta
654Name of a
655.Xr ppt 4
656device to pass through.
657.It Va rom Ta path Ta Ta
658ROM file of the device which will be executed by OVMF to init the device.
659.El
660.Ss VirtIO 9p Settings
661Each VirtIO 9p device exposes a single filesystem from a host path.
662.Bl -column "sharename" "Format" "Default"
663.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
664.It Va sharename Ta string Ta Ta
665The share name exposed to the guest.
666.It Va path Ta path Ta Ta
667The path of a directory on the host to export to the guest.
668.It Va ro Ta bool Ta false Ta
669If true, the guest filesystem is read-only.
670.El
671.Ss VirtIO Block Device Settings
672In addition to the block device settings described above, each
673VirtIO block device supports the following settings:
674.Bl -column "model" "integer" "generated"
675.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
676.It Va ser Ta string Ta generated Ta
677Serial number of up to twenty characters.
678A default serial number is generated using a hash of the backing
679store's pathname.
680.El
681.Ss VirtIO Console Device Settings
682Each VirtIO Console device contains one or more console ports.
683Each port stores its settings in a node named
684.Dq port. Ns Va N
685under the controller's device node.
686The
687.Va N
688values are formatted as successive decimal values starting with 0.
689Each port supports the following settings:
690.Bl -column "Name" "Format" "Default"
691.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
692.It Va name Ta string Ta Ta
693The name of the port exposed to the guest.
694.It Va path Ta path Ta Ta
695The path of a UNIX domain socket providing the host connection for the port.
696.El
697.Ss VirtIO Input Interface Settings
698Each VirtIO Input device contains one input event device.
699All input events of the input event device are send to the guest by VirtIO Input interface.
700VirtIO Input Interfaces support the following variables:
701.Bl -column "Name" "Format" "Default"
702.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
703.It Va path Ta path Ta Ta
704The path of the input event device exposed to the guest
705.El
706.Ss VirtIO Network Interface Settings
707In addition to the network backend settings,
708VirtIO network interfaces support the following variables:
709.Bl -column "Name" "MAC address" "generated"
710.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
711.It Va mac Ta MAC address Ta generated Ta
712MAC address.
713If an explicit address is not provided,
714a MAC address is generated from a hash of the device's PCI address.
715.It Va mtu Ta integer Ta 1500 Ta
716The largest supported MTU advertised to the guest.
717.El
718.Ss VirtIO SCSI Settings
719.Bl -column "Name" "integer" "Default"
720.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
721.It Va dev Ta path Ta Ta
722The path of a CAM target layer (CTL) device to export:
723.Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc .
724.It Va iid Ta integer Ta 0 Ta
725Initiator ID to use when sending requests to the CTL port.
726.El
727.Sh SEE ALSO
728.Xr expand_number 3 ,
729.Xr getaddrinfo 3 ,
730.Xr strtol 3 ,
731.Xr netgraph 4 ,
732.Xr netmap 4 ,
733.Xr ng_socket 4 ,
734.Xr tap 4 ,
735.Xr vale 4 ,
736.Xr vmnet 4 ,
737.Xr bhyve 8
738