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