xref: /freebsd/usr.sbin/bhyve/bhyve.8 (revision 71b2ba9099115db3c63f15e5085c0a677511f8b8)
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.\"
2510758471SMark 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
3310758471SMark 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.
96*71b2ba90SMark JohnstonIt can run guests on amd64 and arm64 platforms with suitable hardware support.
97b13e60daSPeter Grehan.Pp
98b13e60daSPeter GrehanParameters such as the number of virtual CPUs, amount of guest memory, and
99b13e60daSPeter GrehanI/O connectivity can be specified with command-line parameters.
100b13e60daSPeter Grehan.Pp
101*71b2ba90SMark Johnston.Nm
102*71b2ba90SMark Johnstonis typically used with a boot ROM that can load the guest operating system.
103*71b2ba90SMark JohnstonOn arm64 platforms, this is currently required.
1045c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must be loaded with
10584fe889cSChristian Brueffer.Xr bhyveload 8
106b13e60daSPeter Grehanor a similar boot loader before running
1075c3ec676SGleb Smirnoff.Nm ,
108*71b2ba90SMark Johnstonotherwise.
109*71b2ba90SMark JohnstonOn amd64, the
110*71b2ba90SMark Johnston.Pa edk2-bhyve
111*71b2ba90SMark Johnstonpackage provides a UEFI firmware that can be used to boot the guest;
112*71b2ba90SMark Johnstonon arm64 the
113*71b2ba90SMark Johnston.Pa u-boot-bhyve-arm64
114*71b2ba90SMark Johnstonpackage provides a U-Boot image that can be used to boot the guest.
115b13e60daSPeter Grehan.Pp
116b13e60daSPeter Grehan.Nm
117b13e60daSPeter Grehanruns until the guest operating system reboots or an unhandled hypervisor
118b13e60daSPeter Grehanexit is detected.
119b13e60daSPeter Grehan.Sh OPTIONS
120b13e60daSPeter Grehan.Bl -tag -width 10n
121ccb1c87aSMateusz Piotrowski.It Fl a
122ccb1c87aSMateusz PiotrowskiThe guest's local APIC is configured in xAPIC mode.
123*71b2ba90SMark JohnstonThis option only applies to the amd64 platform.
124*71b2ba90SMark JohnstonxAPIC mode is the default setting so this option is redundant.
125ccb1c87aSMateusz PiotrowskiIt will be deprecated in a future version.
126ccb1c87aSMateusz Piotrowski.It Fl C
127*71b2ba90SMark JohnstonInclude guest memory in core files.
12801d822d3SRodney W. Grimes.It Fl c Op Ar setting ...
12901d822d3SRodney W. GrimesNumber of guest virtual CPUs
13001d822d3SRodney W. Grimesand/or the CPU topology.
13101d822d3SRodney W. GrimesThe default value for each of
13201d822d3SRodney W. Grimes.Ar numcpus ,
13301d822d3SRodney W. Grimes.Ar sockets ,
13401d822d3SRodney W. Grimes.Ar cores ,
13501d822d3SRodney W. Grimesand
13601d822d3SRodney W. Grimes.Ar threads
13701d822d3SRodney W. Grimesis 1.
13801d822d3SRodney W. GrimesIf
13901d822d3SRodney W. Grimes.Ar numcpus
14001d822d3SRodney W. Grimesis not specified then it will be calculated from the other arguments.
14101d822d3SRodney W. GrimesThe topology must be consistent in that the
14201d822d3SRodney W. Grimes.Ar numcpus
14301d822d3SRodney W. Grimesmust equal the product of
14401d822d3SRodney W. Grimes.Ar sockets ,
14501d822d3SRodney W. Grimes.Ar cores ,
14601d822d3SRodney W. Grimesand
14701d822d3SRodney W. Grimes.Ar threads .
14801d822d3SRodney W. GrimesIf a
14901d822d3SRodney W. Grimes.Ar setting
15001d822d3SRodney W. Grimesis specified more than once the last one has precedence.
151da202b0fSYuri Pankov.Pp
152da202b0fSYuri PankovThe maximum number of virtual CPUs defaults to the number of active
153da202b0fSYuri Pankovphysical CPUs in the system available via the
154da202b0fSYuri Pankov.Va hw.vmm.maxcpu
155da202b0fSYuri Pankov.Xr sysctl 8
156da202b0fSYuri Pankovvariable.
157da202b0fSYuri PankovThe limit can be adjusted via the
158da202b0fSYuri Pankov.Va hw.vmm.maxcpu
159da202b0fSYuri Pankovloader tunable.
1600a1016f9SPawel Biernacki.It Fl D
1610a1016f9SPawel BiernackiDestroy the VM on guest initiated power-off.
162cde1f5b8SJohn Baldwin.It Fl e
163cde1f5b8SJohn BaldwinForce
164cde1f5b8SJohn Baldwin.Nm
165cde1f5b8SJohn Baldwinto exit when a guest issues an access to an I/O port that is not emulated.
166*71b2ba90SMark JohnstonThis is intended for debug purposes and only applies to the amd64 platform.
167ca14781cSCorvin 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
168ca14781cSCorvin KöhneAdd a fw_cfg file
169ca14781cSCorvin Köhne.Ar name
170ca14781cSCorvin Köhneto the fw_cfg interface.
171ca14781cSCorvin KöhneIf a
172ca14781cSCorvin Köhne.Cm string
173ca14781cSCorvin Köhneis specified, the fw_cfg file contains the string as data.
174ca14781cSCorvin KöhneIf a
175ca14781cSCorvin Köhne.Cm file
176ca14781cSCorvin Köhneis specified, bhyve reads the file and adds the file content as fw_cfg data.
1772cdff991SMariusz Zaborski.It Fl G Xo
1782cdff991SMariusz Zaborski.Sm off
1792cdff991SMariusz Zaborski.Oo Ar w Oc
180775f6f45SMateusz Piotrowski.Oo Ar bind_address Cm \&: Oc
1812cdff991SMariusz Zaborski.Ar port
1822cdff991SMariusz Zaborski.Sm on
1832cdff991SMariusz Zaborski.Xc
184cd377eb3SJohn BaldwinStart a debug server that uses the GDB protocol to export guest state to a
185cd377eb3SJohn Baldwindebugger.
186cd377eb3SJohn BaldwinAn IPv4 TCP socket will be bound to the supplied
1872cdff991SMariusz Zaborski.Ar bind_address
1882cdff991SMariusz Zaborskiand
189cd377eb3SJohn Baldwin.Ar port
190cd377eb3SJohn Baldwinto listen for debugger connections.
191cd377eb3SJohn BaldwinOnly a single debugger may be attached to the debug server at a time.
1922cdff991SMariusz ZaborskiIf the option begins with
193cd377eb3SJohn Baldwin.Sq w ,
194cd377eb3SJohn Baldwin.Nm
195cd377eb3SJohn Baldwinwill pause execution at the first instruction waiting for a debugger to attach.
196cde1f5b8SJohn Baldwin.It Fl H
197cde1f5b8SJohn BaldwinYield the virtual CPU thread when a HLT instruction is detected.
198cde1f5b8SJohn BaldwinIf this option is not specified, virtual CPUs will use 100% of a host CPU.
199*71b2ba90SMark JohnstonThis option applies only to the amd64 platform.
200ccb1c87aSMateusz Piotrowski.It Fl h
201ccb1c87aSMateusz PiotrowskiPrint help message and exit.
202f656df58SMateusz Piotrowski.It Fl k Ar config_file
203621b5090SJohn BaldwinSet configuration variables from a simple, key-value config file.
204621b5090SJohn BaldwinEach line of the config file is expected to consist of a config variable
205621b5090SJohn Baldwinname, an equals sign
206621b5090SJohn Baldwin.Pq Sq = ,
207621b5090SJohn Baldwinand a value.
208621b5090SJohn BaldwinNo spaces are permitted between the variable name, equals sign, or
209621b5090SJohn Baldwinvalue.
210621b5090SJohn BaldwinBlank lines and lines starting with
211621b5090SJohn Baldwin.Sq #
212621b5090SJohn Baldwinare ignored.
213f656df58SMateusz PiotrowskiSee
214f656df58SMateusz Piotrowski.Xr bhyve_config 5
215f656df58SMateusz Piotrowskifor more details.
21672f1e31fSKonstantin Belousov.It Fl K Ar layout
21772f1e31fSKonstantin BelousovSpecify the keyboard layout.
21872f1e31fSKonstantin BelousovThe value that can be specified sets the file name in
21972f1e31fSKonstantin Belousov.Ar /usr/share/bhyve/kbdlayout .
22072f1e31fSKonstantin BelousovThis specification only works when loaded with UEFI mode for VNC.
22172f1e31fSKonstantin BelousovWhen using a VNC client that supports QEMU Extended Key Event Message (e.g.
22272f1e31fSKonstantin BelousovTigerVNC), this option isn't needed.
22372f1e31fSKonstantin BelousovWhen using a VNC client that doesn't support QEMU Extended Key Event Message
22472f1e31fSKonstantin Belousov(e.g. tightVNC), the layout defaults to the US keyboard unless specified
22572f1e31fSKonstantin Belousovotherwise.
2264c08b978SMateusz Piotrowski.It Fl l Cm help
2274c08b978SMateusz PiotrowskiPrint a list of supported LPC devices.
2284c08b978SMateusz Piotrowski.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf
229cde1f5b8SJohn BaldwinAllow devices behind the LPC PCI-ISA bridge to be configured.
2309b1aa8d6SNeel NatuThe only supported devices are the TTY-class devices
2314c08b978SMateusz Piotrowski.Cm com1 , com2 , com3 ,
2324c08b978SMateusz Piotrowskiand
2334c08b978SMateusz Piotrowski.Cm com4 ,
23467c26eb2SCorvin Köhnethe TPM module
23567c26eb2SCorvin Köhne.Cm tpm ,
2362f40fc6fSPeter Grehanthe boot ROM device
2374c08b978SMateusz Piotrowski.Cm bootrom ,
238d85147f3SCorvin Köhnethe
239d85147f3SCorvin Köhne.Cm fwcfg
240d85147f3SCorvin Köhnetype and the debug/test device
2414c08b978SMateusz Piotrowski.Cm pc-testdev .
2421aa56353SMarcelo Araujo.Pp
2434c08b978SMateusz PiotrowskiThe possible values for the
2444c08b978SMateusz Piotrowski.Ar conf
2454c08b978SMateusz Piotrowskiargument are listed in the
2464c08b978SMateusz Piotrowski.Fl s
2474c08b978SMateusz Piotrowskiflag description.
248*71b2ba90SMark Johnston.Pp
249*71b2ba90SMark JohnstonThis option applies only to the amd64 platform.
250*71b2ba90SMark JohnstonOn arm64, the console and boot ROM devices are configured using the
251*71b2ba90SMark Johnstonmore generic
252*71b2ba90SMark Johnston.Fl o
253*71b2ba90SMark Johnstonoption.
2547e0cb3dfSMateusz Piotrowski.It Xo
2557e0cb3dfSMateusz Piotrowski.Fl m Ar memsize Ns Oo
2567e0cb3dfSMateusz Piotrowski.Sm off
2577e0cb3dfSMateusz Piotrowski.Cm K | k | M | m | G | g | T | t
2587e0cb3dfSMateusz Piotrowski.Sm on
2597e0cb3dfSMateusz Piotrowski.Oc
2607e0cb3dfSMateusz Piotrowski.Xc
26159a35b7cSKonstantin BelousovSet the guest physical memory size.
262cde1f5b8SJohn BaldwinThis must be the same size that was given to
263cde1f5b8SJohn Baldwin.Xr bhyveload 8 .
264cde1f5b8SJohn Baldwin.Pp
2657e0cb3dfSMateusz PiotrowskiThe size argument may be suffixed with one of
2667e0cb3dfSMateusz Piotrowski.Cm K , M , G
2677e0cb3dfSMateusz Piotrowskior
2687e0cb3dfSMateusz Piotrowski.Cm T
2697e0cb3dfSMateusz Piotrowski(either upper or lower case)
2707e0cb3dfSMateusz Piotrowskito indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes.
271cde1f5b8SJohn BaldwinIf no suffix is given, the value is assumed to be in megabytes.
2726ee52c65SRoman Bogorodskiy.Pp
2737e0cb3dfSMateusz PiotrowskiThe default is 256M.
274621b5090SJohn Baldwin.It Fl o Ar var Ns Cm = Ns Ar value
275621b5090SJohn BaldwinSet the configuration variable
276621b5090SJohn Baldwin.Ar var
277621b5090SJohn Baldwinto
278621b5090SJohn Baldwin.Ar value .
279*71b2ba90SMark JohnstonSee
280*71b2ba90SMark Johnston.Xr bhyve_config 5
281*71b2ba90SMark Johnstonfor configuration options.
282ccb1c87aSMateusz Piotrowski.It Fl P
283ccb1c87aSMateusz PiotrowskiForce the guest virtual CPU to exit when a PAUSE instruction is detected.
284*71b2ba90SMark JohnstonThis option applies only to the amd64 platform.
28590df5437SMateusz Piotrowski.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu
2869b6155a2SNeel NatuPin guest's virtual CPU
2879b6155a2SNeel Natu.Em vcpu
2889b6155a2SNeel Natuto
2899b6155a2SNeel Natu.Em hostcpu .
2908120190fSFelix JohnsonHost CPUs and guest virtual CPUs are numbered starting from 0.
2918120190fSFelix JohnsonA
2928120190fSFelix Johnson.Fl p
2938120190fSFelix Johnsonoption is required for every guest vCPU to be pinned.
2948120190fSFelix JohnsonTo map a 4 vCPU guest to host CPUs 12-15:
2958120190fSFelix Johnson.Bd -literal
2968120190fSFelix Johnson-p 0:12 -p 1:13 -p 2:14 -p 3:15
2978120190fSFelix Johnson.Ed
298483d953aSJohn Baldwin.It Fl r Ar file
299483d953aSJohn BaldwinResume a guest from a snapshot.
300483d953aSJohn BaldwinThe guest memory contents are restored from
301483d953aSJohn Baldwin.Ar file ,
302483d953aSJohn Baldwinand the guest device and vCPU state are restored from the file
303483d953aSJohn Baldwin.Dq Ar file Ns .kern .
304483d953aSJohn Baldwin.Pp
305a3b3e89fSBenedict ReuschlingNote that the current snapshot file format requires that the
306a3b3e89fSBenedict Reuschlingconfiguration of devices in the new VM match the VM from which the
307a3b3e89fSBenedict Reuschlingsnapshot was taken by specifying the same
308b24eea8cSMateusz Piotrowski.Fl s
309483d953aSJohn Baldwinand
310b24eea8cSMateusz Piotrowski.Fl l
311483d953aSJohn Baldwinoptions.
312483d953aSJohn BaldwinThe count of vCPUs and memory configuration are read from the snapshot.
313ccb1c87aSMateusz Piotrowski.It Fl S
314ccb1c87aSMateusz PiotrowskiWire guest memory.
315449f0e48SMateusz Piotrowski.It Fl s Cm help
316449f0e48SMateusz PiotrowskiPrint a list of supported PCI devices.
317449f0e48SMateusz Piotrowski.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf
318b13e60daSPeter GrehanConfigure a virtual PCI slot and function.
319b13e60daSPeter Grehan.Pp
32084fe889cSChristian Brueffer.Nm
321b13e60daSPeter Grehanprovides PCI bus emulation and virtual devices that can be attached to
322b13e60daSPeter Grehanslots on the bus.
323b13e60daSPeter GrehanThere are 32 available slots, with the option of providing up to 8 functions
324b13e60daSPeter Grehanper slot.
325234d8c47SMateusz Piotrowski.Pp
326234d8c47SMateusz PiotrowskiThe
327234d8c47SMateusz Piotrowski.Ar slot
328234d8c47SMateusz Piotrowskican be specified in one of the following formats:
329234d8c47SMateusz Piotrowski.Pp
330234d8c47SMateusz Piotrowski.Bl -bullet -compact
331234d8c47SMateusz Piotrowski.It
332234d8c47SMateusz Piotrowski.Ar pcislot
333234d8c47SMateusz Piotrowski.It
334234d8c47SMateusz Piotrowski.Sm off
335234d8c47SMateusz Piotrowski.Ar pcislot Cm \&: Ar function
336234d8c47SMateusz Piotrowski.Sm on
337234d8c47SMateusz Piotrowski.It
338234d8c47SMateusz Piotrowski.Sm off
339234d8c47SMateusz Piotrowski.Ar bus Cm \&: Ar pcislot Cm \&: Ar function
340234d8c47SMateusz Piotrowski.Sm on
341234d8c47SMateusz Piotrowski.El
342b13e60daSPeter Grehan.Pp
343b13e60daSPeter GrehanThe
344b13e60daSPeter Grehan.Ar pcislot
34584fe889cSChristian Brueffervalue is 0 to 31.
34684fe889cSChristian BruefferThe optional
34784fe889cSChristian Brueffer.Ar function
34884fe889cSChristian Brueffervalue is 0 to 7.
34984fe889cSChristian BruefferThe optional
35006db1b4aSNeel Natu.Ar bus
35106db1b4aSNeel Natuvalue is 0 to 255.
35284fe889cSChristian BruefferIf not specified, the
35384fe889cSChristian Brueffer.Ar function
35484fe889cSChristian Brueffervalue defaults to 0.
35584fe889cSChristian BruefferIf not specified, the
35684fe889cSChristian Brueffer.Ar bus
35784fe889cSChristian Brueffervalue defaults to 0.
358234d8c47SMateusz Piotrowski.Pp
359234d8c47SMateusz PiotrowskiThe
360234d8c47SMateusz Piotrowski.Ar emulation
361234d8c47SMateusz Piotrowskiargument
362234d8c47SMateusz Piotrowskican be one of the following:
3637014cb23SMateusz Piotrowski.Bl -tag -width "amd_hostbridge"
3647014cb23SMateusz Piotrowski.It Cm hostbridge
3657014cb23SMateusz PiotrowskiA simple host bridge.
366b13e60daSPeter GrehanThis is usually configured at slot 0, and is required by most guest
367b13e60daSPeter Grehanoperating systems.
3687014cb23SMateusz Piotrowski.It Cm amd_hostbridge
3697014cb23SMateusz PiotrowskiEmulation identical to
3707014cb23SMateusz Piotrowski.Cm hostbridge
3717014cb23SMateusz Piotrowskiusing a PCI vendor ID of AMD.
3727014cb23SMateusz Piotrowski.It Cm passthru
373b13e60daSPeter GrehanPCI pass-through device.
3747014cb23SMateusz Piotrowski.It Cm virtio-net
375b13e60daSPeter GrehanVirtio network interface.
3767014cb23SMateusz Piotrowski.It Cm virtio-blk
377b13e60daSPeter GrehanVirtio block storage interface.
3787014cb23SMateusz Piotrowski.It Cm virtio-scsi
379f9c005a1SMarcelo AraujoVirtio SCSI interface.
3807014cb23SMateusz Piotrowski.It Cm virtio-9p
381100353cfSJakub Wojciech KlamaVirtio 9p (VirtFS) interface.
3827014cb23SMateusz Piotrowski.It Cm virtio-rnd
3839d0c4e17SPeter GrehanVirtio RNG interface.
3847014cb23SMateusz Piotrowski.It Cm virtio-console
3855121b6ccSRoman BogorodskiyVirtio console interface, which exposes multiple ports
3865121b6ccSRoman Bogorodskiyto the guest in the form of simple char devices for simple IO
3875121b6ccSRoman Bogorodskiybetween the guest and host userspaces.
388054accacSCorvin Köhne.It Cm virtio-input
389054accacSCorvin KöhneVirtio input interface.
3907014cb23SMateusz Piotrowski.It Cm ahci
391d6099860SMaxim KonovalovAHCI controller attached to arbitrary devices.
3927014cb23SMateusz Piotrowski.It Cm ahci-cd
393b13e60daSPeter GrehanAHCI controller attached to an ATAPI CD/DVD.
3947014cb23SMateusz Piotrowski.It Cm ahci-hd
3957014cb23SMateusz PiotrowskiAHCI controller attached to a SATA hard drive.
3967014cb23SMateusz Piotrowski.It Cm e1000
3979e749f25SAlexander MotinIntel e82545 network interface.
3987014cb23SMateusz Piotrowski.It Cm uart
399b13e60daSPeter GrehanPCI 16550 serial device.
4007014cb23SMateusz Piotrowski.It Cm lpc
4017014cb23SMateusz PiotrowskiLPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports,
4027014cb23SMateusz Piotrowskia boot ROM, and,
403d85147f3SCorvin Köhneoptionally, a fwcfg type and the debug/test device.
4049b1aa8d6SNeel NatuThe LPC bridge emulation can only be configured on bus 0.
4057014cb23SMateusz Piotrowski.It Cm fbuf
4066c87a2c0SGleb SmirnoffRaw framebuffer device attached to VNC server.
4077014cb23SMateusz Piotrowski.It Cm xhci
4085c3ec676SGleb SmirnoffeXtensible Host Controller Interface (xHCI) USB controller.
4097014cb23SMateusz Piotrowski.It Cm nvme
410c066c68cSMarcelo AraujoNVM Express (NVMe) controller.
4117014cb23SMateusz Piotrowski.It Cm hda
41236f9f044SWarner LoshHigh Definition Audio Controller.
413b13e60daSPeter Grehan.El
414234d8c47SMateusz Piotrowski.Pp
415234d8c47SMateusz PiotrowskiThe optional parameter
416234d8c47SMateusz Piotrowski.Ar conf
417234d8c47SMateusz Piotrowskidescribes the backend for device emulations.
418b13e60daSPeter GrehanIf
419b13e60daSPeter Grehan.Ar conf
420b13e60daSPeter Grehanis not specified, the device emulation has no backend and can be
421b13e60daSPeter Grehanconsidered unconnected.
422b13e60daSPeter Grehan.Pp
4238d9fefe6SMateusz PiotrowskiNetwork device backends:
4247fb22729SMateusz Piotrowski.Sm off
4257fb22729SMateusz Piotrowski.Bl -bullet
4267fb22729SMateusz Piotrowski.It
4277fb22729SMateusz Piotrowski.Xo
4287fb22729SMateusz Piotrowski.Cm tap Ar N
4297fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4307fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4317fb22729SMateusz Piotrowski.Xc
4327fb22729SMateusz Piotrowski.It
4337fb22729SMateusz Piotrowski.Xo
4347fb22729SMateusz Piotrowski.Cm vmnet Ar N
4357fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4367fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4377fb22729SMateusz Piotrowski.Xc
4387fb22729SMateusz Piotrowski.It
4397fb22729SMateusz Piotrowski.Xo
4407fb22729SMateusz Piotrowski.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK
4417fb22729SMateusz Piotrowski.Op Cm \&,socket= Ar NAME
4427fb22729SMateusz Piotrowski.Op Cm \&,hook= Ar HOOK
4437fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
4447fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
4457fb22729SMateusz Piotrowski.Xc
446c5359e2aSMark Johnston.It
447c5359e2aSMark Johnston.Xo
448c5359e2aSMark Johnston.Cm slirp,hostfwd= Ar proto : Ar hostaddr : Ar hostport - Ar guestaddr : Ar guestport
449c5359e2aSMark Johnston.Xc
4507fb22729SMateusz Piotrowski.El
4517fb22729SMateusz Piotrowski.Sm on
452baf753ccSJohn Baldwin.Pp
453b13e60daSPeter GrehanIf
4547fb22729SMateusz Piotrowski.Cm mac
455b13e60daSPeter Grehanis not specified, the MAC address is derived from a fixed OUI and the
456b13e60daSPeter Grehanremaining bytes from an MD5 hash of the slot and function numbers and
457b13e60daSPeter Grehanthe device name.
458b13e60daSPeter Grehan.Pp
459b13e60daSPeter GrehanThe MAC address is an ASCII string in
460b13e60daSPeter Grehan.Xr ethers 5
461b13e60daSPeter Grehanformat.
462692dbfe9SVincenzo Maffione.Pp
4637fb22729SMateusz PiotrowskiWith
4647fb22729SMateusz Piotrowski.Cm virtio-net
4657fb22729SMateusz Piotrowskidevices, the
4667fb22729SMateusz Piotrowski.Cm mtu
467692dbfe9SVincenzo Maffioneparameter can be specified to inform the guest about the largest MTU
468692dbfe9SVincenzo Maffionethat should be allowed, expressed in bytes.
469e90337e4SAleksandr Fedorov.Pp
4707fb22729SMateusz PiotrowskiWith
4717fb22729SMateusz Piotrowski.Cm netgraph
4727fb22729SMateusz Piotrowskibackend, the
4737fb22729SMateusz Piotrowski.Cm path
474e90337e4SAleksandr Fedorovand
4757fb22729SMateusz Piotrowski.Cm peerhook
476e90337e4SAleksandr Fedorovparameters must be specified to set the destination node and corresponding hook.
477e90337e4SAleksandr FedorovThe optional parameters
4787fb22729SMateusz Piotrowski.Cm socket
479e90337e4SAleksandr Fedorovand
4807fb22729SMateusz Piotrowski.Cm hook
481e90337e4SAleksandr Fedorovmay be used to set the
482e90337e4SAleksandr Fedorov.Xr ng_socket 4
483e90337e4SAleksandr Fedorovnode name and source hook.
484e90337e4SAleksandr FedorovThe
485e90337e4SAleksandr Fedorov.Ar ADDRESS ,
4867fb22729SMateusz Piotrowski.Ar HOOK ,
487e90337e4SAleksandr Fedorovand
488e90337e4SAleksandr Fedorov.Ar NAME
489e90337e4SAleksandr Fedorovmust comply with
490e90337e4SAleksandr Fedorov.Xr netgraph 4
491e90337e4SAleksandr Fedorovaddressing rules.
492b13e60daSPeter Grehan.Pp
493c5359e2aSMark JohnstonThe slirp backend can be used to provide a NATed network to the guest.
494c5359e2aSMark JohnstonThis backend has poor performance but does not require any network
495c5359e2aSMark Johnstonconfiguration on the host system.
496c5359e2aSMark JohnstonIt depends on the
497c5359e2aSMark Johnston.Pa net/libslirp
498c5359e2aSMark Johnstonport.
499c5359e2aSMark JohnstonThe
500c5359e2aSMark Johnston.Cm hostfwd
501c5359e2aSMark Johnstonoption takes a 5-tuple describing how connections from the host are to be
502c5359e2aSMark Johnstonforwarded to the guest.
503c5359e2aSMark JohnstonMultiple rules can be specified, separated by semicolons.
504c5359e2aSMark JohnstonNote that semicolons must be escaped or quoted to prevent the shell from
505c5359e2aSMark Johnstoninterpreting them.
506c5359e2aSMark Johnston.Pp
5075232a35fSMateusz PiotrowskiBlock storage device backends:
5085232a35fSMateusz Piotrowski.Sm off
5095232a35fSMateusz Piotrowski.Bl -bullet
5105232a35fSMateusz Piotrowski.It
5115232a35fSMateusz Piotrowski.Ar /filename Op Cm \&, Ar block-device-options
5125232a35fSMateusz Piotrowski.It
5135232a35fSMateusz Piotrowski.Ar /dev/xxx Op Cm \&, Ar block-device-options
5144e43c1e8SNeel Natu.El
5155232a35fSMateusz Piotrowski.Sm on
5164e43c1e8SNeel Natu.Pp
5174e43c1e8SNeel NatuThe
5184e43c1e8SNeel Natu.Ar block-device-options
5194e43c1e8SNeel Natuare:
5205232a35fSMateusz Piotrowski.Bl -tag -width 10n
5215232a35fSMateusz Piotrowski.It Cm nocache
522b13e60daSPeter GrehanOpen the file with
523b13e60daSPeter Grehan.Dv O_DIRECT .
5245232a35fSMateusz Piotrowski.It Cm direct
525b13e60daSPeter GrehanOpen the file using
526b13e60daSPeter Grehan.Dv O_SYNC .
5275232a35fSMateusz Piotrowski.It Cm ro
528b13e60daSPeter GrehanForce the file to be opened read-only.
5295232a35fSMateusz Piotrowski.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc
5304e43c1e8SNeel NatuSpecify the logical and physical sector sizes of the emulated disk.
5314e43c1e8SNeel NatuThe physical sector size is optional and is equal to the logical sector size
5324e43c1e8SNeel Natuif not explicitly specified.
5335232a35fSMateusz Piotrowski.It Cm nodelete
534e6d795d1SAllan JudeDisable emulation of guest trim requests via
535e6d795d1SAllan Jude.Dv DIOCGDELETE
536e6d795d1SAllan Juderequests.
537480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
538480bef94SCorvin KöhneAdd the device to the bootorder at
539480bef94SCorvin Köhne.Ar index .
540480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
541480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
542480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
543b13e60daSPeter Grehan.El
544b13e60daSPeter Grehan.Pp
5457c5829c9SMateusz PiotrowskiSCSI device backends:
5467c5829c9SMateusz Piotrowski.Sm off
5477c5829c9SMateusz Piotrowski.Bl -bullet
5487c5829c9SMateusz Piotrowski.It
5497c5829c9SMateusz Piotrowski.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc
55049f87822SAlexander Motin.El
5517c5829c9SMateusz Piotrowski.Sm on
55249f87822SAlexander Motin.Pp
55349f87822SAlexander MotinThe
55449f87822SAlexander Motin.Ar scsi-device-options
55549f87822SAlexander Motinare:
55649f87822SAlexander Motin.Bl -tag -width 10n
5577c5829c9SMateusz Piotrowski.It Cm iid= Ns Ar IID
55849f87822SAlexander MotinInitiator ID to use when sending requests to specified CTL port.
55949f87822SAlexander MotinThe default value is 0.
560480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
561480bef94SCorvin KöhneAdd the device to the bootorder at
562480bef94SCorvin Köhne.Ar index .
563480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
564480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
565480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
566f9c005a1SMarcelo Araujo.El
567f9c005a1SMarcelo Araujo.Pp
5682d00b570SMateusz Piotrowski9P device backends:
5692d00b570SMateusz Piotrowski.Sm off
5702d00b570SMateusz Piotrowski.Bl -bullet
5712d00b570SMateusz Piotrowski.It
5722d00b570SMateusz Piotrowski.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options
573100353cfSJakub Wojciech Klama.El
5742d00b570SMateusz Piotrowski.Sm on
575100353cfSJakub Wojciech Klama.Pp
576100353cfSJakub Wojciech KlamaThe
577100353cfSJakub Wojciech Klama.Ar 9p-device-options
578100353cfSJakub Wojciech Klamaare:
579100353cfSJakub Wojciech Klama.Bl -tag -width 10n
5802d00b570SMateusz Piotrowski.It Cm ro
581100353cfSJakub Wojciech KlamaExpose the share in read-only mode.
582100353cfSJakub Wojciech Klama.El
583100353cfSJakub Wojciech Klama.Pp
5842fda01a1SMateusz PiotrowskiTTY device backends:
585b13e60daSPeter Grehan.Bl -tag -width 10n
5862fda01a1SMateusz Piotrowski.It Cm stdio
587b13e60daSPeter GrehanConnect the serial port to the standard input and output of
58884fe889cSChristian Bruefferthe
58984fe889cSChristian Brueffer.Nm
59084fe889cSChristian Bruefferprocess.
5912fda01a1SMateusz Piotrowski.It Ar /dev/xxx
592b13e60daSPeter GrehanUse the host TTY device for serial port I/O.
593b13e60daSPeter Grehan.El
594b13e60daSPeter Grehan.Pp
59567c26eb2SCorvin KöhneTPM device backends:
59667c26eb2SCorvin Köhne.Bl -tag -width 10n
59767c26eb2SCorvin Köhne.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options
59867c26eb2SCorvin KöhneEmulate a TPM device.
59967c26eb2SCorvin Köhne.El
60067c26eb2SCorvin Köhne.Pp
60167c26eb2SCorvin KöhneThe
60267c26eb2SCorvin Köhne.Ar tpm-device-options
60367c26eb2SCorvin Köhneare:
60467c26eb2SCorvin Köhne.Bl -tag -width 10n
60567c26eb2SCorvin Köhne.It Cm version= Ns Ar version
60667c26eb2SCorvin KöhneVersion of the TPM device according to the TCG specification.
60767c26eb2SCorvin KöhneDefaults to
60867c26eb2SCorvin Köhne.Cm 2.0
60967c26eb2SCorvin Köhne.El
61067c26eb2SCorvin Köhne.Pp
6112fda01a1SMateusz PiotrowskiBoot ROM device backends:
6129b1aa8d6SNeel Natu.Bl -tag -width 10n
613866036f4SRebecca Cran.It Ar romfile Ns Op Cm \&, Ns Ar varfile
6149b1aa8d6SNeel NatuMap
6159b1aa8d6SNeel Natu.Ar romfile
6169b1aa8d6SNeel Natuin the guest address space reserved for boot firmware.
617866036f4SRebecca CranIf
618866036f4SRebecca Cran.Ar varfile
619866036f4SRebecca Cranis provided, that file is also mapped in the boot firmware guest
620866036f4SRebecca Cranaddress space, and any modifications the guest makes will be saved
621866036f4SRebecca Cranto that file.
6229b1aa8d6SNeel Natu.El
6239b1aa8d6SNeel Natu.Pp
624d85147f3SCorvin KöhneFwcfg types:
625d85147f3SCorvin Köhne.Bl -tag -width 10n
626d85147f3SCorvin Köhne.It Ar fwcfg
627a3b3e89fSBenedict ReuschlingThe fwcfg interface is used to pass information such as the CPU count
628a3b3e89fSBenedict Reuschlingor ACPI tables to the guest firmware.
629d85147f3SCorvin KöhneSupported values are
630d85147f3SCorvin Köhne.Ql bhyve
631d85147f3SCorvin Köhneand
632d85147f3SCorvin Köhne.Ql qemu .
633d85147f3SCorvin KöhneDue to backward compatibility reasons,
634d85147f3SCorvin Köhne.Ql bhyve
635d85147f3SCorvin Köhneis the default option.
636d85147f3SCorvin KöhneWhen
637d85147f3SCorvin Köhne.Ql bhyve
638d85147f3SCorvin Köhneis used, bhyve's fwctl interface is used.
639d85147f3SCorvin KöhneIt currently reports only the CPU count to the guest firmware.
640d85147f3SCorvin KöhneThe
641d85147f3SCorvin Köhne.Ql qemu
642d85147f3SCorvin Köhneoption uses QEMU's fwcfg interface.
643a3b3e89fSBenedict ReuschlingThis interface is widely used and allows user-defined information to
644a3b3e89fSBenedict Reuschlingbe passed to the guest.
645a3b3e89fSBenedict ReuschlingIt is used for passing the CPU count, ACPI tables, a boot order and
646a3b3e89fSBenedict Reuschlingmany other things to the guest.
647a3b3e89fSBenedict ReuschlingSome operating systems such as Fedora CoreOS can be configured by
648a3b3e89fSBenedict Reuschlingqemu's fwcfg interface as well.
649d85147f3SCorvin Köhne.El
650d85147f3SCorvin Köhne.Pp
6512fda01a1SMateusz PiotrowskiPass-through device backends:
652baf753ccSJohn Baldwin.Sm off
653baf753ccSJohn Baldwin.Bl -bullet
654baf753ccSJohn Baldwin.It
655baf753ccSJohn Baldwin.Cm ppt Ar N Oo , Ar passthru-device-options Oc
656baf753ccSJohn Baldwin.It
657baf753ccSJohn Baldwin.Ns Ar bus Cm \&/ Ar slot Cm \&/ Ar function
658baf753ccSJohn Baldwin.Op , Ar passthru-device-options
659baf753ccSJohn Baldwin.It
660baf753ccSJohn Baldwin.Cm pci Ar bus Cm : Ar slot Cm : Ns Ar function
661baf753ccSJohn Baldwin.Op , Ar passthru-device-options
662baf753ccSJohn Baldwin.El
663baf753ccSJohn Baldwin.Sm on
664baf753ccSJohn Baldwin.Pp
665baf753ccSJohn BaldwinConnect to a PCI device on the host either named ppt
666baf753ccSJohn Baldwin.Ns Ar N
667baf753ccSJohn Baldwinor at the selector described by
668b13e60daSPeter Grehan.Ar slot ,
669b13e60daSPeter Grehan.Ar bus ,
670b13e60daSPeter Grehanand
671b13e60daSPeter Grehan.Ar function
672b13e60daSPeter Grehannumbers.
673baf753ccSJohn Baldwin.Pp
674baf753ccSJohn BaldwinThe
675baf753ccSJohn Baldwin.Ar passthru-device-options
676baf753ccSJohn Baldwinare:
677baf753ccSJohn Baldwin.Bl -tag -width 10n
6785e19a518SMateusz Piotrowski.It Cm rom= Ns Ar romfile
679e47fe318SCorvin KöhneAdd
680e47fe318SCorvin Köhne.Ar romfile
681e47fe318SCorvin Köhneas option ROM to the PCI device.
682a3b3e89fSBenedict ReuschlingThe ROM will be loaded by firmware and should be capable of
683a3b3e89fSBenedict Reuschlinginitializing the device.
684480bef94SCorvin Köhne.It Li bootindex= Ns Ar index
685480bef94SCorvin KöhneAdd the device to the bootorder at
686480bef94SCorvin Köhne.Ar index .
687480bef94SCorvin KöhneA fwcfg file is used to specify the bootorder.
688480bef94SCorvin KöhneThe guest firmware may ignore or doesn't support this fwcfg file.
689480bef94SCorvin KöhneIn that case, this feature doesn't work as expected.
690b13e60daSPeter Grehan.El
691b13e60daSPeter Grehan.Pp
6929b1aa8d6SNeel NatuGuest memory must be wired using the
6939b1aa8d6SNeel Natu.Fl S
6949b1aa8d6SNeel Natuoption when a pass-through device is configured.
6959b1aa8d6SNeel Natu.Pp
696b13e60daSPeter GrehanThe host device must have been reserved at boot-time using the
697a9258f9bSWarren Block.Va pptdevs
698b13e60daSPeter Grehanloader variable as described in
699b13e60daSPeter Grehan.Xr vmm 4 .
7005121b6ccSRoman Bogorodskiy.Pp
70167c26eb2SCorvin KöhneTPM devices:
70267c26eb2SCorvin Köhne.Bl -tag -width 10n
70367c26eb2SCorvin Köhne.It Ns Ar type
70467c26eb2SCorvin KöhneSpecifies the type of the TPM device.
70567c26eb2SCorvin Köhne.Pp
70667c26eb2SCorvin KöhneSupported types:
70767c26eb2SCorvin Köhne.Bl -tag -width 10n
70867c26eb2SCorvin Köhne.It Cm passthru
70967c26eb2SCorvin Köhne.El
71067c26eb2SCorvin Köhne.It Cm version= Ns Ar version
71167c26eb2SCorvin KöhneThe
71267c26eb2SCorvin Köhne.Ar version
71367c26eb2SCorvin Köhneof the emulated TPM device according to the TCG specification.
71467c26eb2SCorvin Köhne.Pp
71567c26eb2SCorvin KöhneSupported versions:
71667c26eb2SCorvin Köhne.Bl -tag -width 10n
71767c26eb2SCorvin Köhne.It Cm 2.0
71867c26eb2SCorvin Köhne.El
71967c26eb2SCorvin Köhne.El
72067c26eb2SCorvin Köhne.Pp
7213f4c771fSMateusz PiotrowskiVirtio console device backends:
7223f4c771fSMateusz Piotrowski.Bl -bullet
7233f4c771fSMateusz Piotrowski.Sm off
7243f4c771fSMateusz Piotrowski.It
7253f4c771fSMateusz 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 ...
7263f4c771fSMateusz Piotrowski.Sm on
7273f4c771fSMateusz Piotrowski.El
7283f4c771fSMateusz Piotrowski.Pp
7295121b6ccSRoman BogorodskiyA maximum of 16 ports per device can be created.
7305121b6ccSRoman BogorodskiyEvery port is named and corresponds to a Unix domain socket created by
7315121b6ccSRoman Bogorodskiy.Nm .
7325121b6ccSRoman Bogorodskiy.Nm
7335121b6ccSRoman Bogorodskiyaccepts at most one connection per port at a time.
7345121b6ccSRoman Bogorodskiy.Pp
7355121b6ccSRoman BogorodskiyLimitations:
7368d9fefe6SMateusz Piotrowski.Bl -bullet
7375121b6ccSRoman Bogorodskiy.It
7385121b6ccSRoman BogorodskiyDue to lack of destructors in
7395121b6ccSRoman Bogorodskiy.Nm ,
7405121b6ccSRoman Bogorodskiysockets on the filesystem must be cleaned up manually after
7415121b6ccSRoman Bogorodskiy.Nm
7425121b6ccSRoman Bogorodskiyexits.
7435121b6ccSRoman Bogorodskiy.It
7443f4c771fSMateusz PiotrowskiThere is no way to use the
7453f4c771fSMateusz Piotrowski.Dq console port
7463f4c771fSMateusz Piotrowskifeature, nor the console port
7470ee3a4b4SRoman Bogorodskiyresize at present.
7485121b6ccSRoman Bogorodskiy.It
7490ee3a4b4SRoman BogorodskiyEmergency write is advertised, but no-op at present.
7505121b6ccSRoman Bogorodskiy.El
7516c87a2c0SGleb Smirnoff.Pp
752054accacSCorvin KöhneVirtio input device backends:
753054accacSCorvin Köhne.Bl -tag -width 10n
754054accacSCorvin Köhne.It Ar /dev/input/eventX
755054accacSCorvin KöhneSend input events of
756054accacSCorvin Köhne.Ar /dev/input/eventX
757054accacSCorvin Köhneto guest by VirtIO Input Interface.
758054accacSCorvin Köhne.El
759054accacSCorvin Köhne.Pp
7608b97e975SMateusz PiotrowskiFramebuffer devices backends:
7618b97e975SMateusz Piotrowski.Bl -bullet
7628b97e975SMateusz Piotrowski.Sm off
7638b97e975SMateusz Piotrowski.It
7648b97e975SMateusz Piotrowski.Op Cm rfb= Ar ip-and-port
7658b97e975SMateusz Piotrowski.Op Cm ,w= Ar width
7668b97e975SMateusz Piotrowski.Op Cm ,h= Ar height
7678b97e975SMateusz Piotrowski.Op Cm ,vga= Ar vgaconf
7688b97e975SMateusz Piotrowski.Op Cm ,wait
7698b97e975SMateusz Piotrowski.Op Cm ,password= Ar password
7708b97e975SMateusz Piotrowski.Sm on
7718b97e975SMateusz Piotrowski.El
7728b97e975SMateusz Piotrowski.Pp
7738b97e975SMateusz PiotrowskiConfiguration options are defined as follows:
7745c3ec676SGleb Smirnoff.Bl -tag -width 10n
7758b97e975SMateusz Piotrowski.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port
7768b97e975SMateusz PiotrowskiAn IP address and a port VNC should listen on.
7778b97e975SMateusz PiotrowskiThere are two formats:
7788b97e975SMateusz Piotrowski.Pp
7798b97e975SMateusz Piotrowski.Bl -bullet -compact
7808d9fefe6SMateusz Piotrowski.It
7818b97e975SMateusz Piotrowski.Sm off
7828b97e975SMateusz Piotrowski.Op Ar IPv4 Cm \&:
7835c3ec676SGleb Smirnoff.Ar port
7848b97e975SMateusz Piotrowski.Sm on
7858d9fefe6SMateusz Piotrowski.It
7868b97e975SMateusz Piotrowski.Sm off
7878b97e975SMateusz Piotrowski.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port
7888b97e975SMateusz Piotrowski.Sm on
7898b97e975SMateusz Piotrowski.El
7908b97e975SMateusz Piotrowski.Pp
7916c87a2c0SGleb SmirnoffThe default is to listen on localhost IPv4 address and default VNC port 5900.
7928883128bSBjoern A. ZeebAn IPv6 address must be enclosed in square brackets and may contain an
7937d9545fcSRodney W. Grimesoptional zone identifier.
7948b97e975SMateusz Piotrowski.It Cm w= Ns Ar width No and Cm h= Ns Ar height
7955c3ec676SGleb SmirnoffA display resolution, width and height, respectively.
7965c3ec676SGleb SmirnoffIf not specified, a default resolution of 1024x768 pixels will be used.
7975c3ec676SGleb SmirnoffMinimal supported resolution is 640x480 pixels,
7980600b575SRobert Wingand maximum is 3840x2160 pixels.
7998b97e975SMateusz Piotrowski.It Cm vga= Ns Ar vgaconf
8005c3ec676SGleb SmirnoffPossible values for this option are
8018b97e975SMateusz Piotrowski.Cm io
8025c3ec676SGleb Smirnoff(default),
8038b97e975SMateusz Piotrowski.Cm on
8045c3ec676SGleb Smirnoff, and
8058b97e975SMateusz Piotrowski.Cm off .
8065c3ec676SGleb SmirnoffPCI graphics cards have a dual personality in that they are
8075c3ec676SGleb Smirnoffstandard PCI devices with BAR addressing, but may also
8085c3ec676SGleb Smirnoffimplicitly decode legacy VGA I/O space
8095c3ec676SGleb Smirnoff.Pq Ad 0x3c0-3df
8105c3ec676SGleb Smirnoffand memory space
8115c3ec676SGleb Smirnoff.Pq 64KB at Ad 0xA0000 .
8125c3ec676SGleb SmirnoffThe default
8138b97e975SMateusz Piotrowski.Cm io
8148d56c805SYuri Pankovoption should be used for guests that attempt to issue BIOS calls which result
8158d56c805SYuri Pankovin I/O port queries, and fail to boot if I/O decode is disabled.
8165c3ec676SGleb Smirnoff.Pp
8175c3ec676SGleb SmirnoffThe
8188b97e975SMateusz Piotrowski.Cm on
8195c3ec676SGleb Smirnoffoption should be used along with the CSM BIOS capability in UEFI
8205c3ec676SGleb Smirnoffto boot traditional BIOS guests that require the legacy VGA I/O and
8215c3ec676SGleb Smirnoffmemory regions to be available.
8225c3ec676SGleb Smirnoff.Pp
8235c3ec676SGleb SmirnoffThe
8248b97e975SMateusz Piotrowski.Cm off
8255c3ec676SGleb Smirnoffoption should be used for the UEFI guests that assume that
8265c3ec676SGleb SmirnoffVGA adapter is present if they detect the I/O ports.
8275c3ec676SGleb SmirnoffAn example of such a guest is
8285c3ec676SGleb Smirnoff.Ox
8295c3ec676SGleb Smirnoffin UEFI mode.
8305c3ec676SGleb Smirnoff.Pp
8315c3ec676SGleb SmirnoffPlease refer to the
8325c3ec676SGleb Smirnoff.Nm
8335c3ec676SGleb Smirnoff.Fx
8345c3ec676SGleb Smirnoffwiki page
8355c3ec676SGleb Smirnoff.Pq Lk https://wiki.freebsd.org/bhyve
8365c3ec676SGleb Smirnofffor configuration notes of particular guests.
8378b97e975SMateusz Piotrowski.It Cm wait
8385c3ec676SGleb SmirnoffInstruct
8395c3ec676SGleb Smirnoff.Nm
8408d56c805SYuri Pankovto only boot upon the initiation of a VNC connection, simplifying the
8418d56c805SYuri Pankovinstallation of operating systems that require immediate keyboard input.
8425c3ec676SGleb SmirnoffThis can be removed for post-installation use.
8438b97e975SMateusz Piotrowski.It Cm password= Ns Ar password
844f4d34383SMarcelo AraujoThis type of authentication is known to be cryptographically weak and is not
845f4d34383SMarcelo Araujointended for use on untrusted networks.
846f4d34383SMarcelo AraujoMany implementations will want to use stronger security, such as running
847f4d34383SMarcelo Araujothe session over an encrypted channel provided by IPsec or SSH.
8485c3ec676SGleb Smirnoff.El
8496c87a2c0SGleb Smirnoff.Pp
8506eff58acSMateusz PiotrowskixHCI USB device backends:
8515c3ec676SGleb Smirnoff.Bl -tag -width 10n
8526eff58acSMateusz Piotrowski.It Cm tablet
8535c3ec676SGleb SmirnoffA USB tablet device which provides precise cursor synchronization
8545c3ec676SGleb Smirnoffwhen using VNC.
8556c87a2c0SGleb Smirnoff.El
856c066c68cSMarcelo Araujo.Pp
8576eff58acSMateusz PiotrowskiNVMe device backends:
8586eff58acSMateusz Piotrowski.Bl -bullet
8596eff58acSMateusz Piotrowski.Sm off
8606eff58acSMateusz Piotrowski.It
8616eff58acSMateusz Piotrowski.Ar devpath
8626eff58acSMateusz Piotrowski.Op Cm ,maxq= Ar #
8636eff58acSMateusz Piotrowski.Op Cm ,qsz= Ar #
8646eff58acSMateusz Piotrowski.Op Cm ,ioslots= Ar #
8656eff58acSMateusz Piotrowski.Op Cm ,sectsz= Ar #
8666eff58acSMateusz Piotrowski.Op Cm ,ser= Ar #
8676eff58acSMateusz Piotrowski.Op Cm ,eui64= Ar #
8686eff58acSMateusz Piotrowski.Op Cm ,dsm= Ar opt
8696eff58acSMateusz Piotrowski.Sm on
8706eff58acSMateusz Piotrowski.El
8716eff58acSMateusz Piotrowski.Pp
8726eff58acSMateusz PiotrowskiConfiguration options are defined as follows:
873c066c68cSMarcelo Araujo.Bl -tag -width 10n
8746eff58acSMateusz Piotrowski.It Ar devpath
875c066c68cSMarcelo AraujoAccepted device paths are:
876c066c68cSMarcelo Araujo.Ar /dev/blockdev
877c066c68cSMarcelo Araujoor
878c066c68cSMarcelo Araujo.Ar /path/to/image
879c066c68cSMarcelo Araujoor
8806eff58acSMateusz Piotrowski.Cm ram= Ns Ar size_in_MiB .
8816eff58acSMateusz Piotrowski.It Cm maxq
882c066c68cSMarcelo AraujoMax number of queues.
8836eff58acSMateusz Piotrowski.It Cm qsz
884c066c68cSMarcelo AraujoMax elements in each queue.
8856eff58acSMateusz Piotrowski.It Cm ioslots
886c066c68cSMarcelo AraujoMax number of concurrent I/O requests.
8876eff58acSMateusz Piotrowski.It Cm sectsz
888c066c68cSMarcelo AraujoSector size (defaults to blockif sector size).
8896eff58acSMateusz Piotrowski.It Cm ser
890c066c68cSMarcelo AraujoSerial number with maximum 20 characters.
8916eff58acSMateusz Piotrowski.It Cm eui64
8926eff58acSMateusz PiotrowskiIEEE Extended Unique Identifier (8 byte value).
8936eff58acSMateusz Piotrowski.It Cm dsm
8946eff58acSMateusz PiotrowskiDataSet Management support.
8956eff58acSMateusz PiotrowskiSupported values are:
8966eff58acSMateusz Piotrowski.Cm auto , enable ,
8976eff58acSMateusz Piotrowskiand
8986eff58acSMateusz Piotrowski.Cm disable .
899c066c68cSMarcelo Araujo.El
90036f9f044SWarner Losh.Pp
901d5fcc4b6SMateusz PiotrowskiAHCI device backends:
902d5fcc4b6SMateusz Piotrowski.Bl -bullet
903d5fcc4b6SMateusz Piotrowski.It
904d5fcc4b6SMateusz Piotrowski.Sm off
905d5fcc4b6SMateusz Piotrowski.Op Oo Cm hd\&: | cd\&: Oc Ar path
906d5fcc4b6SMateusz Piotrowski.Op Cm ,nmrr= Ar nmrr
907d5fcc4b6SMateusz Piotrowski.Op Cm ,ser= Ar #
908d5fcc4b6SMateusz Piotrowski.Op Cm ,rev= Ar #
909d5fcc4b6SMateusz Piotrowski.Op Cm ,model= Ar #
910d5fcc4b6SMateusz Piotrowski.Sm on
911d5fcc4b6SMateusz Piotrowski.El
912d5fcc4b6SMateusz Piotrowski.Pp
913d5fcc4b6SMateusz PiotrowskiConfiguration options are defined as follows:
9149af3bcd7SPeter Grehan.Bl -tag -width 10n
915d5fcc4b6SMateusz Piotrowski.It Cm nmrr
916d5fcc4b6SMateusz PiotrowskiNominal Media Rotation Rate, known as RPM.
917d5fcc4b6SMateusz PiotrowskiValue 1 will indicate device as Solid State Disk.
918d5fcc4b6SMateusz PiotrowskiDefault value is 0, not report.
919d5fcc4b6SMateusz Piotrowski.It Cm ser
9209af3bcd7SPeter GrehanSerial Number with maximum 20 characters.
921d5fcc4b6SMateusz Piotrowski.It Cm rev
9229af3bcd7SPeter GrehanRevision Number with maximum 8 characters.
923d5fcc4b6SMateusz Piotrowski.It Cm model
9249af3bcd7SPeter GrehanModel Number with maximum 40 characters.
9259af3bcd7SPeter Grehan.El
9269af3bcd7SPeter Grehan.Pp
927061f37d2SMateusz PiotrowskiHD Audio device backends:
928061f37d2SMateusz Piotrowski.Bl -bullet
929061f37d2SMateusz Piotrowski.It
930061f37d2SMateusz Piotrowski.Sm off
931061f37d2SMateusz Piotrowski.Op Cm play= Ar playback
932061f37d2SMateusz Piotrowski.Op Cm ,rec= Ar recording
933061f37d2SMateusz Piotrowski.Sm on
934061f37d2SMateusz Piotrowski.El
935061f37d2SMateusz Piotrowski.Pp
936061f37d2SMateusz PiotrowskiConfiguration options are defined as follows:
93736f9f044SWarner Losh.Bl -tag -width 10n
938061f37d2SMateusz Piotrowski.It Cm play
93936f9f044SWarner LoshPlayback device, typically
94036f9f044SWarner Losh.Ar /dev/dsp0 .
941061f37d2SMateusz Piotrowski.It Cm rec
94236f9f044SWarner LoshRecording device, typically
94336f9f044SWarner Losh.Ar /dev/dsp0 .
94436f9f044SWarner Losh.El
9455749449dSJohn Baldwin.It Fl U Ar uuid
9465749449dSJohn BaldwinSet the universally unique identifier
9475749449dSJohn Baldwin.Pq UUID
9485749449dSJohn Baldwinin the guest's System Management BIOS System Information structure.
9495749449dSJohn BaldwinBy default a UUID is generated from the host's hostname and
9505749449dSJohn Baldwin.Ar vmname .
951ccb1c87aSMateusz Piotrowski.It Fl u
952ccb1c87aSMateusz PiotrowskiRTC keeps UTC time.
953cde1f5b8SJohn Baldwin.It Fl W
954cde1f5b8SJohn BaldwinForce virtio PCI device emulations to use MSI interrupts instead of MSI-X
955cde1f5b8SJohn Baldwininterrupts.
956ccb1c87aSMateusz Piotrowski.It Fl w
957ccb1c87aSMateusz PiotrowskiIgnore accesses to unimplemented Model Specific Registers (MSRs).
958ccb1c87aSMateusz PiotrowskiThis is intended for debug purposes.
9599777ca20SNeel Natu.It Fl x
9609777ca20SNeel NatuThe guest's local APIC is configured in x2APIC mode.
961*71b2ba90SMark JohnstonThis option applies only to the amd64 platform.
962b100acf2SNeel Natu.It Fl Y
963b100acf2SNeel NatuDisable MPtable generation.
964*71b2ba90SMark JohnstonThis option applies only to the amd64 platform.
965b13e60daSPeter Grehan.It Ar vmname
966b13e60daSPeter GrehanAlphanumeric name of the guest.
967b13e60daSPeter GrehanThis should be the same as that created by
968b13e60daSPeter Grehan.Xr bhyveload 8 .
969b13e60daSPeter Grehan.El
970621b5090SJohn Baldwin.Sh CONFIGURATION VARIABLES
971621b5090SJohn Baldwin.Nm
972621b5090SJohn Baldwinuses an internal tree of configuration variables to describe global and
973621b5090SJohn Baldwinper-device settings.
974621b5090SJohn BaldwinWhen
975621b5090SJohn Baldwin.Nm
976621b5090SJohn Baldwinstarts,
977621b5090SJohn Baldwinit parses command line options (including config files) in the order given
978621b5090SJohn Baldwinon the command line.
979621b5090SJohn BaldwinEach command line option sets one or more configuration variables.
980621b5090SJohn BaldwinFor example,
981621b5090SJohn Baldwinthe
982621b5090SJohn Baldwin.Fl s
983621b5090SJohn Baldwinoption creates a new tree node for a PCI device and sets one or more variables
984621b5090SJohn Baldwinunder that node including the device model and device model-specific variables.
985621b5090SJohn BaldwinVariables may be set multiple times during this parsing stage with the final
986621b5090SJohn Baldwinvalue overriding previous values.
987621b5090SJohn Baldwin.Pp
988621b5090SJohn BaldwinOnce all of the command line options have been processed,
989621b5090SJohn Baldwinthe configuration values are frozen.
990621b5090SJohn Baldwin.Nm
991621b5090SJohn Baldwinthen uses the value of configuration values to initialize device models
992621b5090SJohn Baldwinand global settings.
993621b5090SJohn Baldwin.Pp
994621b5090SJohn BaldwinMore details on configuration variables can be found in
995621b5090SJohn Baldwin.Xr bhyve_config 5 .
996cd377eb3SJohn Baldwin.Sh DEBUG SERVER
997cd377eb3SJohn BaldwinThe current debug server provides limited support for debuggers.
998cd377eb3SJohn Baldwin.Ss Registers
999cd377eb3SJohn BaldwinEach virtual CPU is exposed to the debugger as a thread.
1000cd377eb3SJohn Baldwin.Pp
1001cd377eb3SJohn BaldwinGeneral purpose registers can be queried for each virtual CPU, but other
1002cd377eb3SJohn Baldwinregisters such as floating-point and system registers cannot be queried.
1003cd377eb3SJohn Baldwin.Ss Memory
1004a3b3e89fSBenedict ReuschlingMemory (including memory mapped I/O regions) can be read and written
1005a3b3e89fSBenedict Reuschlingby the debugger.
1006a3b3e89fSBenedict ReuschlingMemory operations use virtual addresses that are resolved to physical
1007a3b3e89fSBenedict Reuschlingaddresses via the current virtual CPU's active address translation.
1008cd377eb3SJohn Baldwin.Ss Control
1009cd377eb3SJohn BaldwinThe running guest can be interrupted by the debugger at any time
1010cd377eb3SJohn Baldwin.Pq for example, by pressing Ctrl-C in the debugger .
1011cd377eb3SJohn Baldwin.Pp
1012cd377eb3SJohn BaldwinSingle stepping is only supported on Intel CPUs supporting the MTRAP VM exit.
1013cd377eb3SJohn Baldwin.Pp
1014cbd03a9dSJohn BaldwinBreakpoints are supported on Intel CPUs that support single stepping.
1015cbd03a9dSJohn BaldwinNote that continuing from a breakpoint while interrupts are enabled in the
1016cbd03a9dSJohn Baldwinguest may not work as expected due to timer interrupts firing while single
1017cbd03a9dSJohn Baldwinstepping over the breakpoint.
1018c2202d41SRoman Bogorodskiy.Sh SIGNAL HANDLING
1019c2202d41SRoman Bogorodskiy.Nm
1020c2202d41SRoman Bogorodskiydeals with the following signals:
1021c2202d41SRoman Bogorodskiy.Pp
10223357e948SMateusz Piotrowski.Bl -tag -width SIGTERM -compact
1023c2202d41SRoman Bogorodskiy.It SIGTERM
1024c2202d41SRoman BogorodskiyTrigger ACPI poweroff for a VM
1025c2202d41SRoman Bogorodskiy.El
1026c2202d41SRoman Bogorodskiy.Sh EXIT STATUS
1027c2202d41SRoman BogorodskiyExit status indicates how the VM was terminated:
1028c2202d41SRoman Bogorodskiy.Pp
1029c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact
1030c2202d41SRoman Bogorodskiy.It 0
1031c2202d41SRoman Bogorodskiyrebooted
1032c2202d41SRoman Bogorodskiy.It 1
1033c2202d41SRoman Bogorodskiypowered off
1034c2202d41SRoman Bogorodskiy.It 2
1035c2202d41SRoman Bogorodskiyhalted
1036c2202d41SRoman Bogorodskiy.It 3
1037c2202d41SRoman Bogorodskiytriple fault
1038989e062bSMarcelo Araujo.It 4
1039989e062bSMarcelo Araujoexited due to an error
1040c2202d41SRoman Bogorodskiy.El
1041b13e60daSPeter Grehan.Sh EXAMPLES
10425c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must have been loaded with
104384fe889cSChristian Brueffer.Xr bhyveload 8
1044b13e60daSPeter Grehanor a similar boot loader before
1045b13e60daSPeter Grehan.Xr bhyve 4
1046b13e60daSPeter Grehancan be run.
10475c3ec676SGleb SmirnoffOtherwise, the boot loader is not needed.
1048b13e60daSPeter Grehan.Pp
1049b13e60daSPeter GrehanTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio
1050b13e60daSPeter Grehanblock device backed by the
1051b13e60daSPeter Grehan.Pa /my/image
1052b13e60daSPeter Grehanfilesystem image, and a serial port for the console:
1053b13e60daSPeter Grehan.Bd -literal -offset indent
1054b13e60daSPeter Grehanbhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\
105510758471SMark Johnston  -l com1,stdio -H -P -m 1G vm1
1056b13e60daSPeter Grehan.Ed
1057b13e60daSPeter Grehan.Pp
1058*71b2ba90SMark JohnstonTo do the same on arm64:
1059*71b2ba90SMark Johnston.Bd -literal -offset indent
1060*71b2ba90SMark Johnston.Ed
1061*71b2ba90SMark Johnstonbhyve -c 2 -s 0,hostbridge -s 1,virtio-blk,/my/image -o console=stdio \\
1062*71b2ba90SMark Johnston  -o bootrom=/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin -m 1G vm1
1063*71b2ba90SMark Johnston.Pp
1064b13e60daSPeter GrehanRun a 24GB single-CPU virtual machine with three network ports, one of which
1065b13e60daSPeter Grehanhas a MAC address specified:
1066b13e60daSPeter Grehan.Bd -literal -offset indent
1067b13e60daSPeter Grehanbhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\
1068b13e60daSPeter Grehan  -s 2:1,virtio-net,tap1 \\
1069b13e60daSPeter Grehan  -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\
1070b13e60daSPeter Grehan  -s 3,virtio-blk,/my/image -l com1,stdio \\
107110758471SMark Johnston  -H -P -m 24G bigvm
1072b13e60daSPeter Grehan.Ed
1073b13e60daSPeter Grehan.Pp
1074b13e60daSPeter GrehanRun an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI
1075b13e60daSPeter GrehanCD-ROM, a single virtio network port, an AMD hostbridge, and the console
1076b13e60daSPeter Grehanport connected to an
1077b13e60daSPeter Grehan.Xr nmdm 4
107884fe889cSChristian Brueffernull-modem device.
1079b13e60daSPeter Grehan.Bd -literal -offset indent
1080a7ab1463SAlexander Motinbhyve -c 4 \\
1081b13e60daSPeter Grehan  -s 0,amd_hostbridge -s 1,lpc \\
1082098f5155SAlexander Motin  -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\
1083098f5155SAlexander Motinhd:/images/disk.3,hd:/images/disk.4,\\
1084098f5155SAlexander Motinhd:/images/disk.5,hd:/images/disk.6,\\
1085098f5155SAlexander Motinhd:/images/disk.7,hd:/images/disk.8,\\
1086098f5155SAlexander Motincd:/images/install.iso \\
1087b13e60daSPeter Grehan  -s 3,virtio-net,tap0 \\
1088b13e60daSPeter Grehan  -l com1,/dev/nmdm0A \\
108910758471SMark Johnston  -H -P -m 8G
1090b13e60daSPeter Grehan.Ed
10915c3ec676SGleb Smirnoff.Pp
10925c3ec676SGleb SmirnoffRun a UEFI virtual machine with a display resolution of 800 by 600 pixels
10935c3ec676SGleb Smirnoffthat can be accessed via VNC at: 0.0.0.0:5900.
10945c3ec676SGleb Smirnoff.Bd -literal -offset indent
10955c3ec676SGleb Smirnoffbhyve -c 2 -m 4G -w -H \\
10965c3ec676SGleb Smirnoff  -s 0,hostbridge \\
10975c3ec676SGleb Smirnoff  -s 3,ahci-cd,/path/to/uefi-OS-install.iso \\
10985c3ec676SGleb Smirnoff  -s 4,ahci-hd,disk.img \\
10995c3ec676SGleb Smirnoff  -s 5,virtio-net,tap0 \\
11005c3ec676SGleb Smirnoff  -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\
11015c3ec676SGleb Smirnoff  -s 30,xhci,tablet \\
11025c3ec676SGleb Smirnoff  -s 31,lpc -l com1,stdio \\
11035c3ec676SGleb Smirnoff  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
11045c3ec676SGleb Smirnoff   uefivm
11055c3ec676SGleb Smirnoff.Ed
11068883128bSBjoern A. Zeeb.Pp
11078883128bSBjoern A. ZeebRun a UEFI virtual machine with a VNC display that is bound to all IPv6
11088883128bSBjoern A. Zeebaddresses on port 5900.
11098883128bSBjoern A. Zeeb.Bd -literal -offset indent
11108883128bSBjoern A. Zeebbhyve -c 2 -m 4G -w -H \\
11118883128bSBjoern A. Zeeb  -s 0,hostbridge \\
11128883128bSBjoern A. Zeeb  -s 4,ahci-hd,disk.img \\
11138883128bSBjoern A. Zeeb  -s 5,virtio-net,tap0 \\
11148883128bSBjoern A. Zeeb  -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\
11158883128bSBjoern A. Zeeb  -s 30,xhci,tablet \\
11168883128bSBjoern A. Zeeb  -s 31,lpc -l com1,stdio \\
11178883128bSBjoern A. Zeeb  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
11188883128bSBjoern A. Zeeb   uefivm
11198883128bSBjoern A. Zeeb.Ed
1120866036f4SRebecca Cran.Pp
1121866036f4SRebecca CranRun a UEFI virtual machine with a VARS file to save EFI variables.
1122866036f4SRebecca CranNote that
1123866036f4SRebecca Cran.Nm
1124866036f4SRebecca Cranwill write guest modifications to the given VARS file.
1125866036f4SRebecca CranBe sure to create a per-guest copy of the template VARS file from
1126866036f4SRebecca Cran.Pa /usr .
1127866036f4SRebecca Cran.Bd -literal -offset indent
1128866036f4SRebecca Cranbhyve -c 2 -m 4g -w -H \\
1129866036f4SRebecca Cran  -s 0,hostbridge \\
113066659955SAlexey Marchenko  -s 31,lpc -l com1,stdio \\
1131866036f4SRebecca Cran  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd
1132866036f4SRebecca Cran   uefivm
1133866036f4SRebecca Cran.Ed
1134b13e60daSPeter Grehan.Sh SEE ALSO
1135b13e60daSPeter Grehan.Xr bhyve 4 ,
1136e90337e4SAleksandr Fedorov.Xr netgraph 4 ,
1137e90337e4SAleksandr Fedorov.Xr ng_socket 4 ,
1138b13e60daSPeter Grehan.Xr nmdm 4 ,
1139b13e60daSPeter Grehan.Xr vmm 4 ,
1140621b5090SJohn Baldwin.Xr bhyve_config 5 ,
1141b13e60daSPeter Grehan.Xr ethers 5 ,
114205f7cd8bSJoel Dahl.Xr bhyvectl 8 ,
114305f7cd8bSJoel Dahl.Xr bhyveload 8
11448d56c805SYuri Pankov.Pp
11458d56c805SYuri Pankov.Rs
11468d56c805SYuri Pankov.%A Intel
11478d56c805SYuri Pankov.%B 64 and IA-32 Architectures Software Developer’s Manual
11488d56c805SYuri Pankov.%V Volume 3
11498d56c805SYuri Pankov.Re
1150b13e60daSPeter Grehan.Sh HISTORY
1151b13e60daSPeter Grehan.Nm
1152b13e60daSPeter Grehanfirst appeared in
1153b13e60daSPeter Grehan.Fx 10.0 .
1154b13e60daSPeter Grehan.Sh AUTHORS
115501c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@freebsd.org
115601c2b8acSBaptiste Daroussin.An Peter Grehan Aq Mt grehan@freebsd.org
1157