xref: /freebsd/usr.sbin/bhyve/bhyve.8 (revision 5c3ec676038a207268ae0959d66c220b064ac633)
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.\"
27*5c3ec676SGleb Smirnoff.Dd May 3, 2017
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
359b1aa8d6SNeel Natu.Op Fl abehuwxACHPSWY
36b13e60daSPeter Grehan.Op Fl c Ar numcpus
37b13e60daSPeter Grehan.Op Fl g Ar gdbport
38cde1f5b8SJohn Baldwin.Op Fl l Ar lpcdev Ns Op , Ns Ar conf
396ee52c65SRoman Bogorodskiy.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
409b6155a2SNeel Natu.Op Fl p Ar vcpu:hostcpu
41b13e60daSPeter Grehan.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf
425749449dSJohn Baldwin.Op Fl U Ar uuid
43b13e60daSPeter Grehan.Ar vmname
44b13e60daSPeter Grehan.Sh DESCRIPTION
45b13e60daSPeter Grehan.Nm
467fca1ad5SGlen Barberis a hypervisor that runs guest operating systems inside a
47b13e60daSPeter Grehanvirtual machine.
48b13e60daSPeter Grehan.Pp
49b13e60daSPeter GrehanParameters such as the number of virtual CPUs, amount of guest memory, and
50b13e60daSPeter GrehanI/O connectivity can be specified with command-line parameters.
51b13e60daSPeter Grehan.Pp
52*5c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must be loaded with
5384fe889cSChristian Brueffer.Xr bhyveload 8
54b13e60daSPeter Grehanor a similar boot loader before running
55*5c3ec676SGleb Smirnoff.Nm ,
56*5c3ec676SGleb Smirnoffotherwise, it is enough to run
57*5c3ec676SGleb Smirnoff.Nm
58*5c3ec676SGleb Smirnoffwith a boot ROM of choice.
59b13e60daSPeter Grehan.Pp
60b13e60daSPeter Grehan.Nm
61b13e60daSPeter Grehanruns until the guest operating system reboots or an unhandled hypervisor
62b13e60daSPeter Grehanexit is detected.
63b13e60daSPeter Grehan.Sh OPTIONS
64b13e60daSPeter Grehan.Bl -tag -width 10n
65b13e60daSPeter Grehan.It Fl a
669777ca20SNeel NatuThe guest's local APIC is configured in xAPIC mode.
6784fe889cSChristian BruefferThe xAPIC mode is the default setting so this option is redundant.
6884fe889cSChristian BruefferIt will be deprecated in a future version.
69b13e60daSPeter Grehan.It Fl A
70b13e60daSPeter GrehanGenerate ACPI tables.
71b13e60daSPeter GrehanRequired for
72b13e60daSPeter Grehan.Fx Ns /amd64
73b13e60daSPeter Grehanguests.
745749449dSJohn Baldwin.It Fl b
755749449dSJohn BaldwinEnable a low-level console device supported by
76aca4343cSEdward Tomasz Napierala.Fx
77aca4343cSEdward Tomasz Napieralakernels compiled with
785749449dSJohn Baldwin.Cd "device bvmconsole" .
795749449dSJohn BaldwinThis option will be deprecated in a future version.
80b13e60daSPeter Grehan.It Fl c Ar numcpus
81b13e60daSPeter GrehanNumber of guest virtual CPUs.
82b13e60daSPeter GrehanThe default is 1 and the maximum is 16.
830dd10c00SNeel Natu.It Fl C
840dd10c00SNeel NatuInclude guest memory in core file.
85cde1f5b8SJohn Baldwin.It Fl e
86cde1f5b8SJohn BaldwinForce
87cde1f5b8SJohn Baldwin.Nm
88cde1f5b8SJohn Baldwinto exit when a guest issues an access to an I/O port that is not emulated.
89cde1f5b8SJohn BaldwinThis is intended for debug purposes.
90b13e60daSPeter Grehan.It Fl g Ar gdbport
91b13e60daSPeter GrehanFor
925749449dSJohn Baldwin.Fx
935749449dSJohn Baldwinkernels compiled with
945749449dSJohn Baldwin.Cd "device bvmdebug" ,
95b13e60daSPeter Grehanallow a remote kernel kgdb to be relayed to the guest kernel gdb stub
96b13e60daSPeter Grehanvia a local IPv4 address and this port.
97b13e60daSPeter GrehanThis option will be deprecated in a future version.
98cde1f5b8SJohn Baldwin.It Fl h
99cde1f5b8SJohn BaldwinPrint help message and exit.
100cde1f5b8SJohn Baldwin.It Fl H
101cde1f5b8SJohn BaldwinYield the virtual CPU thread when a HLT instruction is detected.
102cde1f5b8SJohn BaldwinIf this option is not specified, virtual CPUs will use 100% of a host CPU.
103cde1f5b8SJohn Baldwin.It Fl l Ar lpcdev Ns Op , Ns Ar conf
104cde1f5b8SJohn BaldwinAllow devices behind the LPC PCI-ISA bridge to be configured.
1059b1aa8d6SNeel NatuThe only supported devices are the TTY-class devices
1069b1aa8d6SNeel Natu.Ar com1
107cde1f5b8SJohn Baldwinand
1089b1aa8d6SNeel Natu.Ar com2
1099b1aa8d6SNeel Natuand the boot ROM device
1109b1aa8d6SNeel Natu.Ar bootrom .
1116ee52c65SRoman Bogorodskiy.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
112cde1f5b8SJohn BaldwinGuest physical memory size in bytes.
113cde1f5b8SJohn BaldwinThis must be the same size that was given to
114cde1f5b8SJohn Baldwin.Xr bhyveload 8 .
115cde1f5b8SJohn Baldwin.Pp
116cde1f5b8SJohn BaldwinThe size argument may be suffixed with one of K, M, G or T (either upper
117cde1f5b8SJohn Baldwinor lower case) to indicate a multiple of kilobytes, megabytes, gigabytes,
118cde1f5b8SJohn Baldwinor terabytes.
119cde1f5b8SJohn BaldwinIf no suffix is given, the value is assumed to be in megabytes.
1206ee52c65SRoman Bogorodskiy.Pp
1216ee52c65SRoman Bogorodskiy.Ar memsize
1226ee52c65SRoman Bogorodskiydefaults to 256M.
1239b6155a2SNeel Natu.It Fl p Ar vcpu:hostcpu
1249b6155a2SNeel NatuPin guest's virtual CPU
1259b6155a2SNeel Natu.Em vcpu
1269b6155a2SNeel Natuto
1279b6155a2SNeel Natu.Em hostcpu .
128b13e60daSPeter Grehan.It Fl P
129b13e60daSPeter GrehanForce the guest virtual CPU to exit when a PAUSE instruction is detected.
130b13e60daSPeter Grehan.It Fl s Ar slot,emulation Ns Op , Ns Ar conf
131b13e60daSPeter GrehanConfigure a virtual PCI slot and function.
132b13e60daSPeter Grehan.Pp
13384fe889cSChristian Brueffer.Nm
134b13e60daSPeter Grehanprovides PCI bus emulation and virtual devices that can be attached to
135b13e60daSPeter Grehanslots on the bus.
136b13e60daSPeter GrehanThere are 32 available slots, with the option of providing up to 8 functions
137b13e60daSPeter Grehanper slot.
138b13e60daSPeter Grehan.Bl -tag -width 10n
139b13e60daSPeter Grehan.It Ar slot
14006db1b4aSNeel Natu.Ar pcislot[:function]
14106db1b4aSNeel Natu.Ar bus:pcislot:function
142b13e60daSPeter Grehan.Pp
143b13e60daSPeter GrehanThe
144b13e60daSPeter Grehan.Ar pcislot
14584fe889cSChristian Brueffervalue is 0 to 31.
14684fe889cSChristian BruefferThe optional
14784fe889cSChristian Brueffer.Ar function
14884fe889cSChristian Brueffervalue is 0 to 7.
14984fe889cSChristian BruefferThe optional
15006db1b4aSNeel Natu.Ar bus
15106db1b4aSNeel Natuvalue is 0 to 255.
15284fe889cSChristian BruefferIf not specified, the
15384fe889cSChristian Brueffer.Ar function
15484fe889cSChristian Brueffervalue defaults to 0.
15584fe889cSChristian BruefferIf not specified, the
15684fe889cSChristian Brueffer.Ar bus
15784fe889cSChristian Brueffervalue defaults to 0.
158b13e60daSPeter Grehan.It Ar emulation
159b13e60daSPeter Grehan.Bl -tag -width 10n
160b13e60daSPeter Grehan.It Li hostbridge | Li amd_hostbridge
161b13e60daSPeter Grehan.Pp
162b13e60daSPeter GrehanProvide a simple host bridge.
163b13e60daSPeter GrehanThis is usually configured at slot 0, and is required by most guest
164b13e60daSPeter Grehanoperating systems.
165b13e60daSPeter GrehanThe
166b13e60daSPeter Grehan.Li amd_hostbridge
167b13e60daSPeter Grehanemulation is identical but uses a PCI vendor ID of
168b13e60daSPeter Grehan.Li AMD .
169b13e60daSPeter Grehan.It Li passthru
170b13e60daSPeter GrehanPCI pass-through device.
171b13e60daSPeter Grehan.It Li virtio-net
172b13e60daSPeter GrehanVirtio network interface.
173a8be8e5eSRemko Lodder.It Li virtio-blk
174b13e60daSPeter GrehanVirtio block storage interface.
1759d0c4e17SPeter Grehan.It Li virtio-rnd
1769d0c4e17SPeter GrehanVirtio RNG interface.
1775121b6ccSRoman Bogorodskiy.It Li virtio-console
1785121b6ccSRoman BogorodskiyVirtio console interface, which exposes multiple ports
1795121b6ccSRoman Bogorodskiyto the guest in the form of simple char devices for simple IO
1805121b6ccSRoman Bogorodskiybetween the guest and host userspaces.
181098f5155SAlexander Motin.It Li ahci
182d6099860SMaxim KonovalovAHCI controller attached to arbitrary devices.
183b13e60daSPeter Grehan.It Li ahci-cd
184b13e60daSPeter GrehanAHCI controller attached to an ATAPI CD/DVD.
185b13e60daSPeter Grehan.It Li ahci-hd
186b13e60daSPeter GrehanAHCI controller attached to a SATA hard-drive.
1879e749f25SAlexander Motin.It Li e1000
1889e749f25SAlexander MotinIntel e82545 network interface.
189b13e60daSPeter Grehan.It Li uart
190b13e60daSPeter GrehanPCI 16550 serial device.
191b13e60daSPeter Grehan.It Li lpc
1929b1aa8d6SNeel NatuLPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM.
1939b1aa8d6SNeel NatuThe LPC bridge emulation can only be configured on bus 0.
1946c87a2c0SGleb Smirnoff.It Li fbuf
1956c87a2c0SGleb SmirnoffRaw framebuffer device attached to VNC server.
1966c87a2c0SGleb Smirnoff.It Li xhci
197*5c3ec676SGleb SmirnoffeXtensible Host Controller Interface (xHCI) USB controller.
198b13e60daSPeter Grehan.El
199b13e60daSPeter Grehan.It Op Ar conf
200b13e60daSPeter GrehanThis optional parameter describes the backend for device emulations.
201b13e60daSPeter GrehanIf
202b13e60daSPeter Grehan.Ar conf
203b13e60daSPeter Grehanis not specified, the device emulation has no backend and can be
204b13e60daSPeter Grehanconsidered unconnected.
205b13e60daSPeter Grehan.Pp
206b13e60daSPeter GrehanNetwork devices:
207b13e60daSPeter Grehan.Bl -tag -width 10n
208b13e60daSPeter Grehan.It Ar tapN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx
209b13e60daSPeter Grehan.It Ar vmnetN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx
210b13e60daSPeter Grehan.Pp
211b13e60daSPeter GrehanIf
212b13e60daSPeter Grehan.Ar mac
213b13e60daSPeter Grehanis not specified, the MAC address is derived from a fixed OUI and the
214b13e60daSPeter Grehanremaining bytes from an MD5 hash of the slot and function numbers and
215b13e60daSPeter Grehanthe device name.
216b13e60daSPeter Grehan.Pp
217b13e60daSPeter GrehanThe MAC address is an ASCII string in
218b13e60daSPeter Grehan.Xr ethers 5
219b13e60daSPeter Grehanformat.
220b13e60daSPeter Grehan.El
221b13e60daSPeter Grehan.Pp
222b13e60daSPeter GrehanBlock storage devices:
223b13e60daSPeter Grehan.Bl -tag -width 10n
2244e43c1e8SNeel Natu.It Pa /filename Ns Oo , Ns Ar block-device-options Oc
2254e43c1e8SNeel Natu.It Pa /dev/xxx Ns Oo , Ns Ar block-device-options Oc
2264e43c1e8SNeel Natu.El
2274e43c1e8SNeel Natu.Pp
2284e43c1e8SNeel NatuThe
2294e43c1e8SNeel Natu.Ar block-device-options
2304e43c1e8SNeel Natuare:
231b13e60daSPeter Grehan.Bl -tag -width 8n
232b13e60daSPeter Grehan.It Li nocache
233b13e60daSPeter GrehanOpen the file with
234b13e60daSPeter Grehan.Dv O_DIRECT .
235b13e60daSPeter Grehan.It Li direct
236b13e60daSPeter GrehanOpen the file using
237b13e60daSPeter Grehan.Dv O_SYNC .
238b13e60daSPeter Grehan.It Li ro
239b13e60daSPeter GrehanForce the file to be opened read-only.
2404e43c1e8SNeel Natu.It Li sectorsize= Ns Ar logical Ns Oo / Ns Ar physical Oc
2414e43c1e8SNeel NatuSpecify the logical and physical sector sizes of the emulated disk.
2424e43c1e8SNeel NatuThe physical sector size is optional and is equal to the logical sector size
2434e43c1e8SNeel Natuif not explicitly specified.
244b13e60daSPeter Grehan.El
245b13e60daSPeter Grehan.Pp
246b13e60daSPeter GrehanTTY devices:
247b13e60daSPeter Grehan.Bl -tag -width 10n
248b13e60daSPeter Grehan.It Li stdio
249b13e60daSPeter GrehanConnect the serial port to the standard input and output of
25084fe889cSChristian Bruefferthe
25184fe889cSChristian Brueffer.Nm
25284fe889cSChristian Bruefferprocess.
253b13e60daSPeter Grehan.It Pa /dev/xxx
254b13e60daSPeter GrehanUse the host TTY device for serial port I/O.
255b13e60daSPeter Grehan.El
256b13e60daSPeter Grehan.Pp
2579b1aa8d6SNeel NatuBoot ROM device:
2589b1aa8d6SNeel Natu.Bl -tag -width 10n
2599b1aa8d6SNeel Natu.It Pa romfile
2609b1aa8d6SNeel NatuMap
2619b1aa8d6SNeel Natu.Ar romfile
2629b1aa8d6SNeel Natuin the guest address space reserved for boot firmware.
2639b1aa8d6SNeel Natu.El
2649b1aa8d6SNeel Natu.Pp
265b13e60daSPeter GrehanPass-through devices:
266b13e60daSPeter Grehan.Bl -tag -width 10n
267b13e60daSPeter Grehan.It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function
268b13e60daSPeter GrehanConnect to a PCI device on the host at the selector described by
269b13e60daSPeter Grehan.Ar slot ,
270b13e60daSPeter Grehan.Ar bus ,
271b13e60daSPeter Grehanand
272b13e60daSPeter Grehan.Ar function
273b13e60daSPeter Grehannumbers.
274b13e60daSPeter Grehan.El
275b13e60daSPeter Grehan.Pp
2769b1aa8d6SNeel NatuGuest memory must be wired using the
2779b1aa8d6SNeel Natu.Fl S
2789b1aa8d6SNeel Natuoption when a pass-through device is configured.
2799b1aa8d6SNeel Natu.Pp
280b13e60daSPeter GrehanThe host device must have been reserved at boot-time using the
281b13e60daSPeter Grehan.Va pptdev
282b13e60daSPeter Grehanloader variable as described in
283b13e60daSPeter Grehan.Xr vmm 4 .
2845121b6ccSRoman Bogorodskiy.Pp
2855121b6ccSRoman BogorodskiyVirtio console devices:
2865121b6ccSRoman Bogorodskiy.Bl -tag -width 10n
2875121b6ccSRoman Bogorodskiy.It Li port1= Ns Pa /path/to/port1.sock Ns ,anotherport= Ns Pa ...
2885121b6ccSRoman BogorodskiyA maximum of 16 ports per device can be created.
2895121b6ccSRoman BogorodskiyEvery port is named and corresponds to a Unix domain socket created by
2905121b6ccSRoman Bogorodskiy.Nm .
2915121b6ccSRoman Bogorodskiy.Nm
2925121b6ccSRoman Bogorodskiyaccepts at most one connection per port at a time.
2935121b6ccSRoman Bogorodskiy.Pp
2945121b6ccSRoman BogorodskiyLimitations:
2955121b6ccSRoman Bogorodskiy.Bl -bullet -offset 2n
2965121b6ccSRoman Bogorodskiy.It
2975121b6ccSRoman BogorodskiyDue to lack of destructors in
2985121b6ccSRoman Bogorodskiy.Nm ,
2995121b6ccSRoman Bogorodskiysockets on the filesystem must be cleaned up manually after
3005121b6ccSRoman Bogorodskiy.Nm
3015121b6ccSRoman Bogorodskiyexits.
3025121b6ccSRoman Bogorodskiy.It
3035121b6ccSRoman BogorodskiyThere is no way to use the "console port" feature, nor the console port
3040ee3a4b4SRoman Bogorodskiyresize at present.
3055121b6ccSRoman Bogorodskiy.It
3060ee3a4b4SRoman BogorodskiyEmergency write is advertised, but no-op at present.
3075121b6ccSRoman Bogorodskiy.El
3085121b6ccSRoman Bogorodskiy.El
3096c87a2c0SGleb Smirnoff.Pp
310*5c3ec676SGleb SmirnoffFramebuffer devices:
311*5c3ec676SGleb Smirnoff.Bl -tag -width 10n
312*5c3ec676SGleb Smirnoff.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc
313*5c3ec676SGleb Smirnoff.Bl -tag -width 8n
314*5c3ec676SGleb Smirnoff.It Ar IP:port
315*5c3ec676SGleb SmirnoffAn
316*5c3ec676SGleb Smirnoff.Ar IP
317*5c3ec676SGleb Smirnoffaddress and a
318*5c3ec676SGleb Smirnoff.Ar port
319*5c3ec676SGleb SmirnoffVNC should listen on.
3206c87a2c0SGleb SmirnoffThe default is to listen on localhost IPv4 address and default VNC port 5900.
321*5c3ec676SGleb SmirnoffListening on an IPv6 address is not supported.
322*5c3ec676SGleb Smirnoff.It Ar width No and Ar height
323*5c3ec676SGleb SmirnoffA display resolution, width and height, respectively.
324*5c3ec676SGleb SmirnoffIf not specified, a default resolution of 1024x768 pixels will be used.
325*5c3ec676SGleb SmirnoffMinimal supported resolution is 640x480 pixels,
326*5c3ec676SGleb Smirnoffand maximum is 1920x1200 pixels.
327*5c3ec676SGleb Smirnoff.It Ar vgaconf
328*5c3ec676SGleb SmirnoffPossible values for this option are
329*5c3ec676SGleb Smirnoff.Dq io
330*5c3ec676SGleb Smirnoff(default),
331*5c3ec676SGleb Smirnoff.Dq on
332*5c3ec676SGleb Smirnoff, and
333*5c3ec676SGleb Smirnoff.Dq off .
334*5c3ec676SGleb SmirnoffPCI graphics cards have a dual personality in that they are
335*5c3ec676SGleb Smirnoffstandard PCI devices with BAR addressing, but may also
336*5c3ec676SGleb Smirnoffimplicitly decode legacy VGA I/O space
337*5c3ec676SGleb Smirnoff.Pq Ad 0x3c0-3df
338*5c3ec676SGleb Smirnoffand memory space
339*5c3ec676SGleb Smirnoff.Pq 64KB at Ad 0xA0000 .
340*5c3ec676SGleb SmirnoffThe default
341*5c3ec676SGleb Smirnoff.Dq io
342*5c3ec676SGleb Smirnoffoption should be used for guests that attempt to issue BIOS
343*5c3ec676SGleb Smirnoffcalls which result in I/O port queries, and fail to boot if I/O decode is disabled.
344*5c3ec676SGleb Smirnoff.Pp
345*5c3ec676SGleb SmirnoffThe
346*5c3ec676SGleb Smirnoff.Dq on
347*5c3ec676SGleb Smirnoffoption should be used along with the CSM BIOS capability in UEFI
348*5c3ec676SGleb Smirnoffto boot traditional BIOS guests that require the legacy VGA I/O and
349*5c3ec676SGleb Smirnoffmemory regions to be available.
350*5c3ec676SGleb Smirnoff.Pp
351*5c3ec676SGleb SmirnoffThe
352*5c3ec676SGleb Smirnoff.Dq off
353*5c3ec676SGleb Smirnoffoption should be used for the UEFI guests that assume that
354*5c3ec676SGleb SmirnoffVGA adapter is present if they detect the I/O ports.
355*5c3ec676SGleb SmirnoffAn example of such a guest is
356*5c3ec676SGleb Smirnoff.Ox
357*5c3ec676SGleb Smirnoffin UEFI mode.
358*5c3ec676SGleb Smirnoff.Pp
359*5c3ec676SGleb SmirnoffPlease refer to the
360*5c3ec676SGleb Smirnoff.Nm
361*5c3ec676SGleb Smirnoff.Fx
362*5c3ec676SGleb Smirnoffwiki page
363*5c3ec676SGleb Smirnoff.Pq Lk https://wiki.freebsd.org/bhyve
364*5c3ec676SGleb Smirnofffor configuration notes of particular guests.
365*5c3ec676SGleb Smirnoff.It wait
366*5c3ec676SGleb SmirnoffInstruct
367*5c3ec676SGleb Smirnoff.Nm
368*5c3ec676SGleb Smirnoffto only boot upon the initiation of a VNC connection, simplifying the installation
369*5c3ec676SGleb Smirnoffof operating systems that require immediate keyboard input.
370*5c3ec676SGleb SmirnoffThis can be removed for post-installation use.
371*5c3ec676SGleb Smirnoff.El
3726c87a2c0SGleb Smirnoff.El
3736c87a2c0SGleb Smirnoff.Pp
374*5c3ec676SGleb SmirnoffxHCI USB devices:
375*5c3ec676SGleb Smirnoff.Bl -tag -width 10n
376*5c3ec676SGleb Smirnoff.It Li tablet
377*5c3ec676SGleb SmirnoffA USB tablet device which provides precise cursor synchronization
378*5c3ec676SGleb Smirnoffwhen using VNC.
3796c87a2c0SGleb Smirnoff.El
380b13e60daSPeter Grehan.El
3819b1aa8d6SNeel Natu.It Fl S
3829b1aa8d6SNeel NatuWire guest memory.
383c9747678SNeel Natu.It Fl u
384c9747678SNeel NatuRTC keeps UTC time.
3855749449dSJohn Baldwin.It Fl U Ar uuid
3865749449dSJohn BaldwinSet the universally unique identifier
3875749449dSJohn Baldwin.Pq UUID
3885749449dSJohn Baldwinin the guest's System Management BIOS System Information structure.
3895749449dSJohn BaldwinBy default a UUID is generated from the host's hostname and
3905749449dSJohn Baldwin.Ar vmname .
391851d84f1SNeel Natu.It Fl w
39284fe889cSChristian BruefferIgnore accesses to unimplemented Model Specific Registers (MSRs).
39384fe889cSChristian BruefferThis is intended for debug purposes.
394cde1f5b8SJohn Baldwin.It Fl W
395cde1f5b8SJohn BaldwinForce virtio PCI device emulations to use MSI interrupts instead of MSI-X
396cde1f5b8SJohn Baldwininterrupts.
3979777ca20SNeel Natu.It Fl x
3989777ca20SNeel NatuThe guest's local APIC is configured in x2APIC mode.
399b100acf2SNeel Natu.It Fl Y
400b100acf2SNeel NatuDisable MPtable generation.
401b13e60daSPeter Grehan.It Ar vmname
402b13e60daSPeter GrehanAlphanumeric name of the guest.
403b13e60daSPeter GrehanThis should be the same as that created by
404b13e60daSPeter Grehan.Xr bhyveload 8 .
405b13e60daSPeter Grehan.El
406c2202d41SRoman Bogorodskiy.Sh SIGNAL HANDLING
407c2202d41SRoman Bogorodskiy.Nm
408c2202d41SRoman Bogorodskiydeals with the following signals:
409c2202d41SRoman Bogorodskiy.Pp
410c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact
411c2202d41SRoman Bogorodskiy.It SIGTERM
412c2202d41SRoman BogorodskiyTrigger ACPI poweroff for a VM
413c2202d41SRoman Bogorodskiy.El
414c2202d41SRoman Bogorodskiy.Sh EXIT STATUS
415c2202d41SRoman BogorodskiyExit status indicates how the VM was terminated:
416c2202d41SRoman Bogorodskiy.Pp
417c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact
418c2202d41SRoman Bogorodskiy.It 0
419c2202d41SRoman Bogorodskiyrebooted
420c2202d41SRoman Bogorodskiy.It 1
421c2202d41SRoman Bogorodskiypowered off
422c2202d41SRoman Bogorodskiy.It 2
423c2202d41SRoman Bogorodskiyhalted
424c2202d41SRoman Bogorodskiy.It 3
425c2202d41SRoman Bogorodskiytriple fault
426c2202d41SRoman Bogorodskiy.El
427b13e60daSPeter Grehan.Sh EXAMPLES
428*5c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must have been loaded with
42984fe889cSChristian Brueffer.Xr bhyveload 8
430b13e60daSPeter Grehanor a similar boot loader before
431b13e60daSPeter Grehan.Xr bhyve 4
432b13e60daSPeter Grehancan be run.
433*5c3ec676SGleb SmirnoffOtherwise, the boot loader is not needed.
434b13e60daSPeter Grehan.Pp
435b13e60daSPeter GrehanTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio
436b13e60daSPeter Grehanblock device backed by the
437b13e60daSPeter Grehan.Pa /my/image
438b13e60daSPeter Grehanfilesystem image, and a serial port for the console:
439b13e60daSPeter Grehan.Bd -literal -offset indent
440b13e60daSPeter Grehanbhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\
441b13e60daSPeter Grehan  -l com1,stdio -A -H -P -m 1G vm1
442b13e60daSPeter Grehan.Ed
443b13e60daSPeter Grehan.Pp
444b13e60daSPeter GrehanRun a 24GB single-CPU virtual machine with three network ports, one of which
445b13e60daSPeter Grehanhas a MAC address specified:
446b13e60daSPeter Grehan.Bd -literal -offset indent
447b13e60daSPeter Grehanbhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\
448b13e60daSPeter Grehan  -s 2:1,virtio-net,tap1 \\
449b13e60daSPeter Grehan  -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\
450b13e60daSPeter Grehan  -s 3,virtio-blk,/my/image -l com1,stdio \\
451b13e60daSPeter Grehan  -A -H -P -m 24G bigvm
452b13e60daSPeter Grehan.Ed
453b13e60daSPeter Grehan.Pp
454b13e60daSPeter GrehanRun an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI
455b13e60daSPeter GrehanCD-ROM, a single virtio network port, an AMD hostbridge, and the console
456b13e60daSPeter Grehanport connected to an
457b13e60daSPeter Grehan.Xr nmdm 4
45884fe889cSChristian Brueffernull-modem device.
459b13e60daSPeter Grehan.Bd -literal -offset indent
460a7ab1463SAlexander Motinbhyve -c 4 \\
461b13e60daSPeter Grehan  -s 0,amd_hostbridge -s 1,lpc \\
462098f5155SAlexander Motin  -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\
463098f5155SAlexander Motinhd:/images/disk.3,hd:/images/disk.4,\\
464098f5155SAlexander Motinhd:/images/disk.5,hd:/images/disk.6,\\
465098f5155SAlexander Motinhd:/images/disk.7,hd:/images/disk.8,\\
466098f5155SAlexander Motincd:/images/install.iso \\
467b13e60daSPeter Grehan  -s 3,virtio-net,tap0 \\
468b13e60daSPeter Grehan  -l com1,/dev/nmdm0A \\
469b13e60daSPeter Grehan  -A -H -P -m 8G
470b13e60daSPeter Grehan.Ed
471*5c3ec676SGleb Smirnoff.Pp
472*5c3ec676SGleb SmirnoffRun a UEFI virtual machine with a display resolution of 800 by 600 pixels
473*5c3ec676SGleb Smirnoffthat can be accessed via VNC at: 0.0.0.0:5900.
474*5c3ec676SGleb Smirnoff.Bd -literal -offset indent
475*5c3ec676SGleb Smirnoffbhyve -c 2 -m 4G -w -H \\
476*5c3ec676SGleb Smirnoff  -s 0,hostbridge \\
477*5c3ec676SGleb Smirnoff  -s 3,ahci-cd,/path/to/uefi-OS-install.iso \\
478*5c3ec676SGleb Smirnoff  -s 4,ahci-hd,disk.img \\
479*5c3ec676SGleb Smirnoff  -s 5,virtio-net,tap0 \\
480*5c3ec676SGleb Smirnoff  -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\
481*5c3ec676SGleb Smirnoff  -s 30,xhci,tablet \\
482*5c3ec676SGleb Smirnoff  -s 31,lpc -l com1,stdio \\
483*5c3ec676SGleb Smirnoff  -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
484*5c3ec676SGleb Smirnoff   uefivm
485*5c3ec676SGleb Smirnoff.Ed
486b13e60daSPeter Grehan.Sh SEE ALSO
487b13e60daSPeter Grehan.Xr bhyve 4 ,
488b13e60daSPeter Grehan.Xr nmdm 4 ,
489b13e60daSPeter Grehan.Xr vmm 4 ,
490b13e60daSPeter Grehan.Xr ethers 5 ,
49105f7cd8bSJoel Dahl.Xr bhyvectl 8 ,
49205f7cd8bSJoel Dahl.Xr bhyveload 8
493b13e60daSPeter Grehan.Sh HISTORY
494b13e60daSPeter Grehan.Nm
495b13e60daSPeter Grehanfirst appeared in
496b13e60daSPeter Grehan.Fx 10.0 .
497b13e60daSPeter Grehan.Sh AUTHORS
49801c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@freebsd.org
49901c2b8acSBaptiste Daroussin.An Peter Grehan Aq Mt grehan@freebsd.org
500