xref: /freebsd/usr.sbin/bhyve/bhyve.8 (revision 107584716cdeaa36c718a42861df1cb4b8b87e62)
1b13e60daSPeter Grehan.\" Copyright (c) 2013 Peter Grehan
2b13e60daSPeter Grehan.\" All rights reserved.
3b13e60daSPeter Grehan.\"
4b13e60daSPeter Grehan.\" Redistribution and use in source and binary forms, with or without
5b13e60daSPeter Grehan.\" modification, are permitted provided that the following conditions
6b13e60daSPeter Grehan.\" are met:
7b13e60daSPeter Grehan.\" 1. Redistributions of source code must retain the above copyright
8b13e60daSPeter Grehan.\"    notice, this list of conditions and the following disclaimer.
9b13e60daSPeter Grehan.\" 2. Redistributions in binary form must reproduce the above copyright
10b13e60daSPeter Grehan.\"    notice, this list of conditions and the following disclaimer in the
11b13e60daSPeter Grehan.\"    documentation and/or other materials provided with the distribution.
12b13e60daSPeter Grehan.\"
13b13e60daSPeter Grehan.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14b13e60daSPeter Grehan.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15b13e60daSPeter Grehan.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16b13e60daSPeter Grehan.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17b13e60daSPeter Grehan.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18b13e60daSPeter Grehan.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19b13e60daSPeter Grehan.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20b13e60daSPeter Grehan.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21b13e60daSPeter Grehan.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22b13e60daSPeter Grehan.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23b13e60daSPeter Grehan.\" SUCH DAMAGE.
24b13e60daSPeter Grehan.\"
25*10758471SMark Johnston.Dd February 10, 2024
26b13e60daSPeter Grehan.Dt BHYVE 8
27b13e60daSPeter Grehan.Os
28b13e60daSPeter Grehan.Sh NAME
29b13e60daSPeter Grehan.Nm bhyve
30b13e60daSPeter Grehan.Nd "run a guest operating system inside a virtual machine"
31b13e60daSPeter Grehan.Sh SYNOPSIS
32b13e60daSPeter Grehan.Nm
33*10758471SMark Johnston.Op Fl aCDeHhPSuWwxY
3401d822d3SRodney W. Grimes.Oo
3577d208a3SMateusz Piotrowski.Sm off
3677d208a3SMateusz Piotrowski.Fl c\~
3701d822d3SRodney W. Grimes.Oo
3877d208a3SMateusz Piotrowski.Op Cm cpus=
3977d208a3SMateusz Piotrowski.Ar numcpus
4001d822d3SRodney W. Grimes.Oc
4177d208a3SMateusz Piotrowski.Op Cm ,sockets= Ar n
4277d208a3SMateusz Piotrowski.Op Cm ,cores= Ar n
4377d208a3SMateusz Piotrowski.Op Cm ,threads= Ar n
4477d208a3SMateusz Piotrowski.Oc
4577d208a3SMateusz Piotrowski.Sm on
46ca14781cSCorvin Köhne.Oo Fl f
47ca14781cSCorvin Köhne.Sm off
48ca14781cSCorvin Köhne.Ar name Cm \&,
49ca14781cSCorvin Köhne.Oo
50ca14781cSCorvin Köhne.Cm string No | Cm file
51ca14781cSCorvin Köhne.Oc
52ca14781cSCorvin Köhne.Cm \&= Ar data
53ca14781cSCorvin Köhne.Sm on
54ca14781cSCorvin Köhne.Oc
55775f6f45SMateusz Piotrowski.Oo
56b70b050aSJohn Baldwin.Sm off
57775f6f45SMateusz Piotrowski.Fl G\~
58b70b050aSJohn Baldwin.Oo Ar w Oc
59775f6f45SMateusz Piotrowski.Oo Ar bind_address Cm \&: Oc
60b70b050aSJohn Baldwin.Ar port
61b70b050aSJohn Baldwin.Sm on
62b70b050aSJohn Baldwin.Oc
63f656df58SMateusz Piotrowski.Op Fl k Ar config_file
6419eaa01bSMichael Reifenberger.Op Fl K Ar layout
6577d208a3SMateusz Piotrowski.Oo Fl l
6677d208a3SMateusz Piotrowski.Sm off
67bfe40b69SMateusz Piotrowski.Ar lpcdev Op Cm \&, Ar conf
6877d208a3SMateusz Piotrowski.Sm on
6977d208a3SMateusz Piotrowski.Oc
7077d208a3SMateusz Piotrowski.Sm off
71775f6f45SMateusz Piotrowski.Oo Fl m\~
7277d208a3SMateusz Piotrowski.Ar memsize
7377d208a3SMateusz Piotrowski.Oo
748d9fefe6SMateusz Piotrowski.Cm K | Cm k | Cm M | Cm m | Cm G | Cm g | Cm T | Cm t
7577d208a3SMateusz Piotrowski.Oc
7677d208a3SMateusz Piotrowski.Sm on
7777d208a3SMateusz Piotrowski.Oc
78621b5090SJohn Baldwin.Op Fl o Ar var Ns Cm = Ns Ar value
7977d208a3SMateusz Piotrowski.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu
80483d953aSJohn Baldwin.Op Fl r Ar file
8177d208a3SMateusz Piotrowski.Sm off
82bfe40b69SMateusz Piotrowski.Oo Fl s\~
83bfe40b69SMateusz Piotrowski.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf
8477d208a3SMateusz Piotrowski.Sm on
8577d208a3SMateusz Piotrowski.Oc
865749449dSJohn Baldwin.Op Fl U Ar uuid
87b13e60daSPeter Grehan.Ar vmname
88bfe40b69SMateusz Piotrowski.Nm
89bfe40b69SMateusz Piotrowski.Fl l Cm help
90bfe40b69SMateusz Piotrowski.Nm
91bfe40b69SMateusz Piotrowski.Fl s Cm help
92b13e60daSPeter Grehan.Sh DESCRIPTION
93b13e60daSPeter Grehan.Nm
947fca1ad5SGlen Barberis a hypervisor that runs guest operating systems inside a
95b13e60daSPeter Grehanvirtual machine.
96b13e60daSPeter Grehan.Pp
97b13e60daSPeter GrehanParameters such as the number of virtual CPUs, amount of guest memory, and
98b13e60daSPeter GrehanI/O connectivity can be specified with command-line parameters.
99b13e60daSPeter Grehan.Pp
1005c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must be loaded with
10184fe889cSChristian Brueffer.Xr bhyveload 8
102b13e60daSPeter Grehanor a similar boot loader before running
1035c3ec676SGleb Smirnoff.Nm ,
1045c3ec676SGleb Smirnoffotherwise, it is enough to run
1055c3ec676SGleb Smirnoff.Nm
1065c3ec676SGleb Smirnoffwith a boot ROM of choice.
107b13e60daSPeter Grehan.Pp
108b13e60daSPeter Grehan.Nm
109b13e60daSPeter Grehanruns until the guest operating system reboots or an unhandled hypervisor
110b13e60daSPeter Grehanexit is detected.
111b13e60daSPeter Grehan.Sh OPTIONS
112b13e60daSPeter Grehan.Bl -tag -width 10n
113ccb1c87aSMateusz Piotrowski.It Fl a
114ccb1c87aSMateusz PiotrowskiThe guest's local APIC is configured in xAPIC mode.
115ccb1c87aSMateusz PiotrowskiThe xAPIC mode is the default setting so this option is redundant.
116ccb1c87aSMateusz PiotrowskiIt will be deprecated in a future version.
117ccb1c87aSMateusz Piotrowski.It Fl C
118ccb1c87aSMateusz PiotrowskiInclude guest memory in core file.
11901d822d3SRodney W. Grimes.It Fl c Op Ar setting ...
12001d822d3SRodney W. GrimesNumber of guest virtual CPUs
12101d822d3SRodney W. Grimesand/or the CPU topology.
12201d822d3SRodney W. GrimesThe default value for each of
12301d822d3SRodney W. Grimes.Ar numcpus ,
12401d822d3SRodney W. Grimes.Ar sockets ,
12501d822d3SRodney W. Grimes.Ar cores ,
12601d822d3SRodney W. Grimesand
12701d822d3SRodney W. Grimes.Ar threads
12801d822d3SRodney W. Grimesis 1.
12901d822d3SRodney W. GrimesIf
13001d822d3SRodney W. Grimes.Ar numcpus
13101d822d3SRodney W. Grimesis not specified then it will be calculated from the other arguments.
13201d822d3SRodney W. GrimesThe topology must be consistent in that the
13301d822d3SRodney W. Grimes.Ar numcpus
13401d822d3SRodney W. Grimesmust equal the product of
13501d822d3SRodney W. Grimes.Ar sockets ,
13601d822d3SRodney W. Grimes.Ar cores ,
13701d822d3SRodney W. Grimesand
13801d822d3SRodney W. Grimes.Ar threads .
13901d822d3SRodney W. GrimesIf a
14001d822d3SRodney W. Grimes.Ar setting
14101d822d3SRodney W. Grimesis specified more than once the last one has precedence.
142da202b0fSYuri Pankov.Pp
143da202b0fSYuri PankovThe maximum number of virtual CPUs defaults to the number of active
144da202b0fSYuri Pankovphysical CPUs in the system available via the
145da202b0fSYuri Pankov.Va hw.vmm.maxcpu
146da202b0fSYuri Pankov.Xr sysctl 8
147da202b0fSYuri Pankovvariable.
148da202b0fSYuri PankovThe limit can be adjusted via the
149da202b0fSYuri Pankov.Va hw.vmm.maxcpu
150da202b0fSYuri Pankovloader tunable.
1510a1016f9SPawel Biernacki.It Fl D
1520a1016f9SPawel BiernackiDestroy the VM on guest initiated power-off.
153cde1f5b8SJohn Baldwin.It Fl e
154cde1f5b8SJohn BaldwinForce
155cde1f5b8SJohn Baldwin.Nm
156cde1f5b8SJohn Baldwinto exit when a guest issues an access to an I/O port that is not emulated.
157cde1f5b8SJohn BaldwinThis is intended for debug purposes.
158ca14781cSCorvin Köhne.It Fl f Ar name Ns Cm \&, Ns Oo Cm string Ns No | Ns Cm file Ns Oc Ns Cm \&= Ns Ar data
159ca14781cSCorvin KöhneAdd a fw_cfg file
160ca14781cSCorvin Köhne.Ar name
161ca14781cSCorvin Köhneto the fw_cfg interface.
162ca14781cSCorvin KöhneIf a
163ca14781cSCorvin Köhne.Cm string
164ca14781cSCorvin Köhneis specified, the fw_cfg file contains the string as data.
165ca14781cSCorvin KöhneIf a
166ca14781cSCorvin Köhne.Cm file
167ca14781cSCorvin Köhneis specified, bhyve reads the file and adds the file content as fw_cfg data.
1682cdff991SMariusz Zaborski.It Fl G Xo
1692cdff991SMariusz Zaborski.Sm off
1702cdff991SMariusz Zaborski.Oo Ar w Oc
171775f6f45SMateusz Piotrowski.Oo Ar bind_address Cm \&: Oc
1722cdff991SMariusz Zaborski.Ar port
1732cdff991SMariusz Zaborski.Sm on
1742cdff991SMariusz Zaborski.Xc
175cd377eb3SJohn BaldwinStart a debug server that uses the GDB protocol to export guest state to a
176cd377eb3SJohn Baldwindebugger.
177cd377eb3SJohn BaldwinAn IPv4 TCP socket will be bound to the supplied
1782cdff991SMariusz Zaborski.Ar bind_address
1792cdff991SMariusz Zaborskiand
180cd377eb3SJohn Baldwin.Ar port
181cd377eb3SJohn Baldwinto listen for debugger connections.
182cd377eb3SJohn BaldwinOnly a single debugger may be attached to the debug server at a time.
1832cdff991SMariusz ZaborskiIf the option begins with
184cd377eb3SJohn Baldwin.Sq w ,
185cd377eb3SJohn Baldwin.Nm
186cd377eb3SJohn Baldwinwill pause execution at the first instruction waiting for a debugger to attach.
187cde1f5b8SJohn Baldwin.It Fl H
188cde1f5b8SJohn BaldwinYield the virtual CPU thread when a HLT instruction is detected.
189cde1f5b8SJohn BaldwinIf this option is not specified, virtual CPUs will use 100% of a host CPU.
190ccb1c87aSMateusz Piotrowski.It Fl h
191ccb1c87aSMateusz PiotrowskiPrint help message and exit.
192f656df58SMateusz Piotrowski.It Fl k Ar config_file
193621b5090SJohn BaldwinSet configuration variables from a simple, key-value config file.
194621b5090SJohn BaldwinEach line of the config file is expected to consist of a config variable
195621b5090SJohn Baldwinname, an equals sign
196621b5090SJohn Baldwin.Pq Sq = ,
197621b5090SJohn Baldwinand a value.
198621b5090SJohn BaldwinNo spaces are permitted between the variable name, equals sign, or
199621b5090SJohn Baldwinvalue.
200621b5090SJohn BaldwinBlank lines and lines starting with
201621b5090SJohn Baldwin.Sq #
202621b5090SJohn Baldwinare ignored.
203f656df58SMateusz PiotrowskiSee
204f656df58SMateusz Piotrowski.Xr bhyve_config 5
205f656df58SMateusz Piotrowskifor more details.
20672f1e31fSKonstantin Belousov.It Fl K Ar layout
20772f1e31fSKonstantin BelousovSpecify the keyboard layout.
20872f1e31fSKonstantin BelousovThe value that can be specified sets the file name in
20972f1e31fSKonstantin Belousov.Ar /usr/share/bhyve/kbdlayout .
21072f1e31fSKonstantin BelousovThis specification only works when loaded with UEFI mode for VNC.
21172f1e31fSKonstantin BelousovWhen using a VNC client that supports QEMU Extended Key Event Message (e.g.
21272f1e31fSKonstantin BelousovTigerVNC), this option isn't needed.
21372f1e31fSKonstantin BelousovWhen using a VNC client that doesn't support QEMU Extended Key Event Message
21472f1e31fSKonstantin Belousov(e.g. tightVNC), the layout defaults to the US keyboard unless specified
21572f1e31fSKonstantin Belousovotherwise.
2164c08b978SMateusz Piotrowski.It Fl l Cm help
2174c08b978SMateusz PiotrowskiPrint a list of supported LPC devices.
2184c08b978SMateusz Piotrowski.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf
219cde1f5b8SJohn BaldwinAllow devices behind the LPC PCI-ISA bridge to be configured.
2209b1aa8d6SNeel NatuThe only supported devices are the TTY-class devices
2214c08b978SMateusz Piotrowski.Cm com1 , com2 , com3 ,
2224c08b978SMateusz Piotrowskiand
2234c08b978SMateusz Piotrowski.Cm com4 ,
22467c26eb2SCorvin Köhnethe TPM module
22567c26eb2SCorvin Köhne.Cm tpm ,
2262f40fc6fSPeter Grehanthe boot ROM device
2274c08b978SMateusz Piotrowski.Cm bootrom ,
228d85147f3SCorvin Köhnethe
229d85147f3SCorvin Köhne.Cm fwcfg
230d85147f3SCorvin Köhnetype and the debug/test device
2314c08b978SMateusz Piotrowski.Cm pc-testdev .
2321aa56353SMarcelo Araujo.Pp
2334c08b978SMateusz PiotrowskiThe possible values for the
2344c08b978SMateusz Piotrowski.Ar conf
2354c08b978SMateusz Piotrowskiargument are listed in the
2364c08b978SMateusz Piotrowski.Fl s
2374c08b978SMateusz Piotrowskiflag description.
2387e0cb3dfSMateusz Piotrowski.It Xo
2397e0cb3dfSMateusz Piotrowski.Fl m Ar memsize Ns Oo
2407e0cb3dfSMateusz Piotrowski.Sm off
2417e0cb3dfSMateusz Piotrowski.Cm K | k | M | m | G | g | T | t
2427e0cb3dfSMateusz Piotrowski.Sm on
2437e0cb3dfSMateusz Piotrowski.Oc
2447e0cb3dfSMateusz Piotrowski.Xc
24559a35b7cSKonstantin BelousovSet the guest physical memory size.
246cde1f5b8SJohn BaldwinThis must be the same size that was given to
247cde1f5b8SJohn Baldwin.Xr bhyveload 8 .
248cde1f5b8SJohn Baldwin.Pp
2497e0cb3dfSMateusz PiotrowskiThe size argument may be suffixed with one of
2507e0cb3dfSMateusz Piotrowski.Cm K , M , G
2517e0cb3dfSMateusz Piotrowskior
2527e0cb3dfSMateusz Piotrowski.Cm T
2537e0cb3dfSMateusz Piotrowski(either upper or lower case)
2547e0cb3dfSMateusz Piotrowskito indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes.
255cde1f5b8SJohn BaldwinIf no suffix is given, the value is assumed to be in megabytes.
2566ee52c65SRoman Bogorodskiy.Pp
2577e0cb3dfSMateusz PiotrowskiThe default is 256M.
258621b5090SJohn Baldwin.It Fl o Ar var Ns Cm = Ns Ar value
259621b5090SJohn BaldwinSet the configuration variable
260621b5090SJohn Baldwin.Ar var
261621b5090SJohn Baldwinto
262621b5090SJohn Baldwin.Ar value .
263ccb1c87aSMateusz Piotrowski.It Fl P
264ccb1c87aSMateusz PiotrowskiForce the guest virtual CPU to exit when a PAUSE instruction is detected.
26590df5437SMateusz Piotrowski.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu
2669b6155a2SNeel NatuPin guest's virtual CPU
2679b6155a2SNeel Natu.Em vcpu
2689b6155a2SNeel Natuto
2699b6155a2SNeel Natu.Em hostcpu .
2708120190fSFelix JohnsonHost CPUs and guest virtual CPUs are numbered starting from 0.
2718120190fSFelix JohnsonA
2728120190fSFelix Johnson.Fl p
2738120190fSFelix Johnsonoption is required for every guest vCPU to be pinned.
2748120190fSFelix JohnsonTo map a 4 vCPU guest to host CPUs 12-15:
2758120190fSFelix Johnson.Bd -literal
2768120190fSFelix Johnson-p 0:12 -p 1:13 -p 2:14 -p 3:15
2778120190fSFelix Johnson.Ed
278483d953aSJohn Baldwin.It Fl r Ar file
279483d953aSJohn BaldwinResume a guest from a snapshot.
280483d953aSJohn BaldwinThe guest memory contents are restored from
281483d953aSJohn Baldwin.Ar file ,
282483d953aSJohn Baldwinand the guest device and vCPU state are restored from the file
283483d953aSJohn Baldwin.Dq Ar file Ns .kern .
284483d953aSJohn Baldwin.Pp
285a3b3e89fSBenedict ReuschlingNote that the current snapshot file format requires that the
286a3b3e89fSBenedict Reuschlingconfiguration of devices in the new VM match the VM from which the
287a3b3e89fSBenedict Reuschlingsnapshot was taken by specifying the same
288b24eea8cSMateusz Piotrowski.Fl s
289483d953aSJohn Baldwinand
290b24eea8cSMateusz Piotrowski.Fl l
291483d953aSJohn Baldwinoptions.
292483d953aSJohn BaldwinThe count of vCPUs and memory configuration are read from the snapshot.
293ccb1c87aSMateusz Piotrowski.It Fl S
294ccb1c87aSMateusz PiotrowskiWire guest memory.
295449f0e48SMateusz Piotrowski.It Fl s Cm help
296449f0e48SMateusz PiotrowskiPrint a list of supported PCI devices.
297449f0e48SMateusz Piotrowski.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf
298b13e60daSPeter GrehanConfigure a virtual PCI slot and function.
299b13e60daSPeter Grehan.Pp
30084fe889cSChristian Brueffer.Nm
301b13e60daSPeter Grehanprovides PCI bus emulation and virtual devices that can be attached to
302b13e60daSPeter Grehanslots on the bus.
303b13e60daSPeter GrehanThere are 32 available slots, with the option of providing up to 8 functions
304b13e60daSPeter Grehanper slot.
305234d8c47SMateusz Piotrowski.Pp
306234d8c47SMateusz PiotrowskiThe
307234d8c47SMateusz Piotrowski.Ar slot
308234d8c47SMateusz Piotrowskican be specified in one of the following formats:
309234d8c47SMateusz Piotrowski.Pp
310234d8c47SMateusz Piotrowski.Bl -bullet -compact
311234d8c47SMateusz Piotrowski.It
312234d8c47SMateusz Piotrowski.Ar pcislot
313234d8c47SMateusz Piotrowski.It
314234d8c47SMateusz Piotrowski.Sm off
315234d8c47SMateusz Piotrowski.Ar pcislot Cm \&: Ar function
316234d8c47SMateusz Piotrowski.Sm on
317234d8c47SMateusz Piotrowski.It
318234d8c47SMateusz Piotrowski.Sm off
319234d8c47SMateusz Piotrowski.Ar bus Cm \&: Ar pcislot Cm \&: Ar function
320234d8c47SMateusz Piotrowski.Sm on
321234d8c47SMateusz Piotrowski.El
322b13e60daSPeter Grehan.Pp
323b13e60daSPeter GrehanThe
324b13e60daSPeter Grehan.Ar pcislot
32584fe889cSChristian Brueffervalue is 0 to 31.
32684fe889cSChristian BruefferThe optional
32784fe889cSChristian Brueffer.Ar function
32884fe889cSChristian Brueffervalue is 0 to 7.
32984fe889cSChristian BruefferThe optional
33006db1b4aSNeel Natu.Ar bus
33106db1b4aSNeel Natuvalue is 0 to 255.
33284fe889cSChristian BruefferIf not specified, the
33384fe889cSChristian Brueffer.Ar function
33484fe889cSChristian Brueffervalue defaults to 0.
33584fe889cSChristian BruefferIf not specified, the
33684fe889cSChristian Brueffer.Ar bus
33784fe889cSChristian Brueffervalue defaults to 0.
338234d8c47SMateusz Piotrowski.Pp
339234d8c47SMateusz PiotrowskiThe
340234d8c47SMateusz Piotrowski.Ar emulation
341234d8c47SMateusz Piotrowskiargument
342234d8c47SMateusz Piotrowskican be one of the following:
3437014cb23SMateusz Piotrowski.Bl -tag -width "amd_hostbridge"
3447014cb23SMateusz Piotrowski.It Cm hostbridge
3457014cb23SMateusz PiotrowskiA simple host bridge.
346b13e60daSPeter GrehanThis is usually configured at slot 0, and is required by most guest
347b13e60daSPeter Grehanoperating systems.
3487014cb23SMateusz Piotrowski.It Cm amd_hostbridge
3497014cb23SMateusz PiotrowskiEmulation identical to
3507014cb23SMateusz Piotrowski.Cm hostbridge
3517014cb23SMateusz Piotrowskiusing a PCI vendor ID of AMD.
3527014cb23SMateusz Piotrowski.It Cm passthru
353b13e60daSPeter GrehanPCI pass-through device.
3547014cb23SMateusz Piotrowski.It Cm virtio-net
355b13e60daSPeter GrehanVirtio network interface.
3567014cb23SMateusz Piotrowski.It Cm virtio-blk
357b13e60daSPeter GrehanVirtio block storage interface.
3587014cb23SMateusz Piotrowski.It Cm virtio-scsi
359f9c005a1SMarcelo AraujoVirtio SCSI interface.
3607014cb23SMateusz Piotrowski.It Cm virtio-9p
361100353cfSJakub Wojciech KlamaVirtio 9p (VirtFS) interface.
3627014cb23SMateusz Piotrowski.It Cm virtio-rnd
3639d0c4e17SPeter GrehanVirtio RNG interface.
3647014cb23SMateusz Piotrowski.It Cm virtio-console
3655121b6ccSRoman BogorodskiyVirtio console interface, which exposes multiple ports
3665121b6ccSRoman Bogorodskiyto the guest in the form of simple char devices for simple IO
3675121b6ccSRoman Bogorodskiybetween the guest and host userspaces.
368054accacSCorvin Köhne.It Cm virtio-input
369054accacSCorvin KöhneVirtio input interface.
3707014cb23SMateusz Piotrowski.It Cm ahci
371d6099860SMaxim KonovalovAHCI controller attached to arbitrary devices.
3727014cb23SMateusz Piotrowski.It Cm ahci-cd
373b13e60daSPeter GrehanAHCI controller attached to an ATAPI CD/DVD.
3747014cb23SMateusz Piotrowski.It Cm ahci-hd
3757014cb23SMateusz PiotrowskiAHCI controller attached to a SATA hard drive.
3767014cb23SMateusz Piotrowski.It Cm e1000
3779e749f25SAlexander MotinIntel e82545 network interface.
3787014cb23SMateusz Piotrowski.It Cm uart
379b13e60daSPeter GrehanPCI 16550 serial device.
3807014cb23SMateusz Piotrowski.It Cm lpc
3817014cb23SMateusz PiotrowskiLPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports,
3827014cb23SMateusz Piotrowskia boot ROM, and,
383d85147f3SCorvin Köhneoptionally, a fwcfg type and the debug/test device.
3849b1aa8d6SNeel NatuThe LPC bridge emulation can only be configured on bus 0.
3857014cb23SMateusz Piotrowski.It Cm fbuf
3866c87a2c0SGleb SmirnoffRaw framebuffer device attached to VNC server.
3877014cb23SMateusz Piotrowski.It Cm xhci
3885c3ec676SGleb SmirnoffeXtensible Host Controller Interface (xHCI) USB controller.
3897014cb23SMateusz Piotrowski.It Cm nvme
390c066c68cSMarcelo AraujoNVM Express (NVMe) controller.
3917014cb23SMateusz Piotrowski.It Cm hda
39236f9f044SWarner LoshHigh Definition Audio Controller.
393b13e60daSPeter Grehan.El
394234d8c47SMateusz Piotrowski.Pp
395234d8c47SMateusz PiotrowskiThe optional parameter
396234d8c47SMateusz Piotrowski.Ar conf
397234d8c47SMateusz Piotrowskidescribes the backend for device emulations.
398b13e60daSPeter GrehanIf
399b13e60daSPeter Grehan.Ar conf
400b13e60daSPeter Grehanis not specified, the device emulation has no backend and can be
401b13e60daSPeter Grehanconsidered unconnected.
402b13e60daSPeter Grehan.Pp
4038d9fefe6SMateusz PiotrowskiNetwork device backends:
4047fb22729SMateusz Piotrowski.Sm off
4057fb22729SMateusz Piotrowski.Bl -bullet
4067fb22729SMateusz Piotrowski.It
4077fb22729SMateusz Piotrowski.Xo
4087fb22729SMateusz Piotrowski.Cm tap Ar N
4097fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4107fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4117fb22729SMateusz Piotrowski.Xc
4127fb22729SMateusz Piotrowski.It
4137fb22729SMateusz Piotrowski.Xo
4147fb22729SMateusz Piotrowski.Cm vmnet Ar N
4157fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4167fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4177fb22729SMateusz Piotrowski.Xc
4187fb22729SMateusz Piotrowski.It
4197fb22729SMateusz Piotrowski.Xo
4207fb22729SMateusz Piotrowski.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK
4217fb22729SMateusz Piotrowski.Op Cm \&,socket= Ar NAME
4227fb22729SMateusz Piotrowski.Op Cm \&,hook= Ar HOOK
4237fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4247fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4257fb22729SMateusz Piotrowski.Xc
426c5359e2aSMark Johnston.It
427c5359e2aSMark Johnston.Xo
428c5359e2aSMark Johnston.Cm slirp,hostfwd= Ar proto : Ar hostaddr : Ar hostport - Ar guestaddr : Ar guestport
429c5359e2aSMark Johnston.Xc
4307fb22729SMateusz Piotrowski.El
4317fb22729SMateusz Piotrowski.Sm on
432baf753ccSJohn Baldwin.Pp
433b13e60daSPeter GrehanIf
4347fb22729SMateusz Piotrowski.Cm mac
435b13e60daSPeter Grehanis not specified, the MAC address is derived from a fixed OUI and the
436b13e60daSPeter Grehanremaining bytes from an MD5 hash of the slot and function numbers and
437b13e60daSPeter Grehanthe device name.
438b13e60daSPeter Grehan.Pp
439b13e60daSPeter GrehanThe MAC address is an ASCII string in
440b13e60daSPeter Grehan.Xr ethers 5
441b13e60daSPeter Grehanformat.
442692dbfe9SVincenzo Maffione.Pp
4437fb22729SMateusz PiotrowskiWith
4447fb22729SMateusz Piotrowski.Cm virtio-net
4457fb22729SMateusz Piotrowskidevices, the
4467fb22729SMateusz Piotrowski.Cm mtu
447692dbfe9SVincenzo Maffioneparameter can be specified to inform the guest about the largest MTU
448692dbfe9SVincenzo Maffionethat should be allowed, expressed in bytes.
449e90337e4SAleksandr Fedorov.Pp
4507fb22729SMateusz PiotrowskiWith
4517fb22729SMateusz Piotrowski.Cm netgraph
4527fb22729SMateusz Piotrowskibackend, the
4537fb22729SMateusz Piotrowski.Cm path
454e90337e4SAleksandr Fedorovand
4557fb22729SMateusz Piotrowski.Cm peerhook
456e90337e4SAleksandr Fedorovparameters must be specified to set the destination node and corresponding hook.
457e90337e4SAleksandr FedorovThe optional parameters
4587fb22729SMateusz Piotrowski.Cm socket
459e90337e4SAleksandr Fedorovand
4607fb22729SMateusz Piotrowski.Cm hook
461e90337e4SAleksandr Fedorovmay be used to set the
462e90337e4SAleksandr Fedorov.Xr ng_socket 4
463e90337e4SAleksandr Fedorovnode name and source hook.
464e90337e4SAleksandr FedorovThe
465e90337e4SAleksandr Fedorov.Ar ADDRESS ,
4667fb22729SMateusz Piotrowski.Ar HOOK ,
467e90337e4SAleksandr Fedorovand
468e90337e4SAleksandr Fedorov.Ar NAME
469e90337e4SAleksandr Fedorovmust comply with
470e90337e4SAleksandr Fedorov.Xr netgraph 4
471e90337e4SAleksandr Fedorovaddressing rules.
472b13e60daSPeter Grehan.Pp
473c5359e2aSMark JohnstonThe slirp backend can be used to provide a NATed network to the guest.
474c5359e2aSMark JohnstonThis backend has poor performance but does not require any network
475c5359e2aSMark Johnstonconfiguration on the host system.
476c5359e2aSMark JohnstonIt depends on the
477c5359e2aSMark Johnston.Pa net/libslirp
478c5359e2aSMark Johnstonport.
479c5359e2aSMark JohnstonThe
480c5359e2aSMark Johnston.Cm hostfwd
481c5359e2aSMark Johnstonoption takes a 5-tuple describing how connections from the host are to be
482c5359e2aSMark Johnstonforwarded to the guest.
483c5359e2aSMark JohnstonMultiple rules can be specified, separated by semicolons.
484c5359e2aSMark JohnstonNote that semicolons must be escaped or quoted to prevent the shell from
485c5359e2aSMark Johnstoninterpreting them.
486c5359e2aSMark Johnston.Pp
4875232a35fSMateusz PiotrowskiBlock storage device backends:
4885232a35fSMateusz Piotrowski.Sm off
4895232a35fSMateusz Piotrowski.Bl -bullet
4905232a35fSMateusz Piotrowski.It
4915232a35fSMateusz Piotrowski.Ar /filename Op Cm \&, Ar block-device-options
4925232a35fSMateusz Piotrowski.It
4935232a35fSMateusz Piotrowski.Ar /dev/xxx Op Cm \&, Ar block-device-options
4944e43c1e8SNeel Natu.El
4955232a35fSMateusz Piotrowski.Sm on
4964e43c1e8SNeel Natu.Pp
4974e43c1e8SNeel NatuThe
4984e43c1e8SNeel Natu.Ar block-device-options
4994e43c1e8SNeel Natuare:
5005232a35fSMateusz Piotrowski.Bl -tag -width 10n
5015232a35fSMateusz Piotrowski.It Cm nocache
502b13e60daSPeter GrehanOpen the file with
503b13e60daSPeter Grehan.Dv O_DIRECT .
5045232a35fSMateusz Piotrowski.It Cm direct
505b13e60daSPeter GrehanOpen the file using
506b13e60daSPeter Grehan.Dv O_SYNC .
5075232a35fSMateusz Piotrowski.It Cm ro
508b13e60daSPeter GrehanForce the file to be opened read-only.
5095232a35fSMateusz Piotrowski.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc
5104e43c1e8SNeel NatuSpecify the logical and physical sector sizes of the emulated disk.
5114e43c1e8SNeel NatuThe physical sector size is optional and is equal to the logical sector size
5124e43c1e8SNeel Natuif not explicitly specified.
5135232a35fSMateusz Piotrowski.It Cm nodelete
514e6d795d1SAllan JudeDisable emulation of guest trim requests via
515e6d795d1SAllan Jude.Dv DIOCGDELETE
516e6d795d1SAllan Juderequests.
517480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
518480bef94SCorvin KöhneAdd the device to the bootorder at
519480bef94SCorvin Köhne.Ar index .
520480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
521480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
522480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
523b13e60daSPeter Grehan.El
524b13e60daSPeter Grehan.Pp
5257c5829c9SMateusz PiotrowskiSCSI device backends:
5267c5829c9SMateusz Piotrowski.Sm off
5277c5829c9SMateusz Piotrowski.Bl -bullet
5287c5829c9SMateusz Piotrowski.It
5297c5829c9SMateusz Piotrowski.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc
53049f87822SAlexander Motin.El
5317c5829c9SMateusz Piotrowski.Sm on
53249f87822SAlexander Motin.Pp
53349f87822SAlexander MotinThe
53449f87822SAlexander Motin.Ar scsi-device-options
53549f87822SAlexander Motinare:
53649f87822SAlexander Motin.Bl -tag -width 10n
5377c5829c9SMateusz Piotrowski.It Cm iid= Ns Ar IID
53849f87822SAlexander MotinInitiator ID to use when sending requests to specified CTL port.
53949f87822SAlexander MotinThe default value is 0.
540480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
541480bef94SCorvin KöhneAdd the device to the bootorder at
542480bef94SCorvin Köhne.Ar index .
543480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
544480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
545480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
546f9c005a1SMarcelo Araujo.El
547f9c005a1SMarcelo Araujo.Pp
5482d00b570SMateusz Piotrowski9P device backends:
5492d00b570SMateusz Piotrowski.Sm off
5502d00b570SMateusz Piotrowski.Bl -bullet
5512d00b570SMateusz Piotrowski.It
5522d00b570SMateusz Piotrowski.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options
553100353cfSJakub Wojciech Klama.El
5542d00b570SMateusz Piotrowski.Sm on
555100353cfSJakub Wojciech Klama.Pp
556100353cfSJakub Wojciech KlamaThe
557100353cfSJakub Wojciech Klama.Ar 9p-device-options
558100353cfSJakub Wojciech Klamaare:
559100353cfSJakub Wojciech Klama.Bl -tag -width 10n
5602d00b570SMateusz Piotrowski.It Cm ro
561100353cfSJakub Wojciech KlamaExpose the share in read-only mode.
562100353cfSJakub Wojciech Klama.El
563100353cfSJakub Wojciech Klama.Pp
5642fda01a1SMateusz PiotrowskiTTY device backends:
565b13e60daSPeter Grehan.Bl -tag -width 10n
5662fda01a1SMateusz Piotrowski.It Cm stdio
567b13e60daSPeter GrehanConnect the serial port to the standard input and output of
56884fe889cSChristian Bruefferthe
56984fe889cSChristian Brueffer.Nm
57084fe889cSChristian Bruefferprocess.
5712fda01a1SMateusz Piotrowski.It Ar /dev/xxx
572b13e60daSPeter GrehanUse the host TTY device for serial port I/O.
573b13e60daSPeter Grehan.El
574b13e60daSPeter Grehan.Pp
57567c26eb2SCorvin KöhneTPM device backends:
57667c26eb2SCorvin Köhne.Bl -tag -width 10n
57767c26eb2SCorvin Köhne.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options
57867c26eb2SCorvin KöhneEmulate a TPM device.
57967c26eb2SCorvin Köhne.El
58067c26eb2SCorvin Köhne.Pp
58167c26eb2SCorvin KöhneThe
58267c26eb2SCorvin Köhne.Ar tpm-device-options
58367c26eb2SCorvin Köhneare:
58467c26eb2SCorvin Köhne.Bl -tag -width 10n
58567c26eb2SCorvin Köhne.It Cm version= Ns Ar version
58667c26eb2SCorvin KöhneVersion of the TPM device according to the TCG specification.
58767c26eb2SCorvin KöhneDefaults to
58867c26eb2SCorvin Köhne.Cm 2.0
58967c26eb2SCorvin Köhne.El
59067c26eb2SCorvin Köhne.Pp
5912fda01a1SMateusz PiotrowskiBoot ROM device backends:
5929b1aa8d6SNeel Natu.Bl -tag -width 10n
593866036f4SRebecca Cran.It Ar romfile Ns Op Cm \&, Ns Ar varfile
5949b1aa8d6SNeel NatuMap
5959b1aa8d6SNeel Natu.Ar romfile
5969b1aa8d6SNeel Natuin the guest address space reserved for boot firmware.
597866036f4SRebecca CranIf
598866036f4SRebecca Cran.Ar varfile
599866036f4SRebecca Cranis provided, that file is also mapped in the boot firmware guest
600866036f4SRebecca Cranaddress space, and any modifications the guest makes will be saved
601866036f4SRebecca Cranto that file.
6029b1aa8d6SNeel Natu.El
6039b1aa8d6SNeel Natu.Pp
604d85147f3SCorvin KöhneFwcfg types:
605d85147f3SCorvin Köhne.Bl -tag -width 10n
606d85147f3SCorvin Köhne.It Ar fwcfg
607a3b3e89fSBenedict ReuschlingThe fwcfg interface is used to pass information such as the CPU count
608a3b3e89fSBenedict Reuschlingor ACPI tables to the guest firmware.
609d85147f3SCorvin KöhneSupported values are
610d85147f3SCorvin Köhne.Ql bhyve
611d85147f3SCorvin Köhneand
612d85147f3SCorvin Köhne.Ql qemu .
613d85147f3SCorvin KöhneDue to backward compatibility reasons,
614d85147f3SCorvin Köhne.Ql bhyve
615d85147f3SCorvin Köhneis the default option.
616d85147f3SCorvin KöhneWhen
617d85147f3SCorvin Köhne.Ql bhyve
618d85147f3SCorvin Köhneis used, bhyve's fwctl interface is used.
619d85147f3SCorvin KöhneIt currently reports only the CPU count to the guest firmware.
620d85147f3SCorvin KöhneThe
621d85147f3SCorvin Köhne.Ql qemu
622d85147f3SCorvin Köhneoption uses QEMU's fwcfg interface.
623a3b3e89fSBenedict ReuschlingThis interface is widely used and allows user-defined information to
624a3b3e89fSBenedict Reuschlingbe passed to the guest.
625a3b3e89fSBenedict ReuschlingIt is used for passing the CPU count, ACPI tables, a boot order and
626a3b3e89fSBenedict Reuschlingmany other things to the guest.
627a3b3e89fSBenedict ReuschlingSome operating systems such as Fedora CoreOS can be configured by
628a3b3e89fSBenedict Reuschlingqemu's fwcfg interface as well.
629d85147f3SCorvin Köhne.El
630d85147f3SCorvin Köhne.Pp
6312fda01a1SMateusz PiotrowskiPass-through device backends:
632baf753ccSJohn Baldwin.Sm off
633baf753ccSJohn Baldwin.Bl -bullet
634baf753ccSJohn Baldwin.It
635baf753ccSJohn Baldwin.Cm ppt Ar N Oo , Ar passthru-device-options Oc
636baf753ccSJohn Baldwin.It
637baf753ccSJohn Baldwin.Ns Ar bus Cm \&/ Ar slot Cm \&/ Ar function
638baf753ccSJohn Baldwin.Op , Ar passthru-device-options
639baf753ccSJohn Baldwin.It
640baf753ccSJohn Baldwin.Cm pci Ar bus Cm : Ar slot Cm : Ns Ar function
641baf753ccSJohn Baldwin.Op , Ar passthru-device-options
642baf753ccSJohn Baldwin.El
643baf753ccSJohn Baldwin.Sm on
644baf753ccSJohn Baldwin.Pp
645baf753ccSJohn BaldwinConnect to a PCI device on the host either named ppt
646baf753ccSJohn Baldwin.Ns Ar N
647baf753ccSJohn Baldwinor at the selector described by
648b13e60daSPeter Grehan.Ar slot ,
649b13e60daSPeter Grehan.Ar bus ,
650b13e60daSPeter Grehanand
651b13e60daSPeter Grehan.Ar function
652b13e60daSPeter Grehannumbers.
653baf753ccSJohn Baldwin.Pp
654baf753ccSJohn BaldwinThe
655baf753ccSJohn Baldwin.Ar passthru-device-options
656baf753ccSJohn Baldwinare:
657baf753ccSJohn Baldwin.Bl -tag -width 10n
6585e19a518SMateusz Piotrowski.It Cm rom= Ns Ar romfile
659e47fe318SCorvin KöhneAdd
660e47fe318SCorvin Köhne.Ar romfile
661e47fe318SCorvin Köhneas option ROM to the PCI device.
662a3b3e89fSBenedict ReuschlingThe ROM will be loaded by firmware and should be capable of
663a3b3e89fSBenedict Reuschlinginitializing the device.
664480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
665480bef94SCorvin KöhneAdd the device to the bootorder at
666480bef94SCorvin Köhne.Ar index .
667480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
668480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
669480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
670b13e60daSPeter Grehan.El
671b13e60daSPeter Grehan.Pp
6729b1aa8d6SNeel NatuGuest memory must be wired using the
6739b1aa8d6SNeel Natu.Fl S
6749b1aa8d6SNeel Natuoption when a pass-through device is configured.
6759b1aa8d6SNeel Natu.Pp
676b13e60daSPeter GrehanThe host device must have been reserved at boot-time using the
677a9258f9bSWarren Block.Va pptdevs
678b13e60daSPeter Grehanloader variable as described in
679b13e60daSPeter Grehan.Xr vmm 4 .
6805121b6ccSRoman Bogorodskiy.Pp
68167c26eb2SCorvin KöhneTPM devices:
68267c26eb2SCorvin Köhne.Bl -tag -width 10n
68367c26eb2SCorvin Köhne.It Ns Ar type
68467c26eb2SCorvin KöhneSpecifies the type of the TPM device.
68567c26eb2SCorvin Köhne.Pp
68667c26eb2SCorvin KöhneSupported types:
68767c26eb2SCorvin Köhne.Bl -tag -width 10n
68867c26eb2SCorvin Köhne.It Cm passthru
68967c26eb2SCorvin Köhne.El
69067c26eb2SCorvin Köhne.It Cm version= Ns Ar version
69167c26eb2SCorvin KöhneThe
69267c26eb2SCorvin Köhne.Ar version
69367c26eb2SCorvin Köhneof the emulated TPM device according to the TCG specification.
69467c26eb2SCorvin Köhne.Pp
69567c26eb2SCorvin KöhneSupported versions:
69667c26eb2SCorvin Köhne.Bl -tag -width 10n
69767c26eb2SCorvin Köhne.It Cm 2.0
69867c26eb2SCorvin Köhne.El
69967c26eb2SCorvin Köhne.El
70067c26eb2SCorvin Köhne.Pp
7013f4c771fSMateusz PiotrowskiVirtio console device backends:
7023f4c771fSMateusz Piotrowski.Bl -bullet
7033f4c771fSMateusz Piotrowski.Sm off
7043f4c771fSMateusz Piotrowski.It
7053f4c771fSMateusz Piotrowski.Cm port1= Ns Ar /path/to/port1.sock Ns Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ...
7063f4c771fSMateusz Piotrowski.Sm on
7073f4c771fSMateusz Piotrowski.El
7083f4c771fSMateusz Piotrowski.Pp
7095121b6ccSRoman BogorodskiyA maximum of 16 ports per device can be created.
7105121b6ccSRoman BogorodskiyEvery port is named and corresponds to a Unix domain socket created by
7115121b6ccSRoman Bogorodskiy.Nm .
7125121b6ccSRoman Bogorodskiy.Nm
7135121b6ccSRoman Bogorodskiyaccepts at most one connection per port at a time.
7145121b6ccSRoman Bogorodskiy.Pp
7155121b6ccSRoman BogorodskiyLimitations:
7168d9fefe6SMateusz Piotrowski.Bl -bullet
7175121b6ccSRoman Bogorodskiy.It
7185121b6ccSRoman BogorodskiyDue to lack of destructors in
7195121b6ccSRoman Bogorodskiy.Nm ,
7205121b6ccSRoman Bogorodskiysockets on the filesystem must be cleaned up manually after
7215121b6ccSRoman Bogorodskiy.Nm
7225121b6ccSRoman Bogorodskiyexits.
7235121b6ccSRoman Bogorodskiy.It
7243f4c771fSMateusz PiotrowskiThere is no way to use the
7253f4c771fSMateusz Piotrowski.Dq console port
7263f4c771fSMateusz Piotrowskifeature, nor the console port
7270ee3a4b4SRoman Bogorodskiyresize at present.
7285121b6ccSRoman Bogorodskiy.It
7290ee3a4b4SRoman BogorodskiyEmergency write is advertised, but no-op at present.
7305121b6ccSRoman Bogorodskiy.El
7316c87a2c0SGleb Smirnoff.Pp
732054accacSCorvin KöhneVirtio input device backends:
733054accacSCorvin Köhne.Bl -tag -width 10n
734054accacSCorvin Köhne.It Ar /dev/input/eventX
735054accacSCorvin KöhneSend input events of
736054accacSCorvin Köhne.Ar /dev/input/eventX
737054accacSCorvin Köhneto guest by VirtIO Input Interface.
738054accacSCorvin Köhne.El
739054accacSCorvin Köhne.Pp
7408b97e975SMateusz PiotrowskiFramebuffer devices backends:
7418b97e975SMateusz Piotrowski.Bl -bullet
7428b97e975SMateusz Piotrowski.Sm off
7438b97e975SMateusz Piotrowski.It
7448b97e975SMateusz Piotrowski.Op Cm rfb= Ar ip-and-port
7458b97e975SMateusz Piotrowski.Op Cm ,w= Ar width
7468b97e975SMateusz Piotrowski.Op Cm ,h= Ar height
7478b97e975SMateusz Piotrowski.Op Cm ,vga= Ar vgaconf
7488b97e975SMateusz Piotrowski.Op Cm ,wait
7498b97e975SMateusz Piotrowski.Op Cm ,password= Ar password
7508b97e975SMateusz Piotrowski.Sm on
7518b97e975SMateusz Piotrowski.El
7528b97e975SMateusz Piotrowski.Pp
7538b97e975SMateusz PiotrowskiConfiguration options are defined as follows:
7545c3ec676SGleb Smirnoff.Bl -tag -width 10n
7558b97e975SMateusz Piotrowski.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port
7568b97e975SMateusz PiotrowskiAn IP address and a port VNC should listen on.
7578b97e975SMateusz PiotrowskiThere are two formats:
7588b97e975SMateusz Piotrowski.Pp
7598b97e975SMateusz Piotrowski.Bl -bullet -compact
7608d9fefe6SMateusz Piotrowski.It
7618b97e975SMateusz Piotrowski.Sm off
7628b97e975SMateusz Piotrowski.Op Ar IPv4 Cm \&:
7635c3ec676SGleb Smirnoff.Ar port
7648b97e975SMateusz Piotrowski.Sm on
7658d9fefe6SMateusz Piotrowski.It
7668b97e975SMateusz Piotrowski.Sm off
7678b97e975SMateusz Piotrowski.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port
7688b97e975SMateusz Piotrowski.Sm on
7698b97e975SMateusz Piotrowski.El
7708b97e975SMateusz Piotrowski.Pp
7716c87a2c0SGleb SmirnoffThe default is to listen on localhost IPv4 address and default VNC port 5900.
7728883128bSBjoern A. ZeebAn IPv6 address must be enclosed in square brackets and may contain an
7737d9545fcSRodney W. Grimesoptional zone identifier.
7748b97e975SMateusz Piotrowski.It Cm w= Ns Ar width No and Cm h= Ns Ar height
7755c3ec676SGleb SmirnoffA display resolution, width and height, respectively.
7765c3ec676SGleb SmirnoffIf not specified, a default resolution of 1024x768 pixels will be used.
7775c3ec676SGleb SmirnoffMinimal supported resolution is 640x480 pixels,
7780600b575SRobert Wingand maximum is 3840x2160 pixels.
7798b97e975SMateusz Piotrowski.It Cm vga= Ns Ar vgaconf
7805c3ec676SGleb SmirnoffPossible values for this option are
7818b97e975SMateusz Piotrowski.Cm io
7825c3ec676SGleb Smirnoff(default),
7838b97e975SMateusz Piotrowski.Cm on
7845c3ec676SGleb Smirnoff, and
7858b97e975SMateusz Piotrowski.Cm off .
7865c3ec676SGleb SmirnoffPCI graphics cards have a dual personality in that they are
7875c3ec676SGleb Smirnoffstandard PCI devices with BAR addressing, but may also
7885c3ec676SGleb Smirnoffimplicitly decode legacy VGA I/O space
7895c3ec676SGleb Smirnoff.Pq Ad 0x3c0-3df
7905c3ec676SGleb Smirnoffand memory space
7915c3ec676SGleb Smirnoff.Pq 64KB at Ad 0xA0000 .
7925c3ec676SGleb SmirnoffThe default
7938b97e975SMateusz Piotrowski.Cm io
7948d56c805SYuri Pankovoption should be used for guests that attempt to issue BIOS calls which result
7958d56c805SYuri Pankovin I/O port queries, and fail to boot if I/O decode is disabled.
7965c3ec676SGleb Smirnoff.Pp
7975c3ec676SGleb SmirnoffThe
7988b97e975SMateusz Piotrowski.Cm on
7995c3ec676SGleb Smirnoffoption should be used along with the CSM BIOS capability in UEFI
8005c3ec676SGleb Smirnoffto boot traditional BIOS guests that require the legacy VGA I/O and
8015c3ec676SGleb Smirnoffmemory regions to be available.
8025c3ec676SGleb Smirnoff.Pp
8035c3ec676SGleb SmirnoffThe
8048b97e975SMateusz Piotrowski.Cm off
8055c3ec676SGleb Smirnoffoption should be used for the UEFI guests that assume that
8065c3ec676SGleb SmirnoffVGA adapter is present if they detect the I/O ports.
8075c3ec676SGleb SmirnoffAn example of such a guest is
8085c3ec676SGleb Smirnoff.Ox
8095c3ec676SGleb Smirnoffin UEFI mode.
8105c3ec676SGleb Smirnoff.Pp
8115c3ec676SGleb SmirnoffPlease refer to the
8125c3ec676SGleb Smirnoff.Nm
8135c3ec676SGleb Smirnoff.Fx
8145c3ec676SGleb Smirnoffwiki page
8155c3ec676SGleb Smirnoff.Pq Lk https://wiki.freebsd.org/bhyve
8165c3ec676SGleb Smirnofffor configuration notes of particular guests.
8178b97e975SMateusz Piotrowski.It Cm wait
8185c3ec676SGleb SmirnoffInstruct
8195c3ec676SGleb Smirnoff.Nm
8208d56c805SYuri Pankovto only boot upon the initiation of a VNC connection, simplifying the
8218d56c805SYuri Pankovinstallation of operating systems that require immediate keyboard input.
8225c3ec676SGleb SmirnoffThis can be removed for post-installation use.
8238b97e975SMateusz Piotrowski.It Cm password= Ns Ar password
824f4d34383SMarcelo AraujoThis type of authentication is known to be cryptographically weak and is not
825f4d34383SMarcelo Araujointended for use on untrusted networks.
826f4d34383SMarcelo AraujoMany implementations will want to use stronger security, such as running
827f4d34383SMarcelo Araujothe session over an encrypted channel provided by IPsec or SSH.
8285c3ec676SGleb Smirnoff.El
8296c87a2c0SGleb Smirnoff.Pp
8306eff58acSMateusz PiotrowskixHCI USB device backends:
8315c3ec676SGleb Smirnoff.Bl -tag -width 10n
8326eff58acSMateusz Piotrowski.It Cm tablet
8335c3ec676SGleb SmirnoffA USB tablet device which provides precise cursor synchronization
8345c3ec676SGleb Smirnoffwhen using VNC.
8356c87a2c0SGleb Smirnoff.El
836c066c68cSMarcelo Araujo.Pp
8376eff58acSMateusz PiotrowskiNVMe device backends:
8386eff58acSMateusz Piotrowski.Bl -bullet
8396eff58acSMateusz Piotrowski.Sm off
8406eff58acSMateusz Piotrowski.It
8416eff58acSMateusz Piotrowski.Ar devpath
8426eff58acSMateusz Piotrowski.Op Cm ,maxq= Ar #
8436eff58acSMateusz Piotrowski.Op Cm ,qsz= Ar #
8446eff58acSMateusz Piotrowski.Op Cm ,ioslots= Ar #
8456eff58acSMateusz Piotrowski.Op Cm ,sectsz= Ar #
8466eff58acSMateusz Piotrowski.Op Cm ,ser= Ar #
8476eff58acSMateusz Piotrowski.Op Cm ,eui64= Ar #
8486eff58acSMateusz Piotrowski.Op Cm ,dsm= Ar opt
8496eff58acSMateusz Piotrowski.Sm on
8506eff58acSMateusz Piotrowski.El
8516eff58acSMateusz Piotrowski.Pp
8526eff58acSMateusz PiotrowskiConfiguration options are defined as follows:
853c066c68cSMarcelo Araujo.Bl -tag -width 10n
8546eff58acSMateusz Piotrowski.It Ar devpath
855c066c68cSMarcelo AraujoAccepted device paths are:
856c066c68cSMarcelo Araujo.Ar /dev/blockdev
857c066c68cSMarcelo Araujoor
858c066c68cSMarcelo Araujo.Ar /path/to/image
859c066c68cSMarcelo Araujoor
8606eff58acSMateusz Piotrowski.Cm ram= Ns Ar size_in_MiB .
8616eff58acSMateusz Piotrowski.It Cm maxq
862c066c68cSMarcelo AraujoMax number of queues.
8636eff58acSMateusz Piotrowski.It Cm qsz
864c066c68cSMarcelo AraujoMax elements in each queue.
8656eff58acSMateusz Piotrowski.It Cm ioslots
866c066c68cSMarcelo AraujoMax number of concurrent I/O requests.
8676eff58acSMateusz Piotrowski.It Cm sectsz
868c066c68cSMarcelo AraujoSector size (defaults to blockif sector size).
8696eff58acSMateusz Piotrowski.It Cm ser
870c066c68cSMarcelo AraujoSerial number with maximum 20 characters.
8716eff58acSMateusz Piotrowski.It Cm eui64
8726eff58acSMateusz PiotrowskiIEEE Extended Unique Identifier (8 byte value).
8736eff58acSMateusz Piotrowski.It Cm dsm
8746eff58acSMateusz PiotrowskiDataSet Management support.
8756eff58acSMateusz PiotrowskiSupported values are:
8766eff58acSMateusz Piotrowski.Cm auto , enable ,
8776eff58acSMateusz Piotrowskiand
8786eff58acSMateusz Piotrowski.Cm disable .
879c066c68cSMarcelo Araujo.El
88036f9f044SWarner Losh.Pp
881d5fcc4b6SMateusz PiotrowskiAHCI device backends:
882d5fcc4b6SMateusz Piotrowski.Bl -bullet
883d5fcc4b6SMateusz Piotrowski.It
884d5fcc4b6SMateusz Piotrowski.Sm off
885d5fcc4b6SMateusz Piotrowski.Op Oo Cm hd\&: | cd\&: Oc Ar path
886d5fcc4b6SMateusz Piotrowski.Op Cm ,nmrr= Ar nmrr
887d5fcc4b6SMateusz Piotrowski.Op Cm ,ser= Ar #
888d5fcc4b6SMateusz Piotrowski.Op Cm ,rev= Ar #
889d5fcc4b6SMateusz Piotrowski.Op Cm ,model= Ar #
890d5fcc4b6SMateusz Piotrowski.Sm on
891d5fcc4b6SMateusz Piotrowski.El
892d5fcc4b6SMateusz Piotrowski.Pp
893d5fcc4b6SMateusz PiotrowskiConfiguration options are defined as follows:
8949af3bcd7SPeter Grehan.Bl -tag -width 10n
895d5fcc4b6SMateusz Piotrowski.It Cm nmrr
896d5fcc4b6SMateusz PiotrowskiNominal Media Rotation Rate, known as RPM.
897d5fcc4b6SMateusz PiotrowskiValue 1 will indicate device as Solid State Disk.
898d5fcc4b6SMateusz PiotrowskiDefault value is 0, not report.
899d5fcc4b6SMateusz Piotrowski.It Cm ser
9009af3bcd7SPeter GrehanSerial Number with maximum 20 characters.
901d5fcc4b6SMateusz Piotrowski.It Cm rev
9029af3bcd7SPeter GrehanRevision Number with maximum 8 characters.
903d5fcc4b6SMateusz Piotrowski.It Cm model
9049af3bcd7SPeter GrehanModel Number with maximum 40 characters.
9059af3bcd7SPeter Grehan.El
9069af3bcd7SPeter Grehan.Pp
907061f37d2SMateusz PiotrowskiHD Audio device backends:
908061f37d2SMateusz Piotrowski.Bl -bullet
909061f37d2SMateusz Piotrowski.It
910061f37d2SMateusz Piotrowski.Sm off
911061f37d2SMateusz Piotrowski.Op Cm play= Ar playback
912061f37d2SMateusz Piotrowski.Op Cm ,rec= Ar recording
913061f37d2SMateusz Piotrowski.Sm on
914061f37d2SMateusz Piotrowski.El
915061f37d2SMateusz Piotrowski.Pp
916061f37d2SMateusz PiotrowskiConfiguration options are defined as follows:
91736f9f044SWarner Losh.Bl -tag -width 10n
918061f37d2SMateusz Piotrowski.It Cm play
91936f9f044SWarner LoshPlayback device, typically
92036f9f044SWarner Losh.Ar /dev/dsp0 .
921061f37d2SMateusz Piotrowski.It Cm rec
92236f9f044SWarner LoshRecording device, typically
92336f9f044SWarner Losh.Ar /dev/dsp0 .
92436f9f044SWarner Losh.El
9255749449dSJohn Baldwin.It Fl U Ar uuid
9265749449dSJohn BaldwinSet the universally unique identifier
9275749449dSJohn Baldwin.Pq UUID
9285749449dSJohn Baldwinin the guest's System Management BIOS System Information structure.
9295749449dSJohn BaldwinBy default a UUID is generated from the host's hostname and
9305749449dSJohn Baldwin.Ar vmname .
931ccb1c87aSMateusz Piotrowski.It Fl u
932ccb1c87aSMateusz PiotrowskiRTC keeps UTC time.
933cde1f5b8SJohn Baldwin.It Fl W
934cde1f5b8SJohn BaldwinForce virtio PCI device emulations to use MSI interrupts instead of MSI-X
935cde1f5b8SJohn Baldwininterrupts.
936ccb1c87aSMateusz Piotrowski.It Fl w
937ccb1c87aSMateusz PiotrowskiIgnore accesses to unimplemented Model Specific Registers (MSRs).
938ccb1c87aSMateusz PiotrowskiThis is intended for debug purposes.
9399777ca20SNeel Natu.It Fl x
9409777ca20SNeel NatuThe guest's local APIC is configured in x2APIC mode.
941b100acf2SNeel Natu.It Fl Y
942b100acf2SNeel NatuDisable MPtable generation.
943b13e60daSPeter Grehan.It Ar vmname
944b13e60daSPeter GrehanAlphanumeric name of the guest.
945b13e60daSPeter GrehanThis should be the same as that created by
946b13e60daSPeter Grehan.Xr bhyveload 8 .
947b13e60daSPeter Grehan.El
948621b5090SJohn Baldwin.Sh CONFIGURATION VARIABLES
949621b5090SJohn Baldwin.Nm
950621b5090SJohn Baldwinuses an internal tree of configuration variables to describe global and
951621b5090SJohn Baldwinper-device settings.
952621b5090SJohn BaldwinWhen
953621b5090SJohn Baldwin.Nm
954621b5090SJohn Baldwinstarts,
955621b5090SJohn Baldwinit parses command line options (including config files) in the order given
956621b5090SJohn Baldwinon the command line.
957621b5090SJohn BaldwinEach command line option sets one or more configuration variables.
958621b5090SJohn BaldwinFor example,
959621b5090SJohn Baldwinthe
960621b5090SJohn Baldwin.Fl s
961621b5090SJohn Baldwinoption creates a new tree node for a PCI device and sets one or more variables
962621b5090SJohn Baldwinunder that node including the device model and device model-specific variables.
963621b5090SJohn BaldwinVariables may be set multiple times during this parsing stage with the final
964621b5090SJohn Baldwinvalue overriding previous values.
965621b5090SJohn Baldwin.Pp
966621b5090SJohn BaldwinOnce all of the command line options have been processed,
967621b5090SJohn Baldwinthe configuration values are frozen.
968621b5090SJohn Baldwin.Nm
969621b5090SJohn Baldwinthen uses the value of configuration values to initialize device models
970621b5090SJohn Baldwinand global settings.
971621b5090SJohn Baldwin.Pp
972621b5090SJohn BaldwinMore details on configuration variables can be found in
973621b5090SJohn Baldwin.Xr bhyve_config 5 .
974cd377eb3SJohn Baldwin.Sh DEBUG SERVER
975cd377eb3SJohn BaldwinThe current debug server provides limited support for debuggers.
976cd377eb3SJohn Baldwin.Ss Registers
977cd377eb3SJohn BaldwinEach virtual CPU is exposed to the debugger as a thread.
978cd377eb3SJohn Baldwin.Pp
979cd377eb3SJohn BaldwinGeneral purpose registers can be queried for each virtual CPU, but other
980cd377eb3SJohn Baldwinregisters such as floating-point and system registers cannot be queried.
981cd377eb3SJohn Baldwin.Ss Memory
982a3b3e89fSBenedict ReuschlingMemory (including memory mapped I/O regions) can be read and written
983a3b3e89fSBenedict Reuschlingby the debugger.
984a3b3e89fSBenedict ReuschlingMemory operations use virtual addresses that are resolved to physical
985a3b3e89fSBenedict Reuschlingaddresses via the current virtual CPU's active address translation.
986cd377eb3SJohn Baldwin.Ss Control
987cd377eb3SJohn BaldwinThe running guest can be interrupted by the debugger at any time
988cd377eb3SJohn Baldwin.Pq for example, by pressing Ctrl-C in the debugger .
989cd377eb3SJohn Baldwin.Pp
990cd377eb3SJohn BaldwinSingle stepping is only supported on Intel CPUs supporting the MTRAP VM exit.
991cd377eb3SJohn Baldwin.Pp
992cbd03a9dSJohn BaldwinBreakpoints are supported on Intel CPUs that support single stepping.
993cbd03a9dSJohn BaldwinNote that continuing from a breakpoint while interrupts are enabled in the
994cbd03a9dSJohn Baldwinguest may not work as expected due to timer interrupts firing while single
995cbd03a9dSJohn Baldwinstepping over the breakpoint.
996c2202d41SRoman Bogorodskiy.Sh SIGNAL HANDLING
997c2202d41SRoman Bogorodskiy.Nm
998c2202d41SRoman Bogorodskiydeals with the following signals:
999c2202d41SRoman Bogorodskiy.Pp
10003357e948SMateusz Piotrowski.Bl -tag -width SIGTERM -compact
1001c2202d41SRoman Bogorodskiy.It SIGTERM
1002c2202d41SRoman BogorodskiyTrigger ACPI poweroff for a VM
1003c2202d41SRoman Bogorodskiy.El
1004c2202d41SRoman Bogorodskiy.Sh EXIT STATUS
1005c2202d41SRoman BogorodskiyExit status indicates how the VM was terminated:
1006c2202d41SRoman Bogorodskiy.Pp
1007c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact
1008c2202d41SRoman Bogorodskiy.It 0
1009c2202d41SRoman Bogorodskiyrebooted
1010c2202d41SRoman Bogorodskiy.It 1
1011c2202d41SRoman Bogorodskiypowered off
1012c2202d41SRoman Bogorodskiy.It 2
1013c2202d41SRoman Bogorodskiyhalted
1014c2202d41SRoman Bogorodskiy.It 3
1015c2202d41SRoman Bogorodskiytriple fault
1016989e062bSMarcelo Araujo.It 4
1017989e062bSMarcelo Araujoexited due to an error
1018c2202d41SRoman Bogorodskiy.El
1019b13e60daSPeter Grehan.Sh EXAMPLES
10205c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must have been loaded with
102184fe889cSChristian Brueffer.Xr bhyveload 8
1022b13e60daSPeter Grehanor a similar boot loader before
1023b13e60daSPeter Grehan.Xr bhyve 4
1024b13e60daSPeter Grehancan be run.
10255c3ec676SGleb SmirnoffOtherwise, the boot loader is not needed.
1026b13e60daSPeter Grehan.Pp
1027b13e60daSPeter GrehanTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio
1028b13e60daSPeter Grehanblock device backed by the
1029b13e60daSPeter Grehan.Pa /my/image
1030b13e60daSPeter Grehanfilesystem image, and a serial port for the console:
1031b13e60daSPeter Grehan.Bd -literal -offset indent
1032b13e60daSPeter Grehanbhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\
1033*10758471SMark Johnston  -l com1,stdio -H -P -m 1G vm1
1034b13e60daSPeter Grehan.Ed
1035b13e60daSPeter Grehan.Pp
1036b13e60daSPeter GrehanRun a 24GB single-CPU virtual machine with three network ports, one of which
1037b13e60daSPeter Grehanhas a MAC address specified:
1038b13e60daSPeter Grehan.Bd -literal -offset indent
1039b13e60daSPeter Grehanbhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\
1040b13e60daSPeter Grehan  -s 2:1,virtio-net,tap1 \\
1041b13e60daSPeter Grehan  -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\
1042b13e60daSPeter Grehan  -s 3,virtio-blk,/my/image -l com1,stdio \\
1043*10758471SMark Johnston  -H -P -m 24G bigvm
1044b13e60daSPeter Grehan.Ed
1045b13e60daSPeter Grehan.Pp
1046b13e60daSPeter GrehanRun an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI
1047b13e60daSPeter GrehanCD-ROM, a single virtio network port, an AMD hostbridge, and the console
1048b13e60daSPeter Grehanport connected to an
1049b13e60daSPeter Grehan.Xr nmdm 4
105084fe889cSChristian Brueffernull-modem device.
1051b13e60daSPeter Grehan.Bd -literal -offset indent
1052a7ab1463SAlexander Motinbhyve -c 4 \\
1053b13e60daSPeter Grehan  -s 0,amd_hostbridge -s 1,lpc \\
1054098f5155SAlexander Motin  -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\
1055098f5155SAlexander Motinhd:/images/disk.3,hd:/images/disk.4,\\
1056098f5155SAlexander Motinhd:/images/disk.5,hd:/images/disk.6,\\
1057098f5155SAlexander Motinhd:/images/disk.7,hd:/images/disk.8,\\
1058098f5155SAlexander Motincd:/images/install.iso \\
1059b13e60daSPeter Grehan  -s 3,virtio-net,tap0 \\
1060b13e60daSPeter Grehan  -l com1,/dev/nmdm0A \\
1061*10758471SMark Johnston  -H -P -m 8G
1062b13e60daSPeter Grehan.Ed
10635c3ec676SGleb Smirnoff.Pp
10645c3ec676SGleb SmirnoffRun a UEFI virtual machine with a display resolution of 800 by 600 pixels
10655c3ec676SGleb Smirnoffthat can be accessed via VNC at: 0.0.0.0:5900.
10665c3ec676SGleb Smirnoff.Bd -literal -offset indent
10675c3ec676SGleb Smirnoffbhyve -c 2 -m 4G -w -H \\
10685c3ec676SGleb Smirnoff  -s 0,hostbridge \\
10695c3ec676SGleb Smirnoff  -s 3,ahci-cd,/path/to/uefi-OS-install.iso \\
10705c3ec676SGleb Smirnoff  -s 4,ahci-hd,disk.img \\
10715c3ec676SGleb Smirnoff  -s 5,virtio-net,tap0 \\
10725c3ec676SGleb Smirnoff  -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\
10735c3ec676SGleb Smirnoff  -s 30,xhci,tablet \\
10745c3ec676SGleb Smirnoff  -s 31,lpc -l com1,stdio \\
10755c3ec676SGleb Smirnoff  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
10765c3ec676SGleb Smirnoff   uefivm
10775c3ec676SGleb Smirnoff.Ed
10788883128bSBjoern A. Zeeb.Pp
10798883128bSBjoern A. ZeebRun a UEFI virtual machine with a VNC display that is bound to all IPv6
10808883128bSBjoern A. Zeebaddresses on port 5900.
10818883128bSBjoern A. Zeeb.Bd -literal -offset indent
10828883128bSBjoern A. Zeebbhyve -c 2 -m 4G -w -H \\
10838883128bSBjoern A. Zeeb  -s 0,hostbridge \\
10848883128bSBjoern A. Zeeb  -s 4,ahci-hd,disk.img \\
10858883128bSBjoern A. Zeeb  -s 5,virtio-net,tap0 \\
10868883128bSBjoern A. Zeeb  -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\
10878883128bSBjoern A. Zeeb  -s 30,xhci,tablet \\
10888883128bSBjoern A. Zeeb  -s 31,lpc -l com1,stdio \\
10898883128bSBjoern A. Zeeb  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
10908883128bSBjoern A. Zeeb   uefivm
10918883128bSBjoern A. Zeeb.Ed
1092866036f4SRebecca Cran.Pp
1093866036f4SRebecca CranRun a UEFI virtual machine with a VARS file to save EFI variables.
1094866036f4SRebecca CranNote that
1095866036f4SRebecca Cran.Nm
1096866036f4SRebecca Cranwill write guest modifications to the given VARS file.
1097866036f4SRebecca CranBe sure to create a per-guest copy of the template VARS file from
1098866036f4SRebecca Cran.Pa /usr .
1099866036f4SRebecca Cran.Bd -literal -offset indent
1100866036f4SRebecca Cranbhyve -c 2 -m 4g -w -H \\
1101866036f4SRebecca Cran  -s 0,hostbridge \\
110266659955SAlexey Marchenko  -s 31,lpc -l com1,stdio \\
1103866036f4SRebecca Cran  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd
1104866036f4SRebecca Cran   uefivm
1105866036f4SRebecca Cran.Ed
1106b13e60daSPeter Grehan.Sh SEE ALSO
1107b13e60daSPeter Grehan.Xr bhyve 4 ,
1108e90337e4SAleksandr Fedorov.Xr netgraph 4 ,
1109e90337e4SAleksandr Fedorov.Xr ng_socket 4 ,
1110b13e60daSPeter Grehan.Xr nmdm 4 ,
1111b13e60daSPeter Grehan.Xr vmm 4 ,
1112621b5090SJohn Baldwin.Xr bhyve_config 5 ,
1113b13e60daSPeter Grehan.Xr ethers 5 ,
111405f7cd8bSJoel Dahl.Xr bhyvectl 8 ,
111505f7cd8bSJoel Dahl.Xr bhyveload 8
11168d56c805SYuri Pankov.Pp
11178d56c805SYuri Pankov.Rs
11188d56c805SYuri Pankov.%A Intel
11198d56c805SYuri Pankov.%B 64 and IA-32 Architectures Software Developer’s Manual
11208d56c805SYuri Pankov.%V Volume 3
11218d56c805SYuri Pankov.Re
1122b13e60daSPeter Grehan.Sh HISTORY
1123b13e60daSPeter Grehan.Nm
1124b13e60daSPeter Grehanfirst appeared in
1125b13e60daSPeter Grehan.Fx 10.0 .
1126b13e60daSPeter Grehan.Sh AUTHORS
112701c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@freebsd.org
112801c2b8acSBaptiste Daroussin.An Peter Grehan Aq Mt grehan@freebsd.org
1129