xref: /freebsd/usr.sbin/bhyve/bhyve.8 (revision 054accac71e0944ab588c3ab052bea6947df7885)
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.\"
25b13e60daSPeter Grehan.\" $FreeBSD$
26b13e60daSPeter Grehan.\"
27bfe40b69SMateusz Piotrowski.Dd April 18, 2021
28b13e60daSPeter Grehan.Dt BHYVE 8
29b13e60daSPeter Grehan.Os
30b13e60daSPeter Grehan.Sh NAME
31b13e60daSPeter Grehan.Nm bhyve
32b13e60daSPeter Grehan.Nd "run a guest operating system inside a virtual machine"
33b13e60daSPeter Grehan.Sh SYNOPSIS
34b13e60daSPeter Grehan.Nm
35c4df8cbfSRobert Wing.Op Fl AaCDeHhPSuWwxY
3601d822d3SRodney W. Grimes.Oo
3777d208a3SMateusz Piotrowski.Sm off
3877d208a3SMateusz Piotrowski.Fl c\~
3901d822d3SRodney W. Grimes.Oo
4077d208a3SMateusz Piotrowski.Op Cm cpus=
4177d208a3SMateusz Piotrowski.Ar numcpus
4201d822d3SRodney W. Grimes.Oc
4377d208a3SMateusz Piotrowski.Op Cm ,sockets= Ar n
4477d208a3SMateusz Piotrowski.Op Cm ,cores= Ar n
4577d208a3SMateusz Piotrowski.Op Cm ,threads= Ar n
4677d208a3SMateusz Piotrowski.Oc
4777d208a3SMateusz Piotrowski.Sm on
48cd377eb3SJohn Baldwin.Op Fl G Ar port
49621b5090SJohn Baldwin.Op Fl k Ar file
5077d208a3SMateusz Piotrowski.Oo Fl l
5177d208a3SMateusz Piotrowski.Sm off
52bfe40b69SMateusz Piotrowski.Ar lpcdev Op Cm \&, Ar conf
5377d208a3SMateusz Piotrowski.Sm on
5477d208a3SMateusz Piotrowski.Oc
5577d208a3SMateusz Piotrowski.Oo Fl m
5677d208a3SMateusz Piotrowski.Sm off
5777d208a3SMateusz Piotrowski.Ar memsize
5877d208a3SMateusz Piotrowski.Oo
598d9fefe6SMateusz Piotrowski.Cm K | Cm k | Cm M | Cm m | Cm G | Cm g | Cm T | Cm t
6077d208a3SMateusz Piotrowski.Oc
6177d208a3SMateusz Piotrowski.Sm on
6277d208a3SMateusz Piotrowski.Oc
63621b5090SJohn Baldwin.Op Fl o Ar var Ns Cm = Ns Ar value
6477d208a3SMateusz Piotrowski.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu
65483d953aSJohn Baldwin.Op Fl r Ar file
6677d208a3SMateusz Piotrowski.Sm off
67bfe40b69SMateusz Piotrowski.Oo Fl s\~
68bfe40b69SMateusz Piotrowski.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf
6977d208a3SMateusz Piotrowski.Sm on
7077d208a3SMateusz Piotrowski.Oc
715749449dSJohn Baldwin.Op Fl U Ar uuid
72b13e60daSPeter Grehan.Ar vmname
73bfe40b69SMateusz Piotrowski.Nm
74bfe40b69SMateusz Piotrowski.Fl l Cm help
75bfe40b69SMateusz Piotrowski.Nm
76bfe40b69SMateusz Piotrowski.Fl s Cm help
77b13e60daSPeter Grehan.Sh DESCRIPTION
78b13e60daSPeter Grehan.Nm
797fca1ad5SGlen Barberis a hypervisor that runs guest operating systems inside a
80b13e60daSPeter Grehanvirtual machine.
81b13e60daSPeter Grehan.Pp
82b13e60daSPeter GrehanParameters such as the number of virtual CPUs, amount of guest memory, and
83b13e60daSPeter GrehanI/O connectivity can be specified with command-line parameters.
84b13e60daSPeter Grehan.Pp
855c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must be loaded with
8684fe889cSChristian Brueffer.Xr bhyveload 8
87b13e60daSPeter Grehanor a similar boot loader before running
885c3ec676SGleb Smirnoff.Nm ,
895c3ec676SGleb Smirnoffotherwise, it is enough to run
905c3ec676SGleb Smirnoff.Nm
915c3ec676SGleb Smirnoffwith a boot ROM of choice.
92b13e60daSPeter Grehan.Pp
93b13e60daSPeter Grehan.Nm
94b13e60daSPeter Grehanruns until the guest operating system reboots or an unhandled hypervisor
95b13e60daSPeter Grehanexit is detected.
96b13e60daSPeter Grehan.Sh OPTIONS
97b13e60daSPeter Grehan.Bl -tag -width 10n
98b13e60daSPeter Grehan.It Fl A
99b13e60daSPeter GrehanGenerate ACPI tables.
100b13e60daSPeter GrehanRequired for
101b13e60daSPeter Grehan.Fx Ns /amd64
102b13e60daSPeter Grehanguests.
103ccb1c87aSMateusz Piotrowski.It Fl a
104ccb1c87aSMateusz PiotrowskiThe guest's local APIC is configured in xAPIC mode.
105ccb1c87aSMateusz PiotrowskiThe xAPIC mode is the default setting so this option is redundant.
106ccb1c87aSMateusz PiotrowskiIt will be deprecated in a future version.
107ccb1c87aSMateusz Piotrowski.It Fl C
108ccb1c87aSMateusz PiotrowskiInclude guest memory in core file.
10901d822d3SRodney W. Grimes.It Fl c Op Ar setting ...
11001d822d3SRodney W. GrimesNumber of guest virtual CPUs
11101d822d3SRodney W. Grimesand/or the CPU topology.
11201d822d3SRodney W. GrimesThe default value for each of
11301d822d3SRodney W. Grimes.Ar numcpus ,
11401d822d3SRodney W. Grimes.Ar sockets ,
11501d822d3SRodney W. Grimes.Ar cores ,
11601d822d3SRodney W. Grimesand
11701d822d3SRodney W. Grimes.Ar threads
11801d822d3SRodney W. Grimesis 1.
11901d822d3SRodney W. GrimesThe current maximum number of guest virtual CPUs is 16.
12001d822d3SRodney W. GrimesIf
12101d822d3SRodney W. Grimes.Ar numcpus
12201d822d3SRodney W. Grimesis not specified then it will be calculated from the other arguments.
12301d822d3SRodney W. GrimesThe topology must be consistent in that the
12401d822d3SRodney W. Grimes.Ar numcpus
12501d822d3SRodney W. Grimesmust equal the product of
12601d822d3SRodney W. Grimes.Ar sockets ,
12701d822d3SRodney W. Grimes.Ar cores ,
12801d822d3SRodney W. Grimesand
12901d822d3SRodney W. Grimes.Ar threads .
13001d822d3SRodney W. GrimesIf a
13101d822d3SRodney W. Grimes.Ar setting
13201d822d3SRodney W. Grimesis specified more than once the last one has precedence.
1330a1016f9SPawel Biernacki.It Fl D
1340a1016f9SPawel BiernackiDestroy the VM on guest initiated power-off.
135cde1f5b8SJohn Baldwin.It Fl e
136cde1f5b8SJohn BaldwinForce
137cde1f5b8SJohn Baldwin.Nm
138cde1f5b8SJohn Baldwinto exit when a guest issues an access to an I/O port that is not emulated.
139cde1f5b8SJohn BaldwinThis is intended for debug purposes.
140cd377eb3SJohn Baldwin.It Fl G Ar port
141cd377eb3SJohn BaldwinStart a debug server that uses the GDB protocol to export guest state to a
142cd377eb3SJohn Baldwindebugger.
143cd377eb3SJohn BaldwinAn IPv4 TCP socket will be bound to the supplied
144cd377eb3SJohn Baldwin.Ar port
145cd377eb3SJohn Baldwinto listen for debugger connections.
146cd377eb3SJohn BaldwinOnly a single debugger may be attached to the debug server at a time.
147cd377eb3SJohn BaldwinIf
148cd377eb3SJohn Baldwin.Ar port
149cd377eb3SJohn Baldwinbegins with
150cd377eb3SJohn Baldwin.Sq w ,
151cd377eb3SJohn Baldwin.Nm
152cd377eb3SJohn Baldwinwill pause execution at the first instruction waiting for a debugger to attach.
153cde1f5b8SJohn Baldwin.It Fl H
154cde1f5b8SJohn BaldwinYield the virtual CPU thread when a HLT instruction is detected.
155cde1f5b8SJohn BaldwinIf this option is not specified, virtual CPUs will use 100% of a host CPU.
156ccb1c87aSMateusz Piotrowski.It Fl h
157ccb1c87aSMateusz PiotrowskiPrint help message and exit.
158621b5090SJohn Baldwin.It Fl k Ar file
159621b5090SJohn BaldwinSet configuration variables from a simple, key-value config file.
160621b5090SJohn BaldwinEach line of the config file is expected to consist of a config variable
161621b5090SJohn Baldwinname, an equals sign
162621b5090SJohn Baldwin.Pq Sq = ,
163621b5090SJohn Baldwinand a value.
164621b5090SJohn BaldwinNo spaces are permitted between the variable name, equals sign, or
165621b5090SJohn Baldwinvalue.
166621b5090SJohn BaldwinBlank lines and lines starting with
167621b5090SJohn Baldwin.Sq #
168621b5090SJohn Baldwinare ignored.
1694c08b978SMateusz Piotrowski.It Fl l Cm help
1704c08b978SMateusz PiotrowskiPrint a list of supported LPC devices.
1714c08b978SMateusz Piotrowski.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf
172cde1f5b8SJohn BaldwinAllow devices behind the LPC PCI-ISA bridge to be configured.
1739b1aa8d6SNeel NatuThe only supported devices are the TTY-class devices
1744c08b978SMateusz Piotrowski.Cm com1 , com2 , com3 ,
1754c08b978SMateusz Piotrowskiand
1764c08b978SMateusz Piotrowski.Cm com4 ,
1772f40fc6fSPeter Grehanthe boot ROM device
1784c08b978SMateusz Piotrowski.Cm bootrom ,
1792f40fc6fSPeter Grehanand the debug/test device
1804c08b978SMateusz Piotrowski.Cm pc-testdev .
1811aa56353SMarcelo Araujo.Pp
1824c08b978SMateusz PiotrowskiThe possible values for the
1834c08b978SMateusz Piotrowski.Ar conf
1844c08b978SMateusz Piotrowskiargument are listed in the
1854c08b978SMateusz Piotrowski.Fl s
1864c08b978SMateusz Piotrowskiflag description.
1877e0cb3dfSMateusz Piotrowski.It Xo
1887e0cb3dfSMateusz Piotrowski.Fl m Ar memsize Ns Oo
1897e0cb3dfSMateusz Piotrowski.Sm off
1907e0cb3dfSMateusz Piotrowski.Cm K | k | M | m | G | g | T | t
1917e0cb3dfSMateusz Piotrowski.Sm on
1927e0cb3dfSMateusz Piotrowski.Oc
1937e0cb3dfSMateusz Piotrowski.Xc
1947e0cb3dfSMateusz PiotrowskiSet the guest physical memory size
195cde1f5b8SJohn BaldwinThis must be the same size that was given to
196cde1f5b8SJohn Baldwin.Xr bhyveload 8 .
197cde1f5b8SJohn Baldwin.Pp
1987e0cb3dfSMateusz PiotrowskiThe size argument may be suffixed with one of
1997e0cb3dfSMateusz Piotrowski.Cm K , M , G
2007e0cb3dfSMateusz Piotrowskior
2017e0cb3dfSMateusz Piotrowski.Cm T
2027e0cb3dfSMateusz Piotrowski(either upper or lower case)
2037e0cb3dfSMateusz Piotrowskito indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes.
204cde1f5b8SJohn BaldwinIf no suffix is given, the value is assumed to be in megabytes.
2056ee52c65SRoman Bogorodskiy.Pp
2067e0cb3dfSMateusz PiotrowskiThe default is 256M.
207621b5090SJohn Baldwin.It Fl o Ar var Ns Cm = Ns Ar value
208621b5090SJohn BaldwinSet the configuration variable
209621b5090SJohn Baldwin.Ar var
210621b5090SJohn Baldwinto
211621b5090SJohn Baldwin.Ar value .
212ccb1c87aSMateusz Piotrowski.It Fl P
213ccb1c87aSMateusz PiotrowskiForce the guest virtual CPU to exit when a PAUSE instruction is detected.
21490df5437SMateusz Piotrowski.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu
2159b6155a2SNeel NatuPin guest's virtual CPU
2169b6155a2SNeel Natu.Em vcpu
2179b6155a2SNeel Natuto
2189b6155a2SNeel Natu.Em hostcpu .
219483d953aSJohn Baldwin.It Fl r Ar file
220483d953aSJohn BaldwinResume a guest from a snapshot.
221483d953aSJohn BaldwinThe guest memory contents are restored from
222483d953aSJohn Baldwin.Ar file ,
223483d953aSJohn Baldwinand the guest device and vCPU state are restored from the file
224483d953aSJohn Baldwin.Dq Ar file Ns .kern .
225483d953aSJohn Baldwin.Pp
226483d953aSJohn BaldwinNote that the current snapshot file format requires that the configuration of
227483d953aSJohn Baldwindevices in the new VM match the VM from which the snapshot was taken by specifying the
228483d953aSJohn Baldwinsame
229b24eea8cSMateusz Piotrowski.Fl s
230483d953aSJohn Baldwinand
231b24eea8cSMateusz Piotrowski.Fl l
232483d953aSJohn Baldwinoptions.
233483d953aSJohn BaldwinThe count of vCPUs and memory configuration are read from the snapshot.
234ccb1c87aSMateusz Piotrowski.It Fl S
235ccb1c87aSMateusz PiotrowskiWire guest memory.
236449f0e48SMateusz Piotrowski.It Fl s Cm help
237449f0e48SMateusz PiotrowskiPrint a list of supported PCI devices.
238449f0e48SMateusz Piotrowski.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf
239b13e60daSPeter GrehanConfigure a virtual PCI slot and function.
240b13e60daSPeter Grehan.Pp
24184fe889cSChristian Brueffer.Nm
242b13e60daSPeter Grehanprovides PCI bus emulation and virtual devices that can be attached to
243b13e60daSPeter Grehanslots on the bus.
244b13e60daSPeter GrehanThere are 32 available slots, with the option of providing up to 8 functions
245b13e60daSPeter Grehanper slot.
246234d8c47SMateusz Piotrowski.Pp
247234d8c47SMateusz PiotrowskiThe
248234d8c47SMateusz Piotrowski.Ar slot
249234d8c47SMateusz Piotrowskican be specified in one of the following formats:
250234d8c47SMateusz Piotrowski.Pp
251234d8c47SMateusz Piotrowski.Bl -bullet -compact
252234d8c47SMateusz Piotrowski.It
253234d8c47SMateusz Piotrowski.Ar pcislot
254234d8c47SMateusz Piotrowski.It
255234d8c47SMateusz Piotrowski.Sm off
256234d8c47SMateusz Piotrowski.Ar pcislot Cm \&: Ar function
257234d8c47SMateusz Piotrowski.Sm on
258234d8c47SMateusz Piotrowski.It
259234d8c47SMateusz Piotrowski.Sm off
260234d8c47SMateusz Piotrowski.Ar bus Cm \&: Ar pcislot Cm \&: Ar function
261234d8c47SMateusz Piotrowski.Sm on
262234d8c47SMateusz Piotrowski.El
263b13e60daSPeter Grehan.Pp
264b13e60daSPeter GrehanThe
265b13e60daSPeter Grehan.Ar pcislot
26684fe889cSChristian Brueffervalue is 0 to 31.
26784fe889cSChristian BruefferThe optional
26884fe889cSChristian Brueffer.Ar function
26984fe889cSChristian Brueffervalue is 0 to 7.
27084fe889cSChristian BruefferThe optional
27106db1b4aSNeel Natu.Ar bus
27206db1b4aSNeel Natuvalue is 0 to 255.
27384fe889cSChristian BruefferIf not specified, the
27484fe889cSChristian Brueffer.Ar function
27584fe889cSChristian Brueffervalue defaults to 0.
27684fe889cSChristian BruefferIf not specified, the
27784fe889cSChristian Brueffer.Ar bus
27884fe889cSChristian Brueffervalue defaults to 0.
279234d8c47SMateusz Piotrowski.Pp
280234d8c47SMateusz PiotrowskiThe
281234d8c47SMateusz Piotrowski.Ar emulation
282234d8c47SMateusz Piotrowskiargument
283234d8c47SMateusz Piotrowskican be one of the following:
2847014cb23SMateusz Piotrowski.Bl -tag -width "amd_hostbridge"
2857014cb23SMateusz Piotrowski.It Cm hostbridge
2867014cb23SMateusz PiotrowskiA simple host bridge.
287b13e60daSPeter GrehanThis is usually configured at slot 0, and is required by most guest
288b13e60daSPeter Grehanoperating systems.
2897014cb23SMateusz Piotrowski.It Cm amd_hostbridge
2907014cb23SMateusz PiotrowskiEmulation identical to
2917014cb23SMateusz Piotrowski.Cm hostbridge
2927014cb23SMateusz Piotrowskiusing a PCI vendor ID of AMD.
2937014cb23SMateusz Piotrowski.It Cm passthru
294b13e60daSPeter GrehanPCI pass-through device.
2957014cb23SMateusz Piotrowski.It Cm virtio-net
296b13e60daSPeter GrehanVirtio network interface.
2977014cb23SMateusz Piotrowski.It Cm virtio-blk
298b13e60daSPeter GrehanVirtio block storage interface.
2997014cb23SMateusz Piotrowski.It Cm virtio-scsi
300f9c005a1SMarcelo AraujoVirtio SCSI interface.
3017014cb23SMateusz Piotrowski.It Cm virtio-9p
302100353cfSJakub Wojciech KlamaVirtio 9p (VirtFS) interface.
3037014cb23SMateusz Piotrowski.It Cm virtio-rnd
3049d0c4e17SPeter GrehanVirtio RNG interface.
3057014cb23SMateusz Piotrowski.It Cm virtio-console
3065121b6ccSRoman BogorodskiyVirtio console interface, which exposes multiple ports
3075121b6ccSRoman Bogorodskiyto the guest in the form of simple char devices for simple IO
3085121b6ccSRoman Bogorodskiybetween the guest and host userspaces.
309*054accacSCorvin Köhne.It Cm virtio-input
310*054accacSCorvin KöhneVirtio input interface.
3117014cb23SMateusz Piotrowski.It Cm ahci
312d6099860SMaxim KonovalovAHCI controller attached to arbitrary devices.
3137014cb23SMateusz Piotrowski.It Cm ahci-cd
314b13e60daSPeter GrehanAHCI controller attached to an ATAPI CD/DVD.
3157014cb23SMateusz Piotrowski.It Cm ahci-hd
3167014cb23SMateusz PiotrowskiAHCI controller attached to a SATA hard drive.
3177014cb23SMateusz Piotrowski.It Cm e1000
3189e749f25SAlexander MotinIntel e82545 network interface.
3197014cb23SMateusz Piotrowski.It Cm uart
320b13e60daSPeter GrehanPCI 16550 serial device.
3217014cb23SMateusz Piotrowski.It Cm lpc
3227014cb23SMateusz PiotrowskiLPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports,
3237014cb23SMateusz Piotrowskia boot ROM, and,
3242f40fc6fSPeter Grehanoptionally, the debug/test device.
3259b1aa8d6SNeel NatuThe LPC bridge emulation can only be configured on bus 0.
3267014cb23SMateusz Piotrowski.It Cm fbuf
3276c87a2c0SGleb SmirnoffRaw framebuffer device attached to VNC server.
3287014cb23SMateusz Piotrowski.It Cm xhci
3295c3ec676SGleb SmirnoffeXtensible Host Controller Interface (xHCI) USB controller.
3307014cb23SMateusz Piotrowski.It Cm nvme
331c066c68cSMarcelo AraujoNVM Express (NVMe) controller.
3327014cb23SMateusz Piotrowski.It Cm hda
33336f9f044SWarner LoshHigh Definition Audio Controller.
334b13e60daSPeter Grehan.El
335234d8c47SMateusz Piotrowski.Pp
336234d8c47SMateusz PiotrowskiThe optional parameter
337234d8c47SMateusz Piotrowski.Ar conf
338234d8c47SMateusz Piotrowskidescribes the backend for device emulations.
339b13e60daSPeter GrehanIf
340b13e60daSPeter Grehan.Ar conf
341b13e60daSPeter Grehanis not specified, the device emulation has no backend and can be
342b13e60daSPeter Grehanconsidered unconnected.
343b13e60daSPeter Grehan.Pp
3448d9fefe6SMateusz PiotrowskiNetwork device backends:
3457fb22729SMateusz Piotrowski.Sm off
3467fb22729SMateusz Piotrowski.Bl -bullet
3477fb22729SMateusz Piotrowski.It
3487fb22729SMateusz Piotrowski.Xo
3497fb22729SMateusz Piotrowski.Cm tap Ar N
3507fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
3517fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
3527fb22729SMateusz Piotrowski.Xc
3537fb22729SMateusz Piotrowski.It
3547fb22729SMateusz Piotrowski.Xo
3557fb22729SMateusz Piotrowski.Cm vmnet Ar N
3567fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
3577fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
3587fb22729SMateusz Piotrowski.Xc
3597fb22729SMateusz Piotrowski.It
3607fb22729SMateusz Piotrowski.Xo
3617fb22729SMateusz Piotrowski.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK
3627fb22729SMateusz Piotrowski.Op Cm \&,socket= Ar NAME
3637fb22729SMateusz Piotrowski.Op Cm \&,hook= Ar HOOK
3647fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
3657fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N
3667fb22729SMateusz Piotrowski.Xc
3677fb22729SMateusz Piotrowski.El
3687fb22729SMateusz Piotrowski.Sm on
369b13e60daSPeter GrehanIf
3707fb22729SMateusz Piotrowski.Cm mac
371b13e60daSPeter Grehanis not specified, the MAC address is derived from a fixed OUI and the
372b13e60daSPeter Grehanremaining bytes from an MD5 hash of the slot and function numbers and
373b13e60daSPeter Grehanthe device name.
374b13e60daSPeter Grehan.Pp
375b13e60daSPeter GrehanThe MAC address is an ASCII string in
376b13e60daSPeter Grehan.Xr ethers 5
377b13e60daSPeter Grehanformat.
378692dbfe9SVincenzo Maffione.Pp
3797fb22729SMateusz PiotrowskiWith
3807fb22729SMateusz Piotrowski.Cm virtio-net
3817fb22729SMateusz Piotrowskidevices, the
3827fb22729SMateusz Piotrowski.Cm mtu
383692dbfe9SVincenzo Maffioneparameter can be specified to inform the guest about the largest MTU
384692dbfe9SVincenzo Maffionethat should be allowed, expressed in bytes.
385e90337e4SAleksandr Fedorov.Pp
3867fb22729SMateusz PiotrowskiWith
3877fb22729SMateusz Piotrowski.Cm netgraph
3887fb22729SMateusz Piotrowskibackend, the
3897fb22729SMateusz Piotrowski.Cm path
390e90337e4SAleksandr Fedorovand
3917fb22729SMateusz Piotrowski.Cm peerhook
392e90337e4SAleksandr Fedorovparameters must be specified to set the destination node and corresponding hook.
393e90337e4SAleksandr FedorovThe optional parameters
3947fb22729SMateusz Piotrowski.Cm socket
395e90337e4SAleksandr Fedorovand
3967fb22729SMateusz Piotrowski.Cm hook
397e90337e4SAleksandr Fedorovmay be used to set the
398e90337e4SAleksandr Fedorov.Xr ng_socket 4
399e90337e4SAleksandr Fedorovnode name and source hook.
400e90337e4SAleksandr FedorovThe
401e90337e4SAleksandr Fedorov.Ar ADDRESS ,
4027fb22729SMateusz Piotrowski.Ar HOOK ,
403e90337e4SAleksandr Fedorovand
404e90337e4SAleksandr Fedorov.Ar NAME
405e90337e4SAleksandr Fedorovmust comply with
406e90337e4SAleksandr Fedorov.Xr netgraph 4
407e90337e4SAleksandr Fedorovaddressing rules.
408b13e60daSPeter Grehan.Pp
4095232a35fSMateusz PiotrowskiBlock storage device backends:
4105232a35fSMateusz Piotrowski.Sm off
4115232a35fSMateusz Piotrowski.Bl -bullet
4125232a35fSMateusz Piotrowski.It
4135232a35fSMateusz Piotrowski.Ar /filename Op Cm \&, Ar block-device-options
4145232a35fSMateusz Piotrowski.It
4155232a35fSMateusz Piotrowski.Ar /dev/xxx Op Cm \&, Ar block-device-options
4164e43c1e8SNeel Natu.El
4175232a35fSMateusz Piotrowski.Sm on
4184e43c1e8SNeel Natu.Pp
4194e43c1e8SNeel NatuThe
4204e43c1e8SNeel Natu.Ar block-device-options
4214e43c1e8SNeel Natuare:
4225232a35fSMateusz Piotrowski.Bl -tag -width 10n
4235232a35fSMateusz Piotrowski.It Cm nocache
424b13e60daSPeter GrehanOpen the file with
425b13e60daSPeter Grehan.Dv O_DIRECT .
4265232a35fSMateusz Piotrowski.It Cm direct
427b13e60daSPeter GrehanOpen the file using
428b13e60daSPeter Grehan.Dv O_SYNC .
4295232a35fSMateusz Piotrowski.It Cm ro
430b13e60daSPeter GrehanForce the file to be opened read-only.
4315232a35fSMateusz Piotrowski.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc
4324e43c1e8SNeel NatuSpecify the logical and physical sector sizes of the emulated disk.
4334e43c1e8SNeel NatuThe physical sector size is optional and is equal to the logical sector size
4344e43c1e8SNeel Natuif not explicitly specified.
4355232a35fSMateusz Piotrowski.It Cm nodelete
436e6d795d1SAllan JudeDisable emulation of guest trim requests via
437e6d795d1SAllan Jude.Dv DIOCGDELETE
438e6d795d1SAllan Juderequests.
439b13e60daSPeter Grehan.El
440b13e60daSPeter Grehan.Pp
4417c5829c9SMateusz PiotrowskiSCSI device backends:
4427c5829c9SMateusz Piotrowski.Sm off
4437c5829c9SMateusz Piotrowski.Bl -bullet
4447c5829c9SMateusz Piotrowski.It
4457c5829c9SMateusz Piotrowski.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc
44649f87822SAlexander Motin.El
4477c5829c9SMateusz Piotrowski.Sm on
44849f87822SAlexander Motin.Pp
44949f87822SAlexander MotinThe
45049f87822SAlexander Motin.Ar scsi-device-options
45149f87822SAlexander Motinare:
45249f87822SAlexander Motin.Bl -tag -width 10n
4537c5829c9SMateusz Piotrowski.It Cm iid= Ns Ar IID
45449f87822SAlexander MotinInitiator ID to use when sending requests to specified CTL port.
45549f87822SAlexander MotinThe default value is 0.
456f9c005a1SMarcelo Araujo.El
457f9c005a1SMarcelo Araujo.Pp
4582d00b570SMateusz Piotrowski9P device backends:
4592d00b570SMateusz Piotrowski.Sm off
4602d00b570SMateusz Piotrowski.Bl -bullet
4612d00b570SMateusz Piotrowski.It
4622d00b570SMateusz Piotrowski.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options
463100353cfSJakub Wojciech Klama.El
4642d00b570SMateusz Piotrowski.Sm on
465100353cfSJakub Wojciech Klama.Pp
466100353cfSJakub Wojciech KlamaThe
467100353cfSJakub Wojciech Klama.Ar 9p-device-options
468100353cfSJakub Wojciech Klamaare:
469100353cfSJakub Wojciech Klama.Bl -tag -width 10n
4702d00b570SMateusz Piotrowski.It Cm ro
471100353cfSJakub Wojciech KlamaExpose the share in read-only mode.
472100353cfSJakub Wojciech Klama.El
473100353cfSJakub Wojciech Klama.Pp
4742fda01a1SMateusz PiotrowskiTTY device backends:
475b13e60daSPeter Grehan.Bl -tag -width 10n
4762fda01a1SMateusz Piotrowski.It Cm stdio
477b13e60daSPeter GrehanConnect the serial port to the standard input and output of
47884fe889cSChristian Bruefferthe
47984fe889cSChristian Brueffer.Nm
48084fe889cSChristian Bruefferprocess.
4812fda01a1SMateusz Piotrowski.It Ar /dev/xxx
482b13e60daSPeter GrehanUse the host TTY device for serial port I/O.
483b13e60daSPeter Grehan.El
484b13e60daSPeter Grehan.Pp
4852fda01a1SMateusz PiotrowskiBoot ROM device backends:
4869b1aa8d6SNeel Natu.Bl -tag -width 10n
4872fda01a1SMateusz Piotrowski.It Ar romfile
4889b1aa8d6SNeel NatuMap
4899b1aa8d6SNeel Natu.Ar romfile
4909b1aa8d6SNeel Natuin the guest address space reserved for boot firmware.
4919b1aa8d6SNeel Natu.El
4929b1aa8d6SNeel Natu.Pp
4932fda01a1SMateusz PiotrowskiPass-through device backends:
494b13e60daSPeter Grehan.Bl -tag -width 10n
4952fda01a1SMateusz Piotrowski.It Ns Ar slot Ns Cm \&/ Ns Ar bus Ns Cm \&/ Ns Ar function
496b13e60daSPeter GrehanConnect to a PCI device on the host at the selector described by
497b13e60daSPeter Grehan.Ar slot ,
498b13e60daSPeter Grehan.Ar bus ,
499b13e60daSPeter Grehanand
500b13e60daSPeter Grehan.Ar function
501b13e60daSPeter Grehannumbers.
502b13e60daSPeter Grehan.El
503b13e60daSPeter Grehan.Pp
5049b1aa8d6SNeel NatuGuest memory must be wired using the
5059b1aa8d6SNeel Natu.Fl S
5069b1aa8d6SNeel Natuoption when a pass-through device is configured.
5079b1aa8d6SNeel Natu.Pp
508b13e60daSPeter GrehanThe host device must have been reserved at boot-time using the
509a9258f9bSWarren Block.Va pptdevs
510b13e60daSPeter Grehanloader variable as described in
511b13e60daSPeter Grehan.Xr vmm 4 .
5125121b6ccSRoman Bogorodskiy.Pp
5133f4c771fSMateusz PiotrowskiVirtio console device backends:
5143f4c771fSMateusz Piotrowski.Bl -bullet
5153f4c771fSMateusz Piotrowski.Sm off
5163f4c771fSMateusz Piotrowski.It
5173f4c771fSMateusz 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 ...
5183f4c771fSMateusz Piotrowski.Sm on
5193f4c771fSMateusz Piotrowski.El
5203f4c771fSMateusz Piotrowski.Pp
5215121b6ccSRoman BogorodskiyA maximum of 16 ports per device can be created.
5225121b6ccSRoman BogorodskiyEvery port is named and corresponds to a Unix domain socket created by
5235121b6ccSRoman Bogorodskiy.Nm .
5245121b6ccSRoman Bogorodskiy.Nm
5255121b6ccSRoman Bogorodskiyaccepts at most one connection per port at a time.
5265121b6ccSRoman Bogorodskiy.Pp
5275121b6ccSRoman BogorodskiyLimitations:
5288d9fefe6SMateusz Piotrowski.Bl -bullet
5295121b6ccSRoman Bogorodskiy.It
5305121b6ccSRoman BogorodskiyDue to lack of destructors in
5315121b6ccSRoman Bogorodskiy.Nm ,
5325121b6ccSRoman Bogorodskiysockets on the filesystem must be cleaned up manually after
5335121b6ccSRoman Bogorodskiy.Nm
5345121b6ccSRoman Bogorodskiyexits.
5355121b6ccSRoman Bogorodskiy.It
5363f4c771fSMateusz PiotrowskiThere is no way to use the
5373f4c771fSMateusz Piotrowski.Dq console port
5383f4c771fSMateusz Piotrowskifeature, nor the console port
5390ee3a4b4SRoman Bogorodskiyresize at present.
5405121b6ccSRoman Bogorodskiy.It
5410ee3a4b4SRoman BogorodskiyEmergency write is advertised, but no-op at present.
5425121b6ccSRoman Bogorodskiy.El
5436c87a2c0SGleb Smirnoff.Pp
544*054accacSCorvin KöhneVirtio input device backends:
545*054accacSCorvin Köhne.Bl -tag -width 10n
546*054accacSCorvin Köhne.It Ar /dev/input/eventX
547*054accacSCorvin KöhneSend input events of
548*054accacSCorvin Köhne.Ar /dev/input/eventX
549*054accacSCorvin Köhneto guest by VirtIO Input Interface.
550*054accacSCorvin Köhne.El
551*054accacSCorvin Köhne.Pp
5528b97e975SMateusz PiotrowskiFramebuffer devices backends:
5538b97e975SMateusz Piotrowski.Bl -bullet
5548b97e975SMateusz Piotrowski.Sm off
5558b97e975SMateusz Piotrowski.It
5568b97e975SMateusz Piotrowski.Op Cm rfb= Ar ip-and-port
5578b97e975SMateusz Piotrowski.Op Cm ,w= Ar width
5588b97e975SMateusz Piotrowski.Op Cm ,h= Ar height
5598b97e975SMateusz Piotrowski.Op Cm ,vga= Ar vgaconf
5608b97e975SMateusz Piotrowski.Op Cm ,wait
5618b97e975SMateusz Piotrowski.Op Cm ,password= Ar password
5628b97e975SMateusz Piotrowski.Sm on
5638b97e975SMateusz Piotrowski.El
5648b97e975SMateusz Piotrowski.Pp
5658b97e975SMateusz PiotrowskiConfiguration options are defined as follows:
5665c3ec676SGleb Smirnoff.Bl -tag -width 10n
5678b97e975SMateusz Piotrowski.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port
5688b97e975SMateusz PiotrowskiAn IP address and a port VNC should listen on.
5698b97e975SMateusz PiotrowskiThere are two formats:
5708b97e975SMateusz Piotrowski.Pp
5718b97e975SMateusz Piotrowski.Bl -bullet -compact
5728d9fefe6SMateusz Piotrowski.It
5738b97e975SMateusz Piotrowski.Sm off
5748b97e975SMateusz Piotrowski.Op Ar IPv4 Cm \&:
5755c3ec676SGleb Smirnoff.Ar port
5768b97e975SMateusz Piotrowski.Sm on
5778d9fefe6SMateusz Piotrowski.It
5788b97e975SMateusz Piotrowski.Sm off
5798b97e975SMateusz Piotrowski.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port
5808b97e975SMateusz Piotrowski.Sm on
5818b97e975SMateusz Piotrowski.El
5828b97e975SMateusz Piotrowski.Pp
5836c87a2c0SGleb SmirnoffThe default is to listen on localhost IPv4 address and default VNC port 5900.
5848883128bSBjoern A. ZeebAn IPv6 address must be enclosed in square brackets and may contain an
5857d9545fcSRodney W. Grimesoptional zone identifier.
5868b97e975SMateusz Piotrowski.It Cm w= Ns Ar width No and Cm h= Ns Ar height
5875c3ec676SGleb SmirnoffA display resolution, width and height, respectively.
5885c3ec676SGleb SmirnoffIf not specified, a default resolution of 1024x768 pixels will be used.
5895c3ec676SGleb SmirnoffMinimal supported resolution is 640x480 pixels,
5905c3ec676SGleb Smirnoffand maximum is 1920x1200 pixels.
5918b97e975SMateusz Piotrowski.It Cm vga= Ns Ar vgaconf
5925c3ec676SGleb SmirnoffPossible values for this option are
5938b97e975SMateusz Piotrowski.Cm io
5945c3ec676SGleb Smirnoff(default),
5958b97e975SMateusz Piotrowski.Cm on
5965c3ec676SGleb Smirnoff, and
5978b97e975SMateusz Piotrowski.Cm off .
5985c3ec676SGleb SmirnoffPCI graphics cards have a dual personality in that they are
5995c3ec676SGleb Smirnoffstandard PCI devices with BAR addressing, but may also
6005c3ec676SGleb Smirnoffimplicitly decode legacy VGA I/O space
6015c3ec676SGleb Smirnoff.Pq Ad 0x3c0-3df
6025c3ec676SGleb Smirnoffand memory space
6035c3ec676SGleb Smirnoff.Pq 64KB at Ad 0xA0000 .
6045c3ec676SGleb SmirnoffThe default
6058b97e975SMateusz Piotrowski.Cm io
6068d56c805SYuri Pankovoption should be used for guests that attempt to issue BIOS calls which result
6078d56c805SYuri Pankovin I/O port queries, and fail to boot if I/O decode is disabled.
6085c3ec676SGleb Smirnoff.Pp
6095c3ec676SGleb SmirnoffThe
6108b97e975SMateusz Piotrowski.Cm on
6115c3ec676SGleb Smirnoffoption should be used along with the CSM BIOS capability in UEFI
6125c3ec676SGleb Smirnoffto boot traditional BIOS guests that require the legacy VGA I/O and
6135c3ec676SGleb Smirnoffmemory regions to be available.
6145c3ec676SGleb Smirnoff.Pp
6155c3ec676SGleb SmirnoffThe
6168b97e975SMateusz Piotrowski.Cm off
6175c3ec676SGleb Smirnoffoption should be used for the UEFI guests that assume that
6185c3ec676SGleb SmirnoffVGA adapter is present if they detect the I/O ports.
6195c3ec676SGleb SmirnoffAn example of such a guest is
6205c3ec676SGleb Smirnoff.Ox
6215c3ec676SGleb Smirnoffin UEFI mode.
6225c3ec676SGleb Smirnoff.Pp
6235c3ec676SGleb SmirnoffPlease refer to the
6245c3ec676SGleb Smirnoff.Nm
6255c3ec676SGleb Smirnoff.Fx
6265c3ec676SGleb Smirnoffwiki page
6275c3ec676SGleb Smirnoff.Pq Lk https://wiki.freebsd.org/bhyve
6285c3ec676SGleb Smirnofffor configuration notes of particular guests.
6298b97e975SMateusz Piotrowski.It Cm wait
6305c3ec676SGleb SmirnoffInstruct
6315c3ec676SGleb Smirnoff.Nm
6328d56c805SYuri Pankovto only boot upon the initiation of a VNC connection, simplifying the
6338d56c805SYuri Pankovinstallation of operating systems that require immediate keyboard input.
6345c3ec676SGleb SmirnoffThis can be removed for post-installation use.
6358b97e975SMateusz Piotrowski.It Cm password= Ns Ar password
636f4d34383SMarcelo AraujoThis type of authentication is known to be cryptographically weak and is not
637f4d34383SMarcelo Araujointended for use on untrusted networks.
638f4d34383SMarcelo AraujoMany implementations will want to use stronger security, such as running
639f4d34383SMarcelo Araujothe session over an encrypted channel provided by IPsec or SSH.
6405c3ec676SGleb Smirnoff.El
6416c87a2c0SGleb Smirnoff.Pp
6426eff58acSMateusz PiotrowskixHCI USB device backends:
6435c3ec676SGleb Smirnoff.Bl -tag -width 10n
6446eff58acSMateusz Piotrowski.It Cm tablet
6455c3ec676SGleb SmirnoffA USB tablet device which provides precise cursor synchronization
6465c3ec676SGleb Smirnoffwhen using VNC.
6476c87a2c0SGleb Smirnoff.El
648c066c68cSMarcelo Araujo.Pp
6496eff58acSMateusz PiotrowskiNVMe device backends:
6506eff58acSMateusz Piotrowski.Bl -bullet
6516eff58acSMateusz Piotrowski.Sm off
6526eff58acSMateusz Piotrowski.It
6536eff58acSMateusz Piotrowski.Ar devpath
6546eff58acSMateusz Piotrowski.Op Cm ,maxq= Ar #
6556eff58acSMateusz Piotrowski.Op Cm ,qsz= Ar #
6566eff58acSMateusz Piotrowski.Op Cm ,ioslots= Ar #
6576eff58acSMateusz Piotrowski.Op Cm ,sectsz= Ar #
6586eff58acSMateusz Piotrowski.Op Cm ,ser= Ar #
6596eff58acSMateusz Piotrowski.Op Cm ,eui64= Ar #
6606eff58acSMateusz Piotrowski.Op Cm ,dsm= Ar opt
6616eff58acSMateusz Piotrowski.Sm on
6626eff58acSMateusz Piotrowski.El
6636eff58acSMateusz Piotrowski.Pp
6646eff58acSMateusz PiotrowskiConfiguration options are defined as follows:
665c066c68cSMarcelo Araujo.Bl -tag -width 10n
6666eff58acSMateusz Piotrowski.It Ar devpath
667c066c68cSMarcelo AraujoAccepted device paths are:
668c066c68cSMarcelo Araujo.Ar /dev/blockdev
669c066c68cSMarcelo Araujoor
670c066c68cSMarcelo Araujo.Ar /path/to/image
671c066c68cSMarcelo Araujoor
6726eff58acSMateusz Piotrowski.Cm ram= Ns Ar size_in_MiB .
6736eff58acSMateusz Piotrowski.It Cm maxq
674c066c68cSMarcelo AraujoMax number of queues.
6756eff58acSMateusz Piotrowski.It Cm qsz
676c066c68cSMarcelo AraujoMax elements in each queue.
6776eff58acSMateusz Piotrowski.It Cm ioslots
678c066c68cSMarcelo AraujoMax number of concurrent I/O requests.
6796eff58acSMateusz Piotrowski.It Cm sectsz
680c066c68cSMarcelo AraujoSector size (defaults to blockif sector size).
6816eff58acSMateusz Piotrowski.It Cm ser
682c066c68cSMarcelo AraujoSerial number with maximum 20 characters.
6836eff58acSMateusz Piotrowski.It Cm eui64
6846eff58acSMateusz PiotrowskiIEEE Extended Unique Identifier (8 byte value).
6856eff58acSMateusz Piotrowski.It Cm dsm
6866eff58acSMateusz PiotrowskiDataSet Management support.
6876eff58acSMateusz PiotrowskiSupported values are:
6886eff58acSMateusz Piotrowski.Cm auto , enable ,
6896eff58acSMateusz Piotrowskiand
6906eff58acSMateusz Piotrowski.Cm disable .
691c066c68cSMarcelo Araujo.El
69236f9f044SWarner Losh.Pp
693d5fcc4b6SMateusz PiotrowskiAHCI device backends:
694d5fcc4b6SMateusz Piotrowski.Bl -bullet
695d5fcc4b6SMateusz Piotrowski.It
696d5fcc4b6SMateusz Piotrowski.Sm off
697d5fcc4b6SMateusz Piotrowski.Op Oo Cm hd\&: | cd\&: Oc Ar path
698d5fcc4b6SMateusz Piotrowski.Op Cm ,nmrr= Ar nmrr
699d5fcc4b6SMateusz Piotrowski.Op Cm ,ser= Ar #
700d5fcc4b6SMateusz Piotrowski.Op Cm ,rev= Ar #
701d5fcc4b6SMateusz Piotrowski.Op Cm ,model= Ar #
702d5fcc4b6SMateusz Piotrowski.Sm on
703d5fcc4b6SMateusz Piotrowski.El
704d5fcc4b6SMateusz Piotrowski.Pp
705d5fcc4b6SMateusz PiotrowskiConfiguration options are defined as follows:
7069af3bcd7SPeter Grehan.Bl -tag -width 10n
707d5fcc4b6SMateusz Piotrowski.It Cm nmrr
708d5fcc4b6SMateusz PiotrowskiNominal Media Rotation Rate, known as RPM.
709d5fcc4b6SMateusz PiotrowskiValue 1 will indicate device as Solid State Disk.
710d5fcc4b6SMateusz PiotrowskiDefault value is 0, not report.
711d5fcc4b6SMateusz Piotrowski.It Cm ser
7129af3bcd7SPeter GrehanSerial Number with maximum 20 characters.
713d5fcc4b6SMateusz Piotrowski.It Cm rev
7149af3bcd7SPeter GrehanRevision Number with maximum 8 characters.
715d5fcc4b6SMateusz Piotrowski.It Cm model
7169af3bcd7SPeter GrehanModel Number with maximum 40 characters.
7179af3bcd7SPeter Grehan.El
7189af3bcd7SPeter Grehan.Pp
719061f37d2SMateusz PiotrowskiHD Audio device backends:
720061f37d2SMateusz Piotrowski.Bl -bullet
721061f37d2SMateusz Piotrowski.It
722061f37d2SMateusz Piotrowski.Sm off
723061f37d2SMateusz Piotrowski.Op Cm play= Ar playback
724061f37d2SMateusz Piotrowski.Op Cm ,rec= Ar recording
725061f37d2SMateusz Piotrowski.Sm on
726061f37d2SMateusz Piotrowski.El
727061f37d2SMateusz Piotrowski.Pp
728061f37d2SMateusz PiotrowskiConfiguration options are defined as follows:
72936f9f044SWarner Losh.Bl -tag -width 10n
730061f37d2SMateusz Piotrowski.It Cm play
73136f9f044SWarner LoshPlayback device, typically
73236f9f044SWarner Losh.Ar /dev/dsp0 .
733061f37d2SMateusz Piotrowski.It Cm rec
73436f9f044SWarner LoshRecording device, typically
73536f9f044SWarner Losh.Ar /dev/dsp0 .
73636f9f044SWarner Losh.El
7375749449dSJohn Baldwin.It Fl U Ar uuid
7385749449dSJohn BaldwinSet the universally unique identifier
7395749449dSJohn Baldwin.Pq UUID
7405749449dSJohn Baldwinin the guest's System Management BIOS System Information structure.
7415749449dSJohn BaldwinBy default a UUID is generated from the host's hostname and
7425749449dSJohn Baldwin.Ar vmname .
743ccb1c87aSMateusz Piotrowski.It Fl u
744ccb1c87aSMateusz PiotrowskiRTC keeps UTC time.
745cde1f5b8SJohn Baldwin.It Fl W
746cde1f5b8SJohn BaldwinForce virtio PCI device emulations to use MSI interrupts instead of MSI-X
747cde1f5b8SJohn Baldwininterrupts.
748ccb1c87aSMateusz Piotrowski.It Fl w
749ccb1c87aSMateusz PiotrowskiIgnore accesses to unimplemented Model Specific Registers (MSRs).
750ccb1c87aSMateusz PiotrowskiThis is intended for debug purposes.
7519777ca20SNeel Natu.It Fl x
7529777ca20SNeel NatuThe guest's local APIC is configured in x2APIC mode.
753b100acf2SNeel Natu.It Fl Y
754b100acf2SNeel NatuDisable MPtable generation.
755b13e60daSPeter Grehan.It Ar vmname
756b13e60daSPeter GrehanAlphanumeric name of the guest.
757b13e60daSPeter GrehanThis should be the same as that created by
758b13e60daSPeter Grehan.Xr bhyveload 8 .
759b13e60daSPeter Grehan.El
760621b5090SJohn Baldwin.Sh CONFIGURATION VARIABLES
761621b5090SJohn Baldwin.Nm
762621b5090SJohn Baldwinuses an internal tree of configuration variables to describe global and
763621b5090SJohn Baldwinper-device settings.
764621b5090SJohn BaldwinWhen
765621b5090SJohn Baldwin.Nm
766621b5090SJohn Baldwinstarts,
767621b5090SJohn Baldwinit parses command line options (including config files) in the order given
768621b5090SJohn Baldwinon the command line.
769621b5090SJohn BaldwinEach command line option sets one or more configuration variables.
770621b5090SJohn BaldwinFor example,
771621b5090SJohn Baldwinthe
772621b5090SJohn Baldwin.Fl s
773621b5090SJohn Baldwinoption creates a new tree node for a PCI device and sets one or more variables
774621b5090SJohn Baldwinunder that node including the device model and device model-specific variables.
775621b5090SJohn BaldwinVariables may be set multiple times during this parsing stage with the final
776621b5090SJohn Baldwinvalue overriding previous values.
777621b5090SJohn Baldwin.Pp
778621b5090SJohn BaldwinOnce all of the command line options have been processed,
779621b5090SJohn Baldwinthe configuration values are frozen.
780621b5090SJohn Baldwin.Nm
781621b5090SJohn Baldwinthen uses the value of configuration values to initialize device models
782621b5090SJohn Baldwinand global settings.
783621b5090SJohn Baldwin.Pp
784621b5090SJohn BaldwinMore details on configuration variables can be found in
785621b5090SJohn Baldwin.Xr bhyve_config 5 .
786cd377eb3SJohn Baldwin.Sh DEBUG SERVER
787cd377eb3SJohn BaldwinThe current debug server provides limited support for debuggers.
788cd377eb3SJohn Baldwin.Ss Registers
789cd377eb3SJohn BaldwinEach virtual CPU is exposed to the debugger as a thread.
790cd377eb3SJohn Baldwin.Pp
791cd377eb3SJohn BaldwinGeneral purpose registers can be queried for each virtual CPU, but other
792cd377eb3SJohn Baldwinregisters such as floating-point and system registers cannot be queried.
793cd377eb3SJohn Baldwin.Ss Memory
794976ba8c6SJohn BaldwinMemory (including memory mapped I/O regions) can be read and written by the debugger.
7958d56c805SYuri PankovMemory operations use virtual addresses that are resolved to physical addresses
7968d56c805SYuri Pankovvia the current virtual CPU's active address translation.
797cd377eb3SJohn Baldwin.Ss Control
798cd377eb3SJohn BaldwinThe running guest can be interrupted by the debugger at any time
799cd377eb3SJohn Baldwin.Pq for example, by pressing Ctrl-C in the debugger .
800cd377eb3SJohn Baldwin.Pp
801cd377eb3SJohn BaldwinSingle stepping is only supported on Intel CPUs supporting the MTRAP VM exit.
802cd377eb3SJohn Baldwin.Pp
803cbd03a9dSJohn BaldwinBreakpoints are supported on Intel CPUs that support single stepping.
804cbd03a9dSJohn BaldwinNote that continuing from a breakpoint while interrupts are enabled in the
805cbd03a9dSJohn Baldwinguest may not work as expected due to timer interrupts firing while single
806cbd03a9dSJohn Baldwinstepping over the breakpoint.
807c2202d41SRoman Bogorodskiy.Sh SIGNAL HANDLING
808c2202d41SRoman Bogorodskiy.Nm
809c2202d41SRoman Bogorodskiydeals with the following signals:
810c2202d41SRoman Bogorodskiy.Pp
8113357e948SMateusz Piotrowski.Bl -tag -width SIGTERM -compact
812c2202d41SRoman Bogorodskiy.It SIGTERM
813c2202d41SRoman BogorodskiyTrigger ACPI poweroff for a VM
814c2202d41SRoman Bogorodskiy.El
815c2202d41SRoman Bogorodskiy.Sh EXIT STATUS
816c2202d41SRoman BogorodskiyExit status indicates how the VM was terminated:
817c2202d41SRoman Bogorodskiy.Pp
818c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact
819c2202d41SRoman Bogorodskiy.It 0
820c2202d41SRoman Bogorodskiyrebooted
821c2202d41SRoman Bogorodskiy.It 1
822c2202d41SRoman Bogorodskiypowered off
823c2202d41SRoman Bogorodskiy.It 2
824c2202d41SRoman Bogorodskiyhalted
825c2202d41SRoman Bogorodskiy.It 3
826c2202d41SRoman Bogorodskiytriple fault
827989e062bSMarcelo Araujo.It 4
828989e062bSMarcelo Araujoexited due to an error
829c2202d41SRoman Bogorodskiy.El
830b13e60daSPeter Grehan.Sh EXAMPLES
8315c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must have been loaded with
83284fe889cSChristian Brueffer.Xr bhyveload 8
833b13e60daSPeter Grehanor a similar boot loader before
834b13e60daSPeter Grehan.Xr bhyve 4
835b13e60daSPeter Grehancan be run.
8365c3ec676SGleb SmirnoffOtherwise, the boot loader is not needed.
837b13e60daSPeter Grehan.Pp
838b13e60daSPeter GrehanTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio
839b13e60daSPeter Grehanblock device backed by the
840b13e60daSPeter Grehan.Pa /my/image
841b13e60daSPeter Grehanfilesystem image, and a serial port for the console:
842b13e60daSPeter Grehan.Bd -literal -offset indent
843b13e60daSPeter Grehanbhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\
844b13e60daSPeter Grehan  -l com1,stdio -A -H -P -m 1G vm1
845b13e60daSPeter Grehan.Ed
846b13e60daSPeter Grehan.Pp
847b13e60daSPeter GrehanRun a 24GB single-CPU virtual machine with three network ports, one of which
848b13e60daSPeter Grehanhas a MAC address specified:
849b13e60daSPeter Grehan.Bd -literal -offset indent
850b13e60daSPeter Grehanbhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\
851b13e60daSPeter Grehan  -s 2:1,virtio-net,tap1 \\
852b13e60daSPeter Grehan  -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\
853b13e60daSPeter Grehan  -s 3,virtio-blk,/my/image -l com1,stdio \\
854b13e60daSPeter Grehan  -A -H -P -m 24G bigvm
855b13e60daSPeter Grehan.Ed
856b13e60daSPeter Grehan.Pp
857b13e60daSPeter GrehanRun an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI
858b13e60daSPeter GrehanCD-ROM, a single virtio network port, an AMD hostbridge, and the console
859b13e60daSPeter Grehanport connected to an
860b13e60daSPeter Grehan.Xr nmdm 4
86184fe889cSChristian Brueffernull-modem device.
862b13e60daSPeter Grehan.Bd -literal -offset indent
863a7ab1463SAlexander Motinbhyve -c 4 \\
864b13e60daSPeter Grehan  -s 0,amd_hostbridge -s 1,lpc \\
865098f5155SAlexander Motin  -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\
866098f5155SAlexander Motinhd:/images/disk.3,hd:/images/disk.4,\\
867098f5155SAlexander Motinhd:/images/disk.5,hd:/images/disk.6,\\
868098f5155SAlexander Motinhd:/images/disk.7,hd:/images/disk.8,\\
869098f5155SAlexander Motincd:/images/install.iso \\
870b13e60daSPeter Grehan  -s 3,virtio-net,tap0 \\
871b13e60daSPeter Grehan  -l com1,/dev/nmdm0A \\
872b13e60daSPeter Grehan  -A -H -P -m 8G
873b13e60daSPeter Grehan.Ed
8745c3ec676SGleb Smirnoff.Pp
8755c3ec676SGleb SmirnoffRun a UEFI virtual machine with a display resolution of 800 by 600 pixels
8765c3ec676SGleb Smirnoffthat can be accessed via VNC at: 0.0.0.0:5900.
8775c3ec676SGleb Smirnoff.Bd -literal -offset indent
8785c3ec676SGleb Smirnoffbhyve -c 2 -m 4G -w -H \\
8795c3ec676SGleb Smirnoff  -s 0,hostbridge \\
8805c3ec676SGleb Smirnoff  -s 3,ahci-cd,/path/to/uefi-OS-install.iso \\
8815c3ec676SGleb Smirnoff  -s 4,ahci-hd,disk.img \\
8825c3ec676SGleb Smirnoff  -s 5,virtio-net,tap0 \\
8835c3ec676SGleb Smirnoff  -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\
8845c3ec676SGleb Smirnoff  -s 30,xhci,tablet \\
8855c3ec676SGleb Smirnoff  -s 31,lpc -l com1,stdio \\
8865c3ec676SGleb Smirnoff  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
8875c3ec676SGleb Smirnoff   uefivm
8885c3ec676SGleb Smirnoff.Ed
8898883128bSBjoern A. Zeeb.Pp
8908883128bSBjoern A. ZeebRun a UEFI virtual machine with a VNC display that is bound to all IPv6
8918883128bSBjoern A. Zeebaddresses on port 5900.
8928883128bSBjoern A. Zeeb.Bd -literal -offset indent
8938883128bSBjoern A. Zeebbhyve -c 2 -m 4G -w -H \\
8948883128bSBjoern A. Zeeb  -s 0,hostbridge \\
8958883128bSBjoern A. Zeeb  -s 4,ahci-hd,disk.img \\
8968883128bSBjoern A. Zeeb  -s 5,virtio-net,tap0 \\
8978883128bSBjoern A. Zeeb  -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\
8988883128bSBjoern A. Zeeb  -s 30,xhci,tablet \\
8998883128bSBjoern A. Zeeb  -s 31,lpc -l com1,stdio \\
9008883128bSBjoern A. Zeeb  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
9018883128bSBjoern A. Zeeb   uefivm
9028883128bSBjoern A. Zeeb.Ed
903b13e60daSPeter Grehan.Sh SEE ALSO
904b13e60daSPeter Grehan.Xr bhyve 4 ,
905e90337e4SAleksandr Fedorov.Xr netgraph 4 ,
906e90337e4SAleksandr Fedorov.Xr ng_socket 4 ,
907b13e60daSPeter Grehan.Xr nmdm 4 ,
908b13e60daSPeter Grehan.Xr vmm 4 ,
909621b5090SJohn Baldwin.Xr bhyve_config 5 ,
910b13e60daSPeter Grehan.Xr ethers 5 ,
91105f7cd8bSJoel Dahl.Xr bhyvectl 8 ,
91205f7cd8bSJoel Dahl.Xr bhyveload 8
9138d56c805SYuri Pankov.Pp
9148d56c805SYuri Pankov.Rs
9158d56c805SYuri Pankov.%A Intel
9168d56c805SYuri Pankov.%B 64 and IA-32 Architectures Software Developer’s Manual
9178d56c805SYuri Pankov.%V Volume 3
9188d56c805SYuri Pankov.Re
919b13e60daSPeter Grehan.Sh HISTORY
920b13e60daSPeter Grehan.Nm
921b13e60daSPeter Grehanfirst appeared in
922b13e60daSPeter Grehan.Fx 10.0 .
923b13e60daSPeter Grehan.Sh AUTHORS
92401c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@freebsd.org
92501c2b8acSBaptiste Daroussin.An Peter Grehan Aq Mt grehan@freebsd.org
926