1bbf21555SRichard Lowe.\" Copyright (c) 2013 Peter Grehan 2bbf21555SRichard Lowe.\" All rights reserved. 3bbf21555SRichard Lowe.\" 4bbf21555SRichard Lowe.\" Redistribution and use in source and binary forms, with or without 5bbf21555SRichard Lowe.\" modification, are permitted provided that the following conditions 6bbf21555SRichard Lowe.\" are met: 7bbf21555SRichard Lowe.\" 1. Redistributions of source code must retain the above copyright 8bbf21555SRichard Lowe.\" notice, this list of conditions and the following disclaimer. 9bbf21555SRichard Lowe.\" 2. Redistributions in binary form must reproduce the above copyright 10bbf21555SRichard Lowe.\" notice, this list of conditions and the following disclaimer in the 11bbf21555SRichard Lowe.\" documentation and/or other materials provided with the distribution. 12bbf21555SRichard Lowe.\" 13bbf21555SRichard Lowe.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14bbf21555SRichard Lowe.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15bbf21555SRichard Lowe.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16bbf21555SRichard Lowe.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17bbf21555SRichard Lowe.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18bbf21555SRichard Lowe.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19bbf21555SRichard Lowe.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20bbf21555SRichard Lowe.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21bbf21555SRichard Lowe.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22bbf21555SRichard Lowe.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23bbf21555SRichard Lowe.\" SUCH DAMAGE. 24bbf21555SRichard Lowe.\" 25bbf21555SRichard Lowe.\" Portions Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 26bbf21555SRichard Lowe.\" 27*5c4a5fe1SAndy Fiddaman.Dd May 25, 2024 28bbf21555SRichard Lowe.Dt BHYVE 8 29bbf21555SRichard Lowe.Os 30bbf21555SRichard Lowe.Sh NAME 31bbf21555SRichard Lowe.Nm bhyve 32bbf21555SRichard Lowe.Nd "run a guest operating system inside a virtual machine" 33bbf21555SRichard Lowe.Sh SYNOPSIS 34bbf21555SRichard Lowe.Nm 35bbf21555SRichard Lowe.Op Fl aCDdeHhPSuWwxY 36bbf21555SRichard Lowe.Oo 37bbf21555SRichard Lowe.Sm off 38bbf21555SRichard Lowe.Fl c\~ 39bbf21555SRichard Lowe.Oo 40bbf21555SRichard Lowe.Op Cm cpus= 41bbf21555SRichard Lowe.Ar numcpus 42bbf21555SRichard Lowe.Oc 43bbf21555SRichard Lowe.Op Cm ,sockets= Ar n 44bbf21555SRichard Lowe.Op Cm ,cores= Ar n 45bbf21555SRichard Lowe.Op Cm ,threads= Ar n 46bbf21555SRichard Lowe.Oc 47bbf21555SRichard Lowe.Sm on 4832640292SAndy Fiddaman.Oo Fl f 4932640292SAndy Fiddaman.Sm off 5032640292SAndy Fiddaman.Ar name Cm \&, 5132640292SAndy Fiddaman.Oo 5232640292SAndy Fiddaman.Cm string | file 5332640292SAndy Fiddaman.Oc 5432640292SAndy Fiddaman.Cm \&= Ar data 5532640292SAndy Fiddaman.Sm on 5632640292SAndy Fiddaman.Oc 57bbf21555SRichard Lowe.Oo 58bbf21555SRichard Lowe.Sm off 59bbf21555SRichard Lowe.Fl G\~ 60bbf21555SRichard Lowe.Oo Ar w Oc 61bbf21555SRichard Lowe.Oo Ar bind_address Cm \&: Oc 62bbf21555SRichard Lowe.Ar port 63bbf21555SRichard Lowe.Oc 64bbf21555SRichard Lowe.Sm on 65bbf21555SRichard Lowe.Oo Fl B 66bbf21555SRichard Lowe.Sm off 67bbf21555SRichard Lowe.Ar type Ns \&, 68bbf21555SRichard Lowe.Op Ar key Ns = Ns Ar value 69bbf21555SRichard Lowe.Oo \&, Ns Ar key Ns = Ns Ar value Ns Oc \&... 70bbf21555SRichard Lowe.Oc 71bbf21555SRichard Lowe.Sm on 72bbf21555SRichard Lowe.Op Fl k Ar config_file 73d7b72f7bSAndy Fiddaman.Op Fl K Ar layout 74bbf21555SRichard Lowe.Oo Fl l 75bbf21555SRichard Lowe.Sm off 76bbf21555SRichard Lowe.Ar lpcdev Op Cm \&, Ar conf 77bbf21555SRichard Lowe.Sm on 78bbf21555SRichard Lowe.Oc 79bbf21555SRichard Lowe.Sm off 80bbf21555SRichard Lowe.Oo Fl m\~ 81bbf21555SRichard Lowe.Ar memsize 82bbf21555SRichard Lowe.Oo 83bbf21555SRichard Lowe.Cm K | k | M | m | G | g | T | t 84bbf21555SRichard Lowe.Oc 85bbf21555SRichard Lowe.Sm on 86bbf21555SRichard Lowe.Oc 87bbf21555SRichard Lowe.Op Fl o Ar var Ns Cm = Ns Ar value 88bbf21555SRichard Lowe.Op Fl r Ar file 89bbf21555SRichard Lowe.Sm off 90bbf21555SRichard Lowe.Oo Fl s\~ 91bbf21555SRichard Lowe.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf 92bbf21555SRichard Lowe.Sm on 93bbf21555SRichard Lowe.Oc 94bbf21555SRichard Lowe.Op Fl U Ar uuid 95bbf21555SRichard Lowe.Ar vmname 96bbf21555SRichard Lowe.Nm 97bbf21555SRichard Lowe.Fl l Cm help 98bbf21555SRichard Lowe.Nm 99bbf21555SRichard Lowe.Fl s Cm help 100bbf21555SRichard Lowe.Sh DESCRIPTION 101bbf21555SRichard Lowe.Nm 102bbf21555SRichard Loweis a hypervisor that runs guest operating systems inside a 103bbf21555SRichard Lowevirtual machine. 104bbf21555SRichard Lowe.Pp 105bbf21555SRichard LoweParameters such as the number of virtual CPUs, amount of guest memory, and 106bbf21555SRichard LoweI/O connectivity can be specified with command-line parameters. 107bbf21555SRichard Lowe.Pp 108bbf21555SRichard Lowe.Nm 109bbf21555SRichard Loweruns until the guest operating system reboots or an unhandled hypervisor 110bbf21555SRichard Loweexit is detected. 111bbf21555SRichard Lowe.Sh OPTIONS 112bbf21555SRichard Lowe.Bl -tag -width 10n 113bbf21555SRichard Lowe.It Fl a 114bbf21555SRichard LoweThe guest's local APIC is configured in xAPIC mode. 115bbf21555SRichard LoweThe xAPIC mode is the default setting so this option is redundant. 116bbf21555SRichard LoweIt will be deprecated in a future version. 117bbf21555SRichard Lowe.It Xo 118bbf21555SRichard Lowe.Fl B 119bbf21555SRichard Lowe.Sm off 120bbf21555SRichard Lowe.Ar type Ns \&, 121bbf21555SRichard Lowe.Op Ar key Ns = Ns Ar value 122bbf21555SRichard Lowe.Oo \&, Ns Ar key Ns = Ns Ar value Ns Oc \&... 123bbf21555SRichard Lowe.Sm on 124bbf21555SRichard Lowe.Xc 125bbf21555SRichard LoweConfigure smbios data. 126bbf21555SRichard Lowe.Ar type 1274f3f3e9aSAndy Fiddamanmust be set to one of 1284f3f3e9aSAndy Fiddaman.Cm 0 , 1 , 2 1294f3f3e9aSAndy Fiddamanor 1304f3f3e9aSAndy Fiddaman.Cm 3 . 1314f3f3e9aSAndy FiddamanSupported keys for each type are: 1324f3f3e9aSAndy Fiddaman.Bl -tag -width XXX -offset XXX 1334f3f3e9aSAndy Fiddaman.It Cm 0 1344f3f3e9aSAndy Fiddaman.Cm vendor , version , release_date . 1354f3f3e9aSAndy Fiddaman.It Cm 1 1364f3f3e9aSAndy Fiddaman.Cm manufacturer , 1374f3f3e9aSAndy Fiddaman.Cm product_name Pq or Cm product , 1384f3f3e9aSAndy Fiddaman.Cm version , 1394f3f3e9aSAndy Fiddaman.Cm serial_number Pq or Cm serial , 1404f3f3e9aSAndy Fiddaman.Cm sku , 1414f3f3e9aSAndy Fiddaman.Cm family_name Pq or Cm family , 1424f3f3e9aSAndy Fiddaman.Cm uuid . 1434f3f3e9aSAndy Fiddaman.It Cm 2 1444f3f3e9aSAndy Fiddaman.Cm manufacturer , product_name , version , serial_number , asset_tag , 1454f3f3e9aSAndy Fiddaman.Cm location 1464f3f3e9aSAndy Fiddaman.It Ic 3 1474f3f3e9aSAndy Fiddaman.Cm manufacturer , version , serial_number , asset_tag, sku . 1484f3f3e9aSAndy Fiddaman.El 149bbf21555SRichard Lowe.It Xo Fl c 150bbf21555SRichard Lowe.Sm off 151bbf21555SRichard Lowe.Op Oo Cm cpus= Oc Ar numcpus 152bbf21555SRichard Lowe.Op Cm ,sockets= Ar n 153bbf21555SRichard Lowe.Op Cm ,cores= Ar n 154bbf21555SRichard Lowe.Op Cm ,threads= Ar n 155bbf21555SRichard Lowe.Xc 156bbf21555SRichard Lowe.Sm on 157bbf21555SRichard LoweNumber of guest virtual CPUs 158bbf21555SRichard Loweand/or the CPU topology. 159bbf21555SRichard LoweThe default value for each of 160bbf21555SRichard Lowe.Ar numcpus , 161bbf21555SRichard Lowe.Ar sockets , 162bbf21555SRichard Lowe.Ar cores , 163bbf21555SRichard Loweand 164bbf21555SRichard Lowe.Ar threads 165bbf21555SRichard Loweis 1. 166bbf21555SRichard LoweThe current maximum number of guest virtual CPUs is 32. 167bbf21555SRichard LoweIf 168bbf21555SRichard Lowe.Ar numcpus 169bbf21555SRichard Loweis not specified then it will be calculated from the other arguments. 170bbf21555SRichard LoweThe topology must be consistent in that the 171bbf21555SRichard Lowe.Ar numcpus 172bbf21555SRichard Lowemust equal the product of 173bbf21555SRichard Lowe.Ar sockets , 174bbf21555SRichard Lowe.Ar cores , 175bbf21555SRichard Loweand 176bbf21555SRichard Lowe.Ar threads . 177bbf21555SRichard LoweIf a 178bbf21555SRichard Lowe.Ar setting 179bbf21555SRichard Loweis specified more than once the last one has precedence. 180bbf21555SRichard Lowe.It Fl C 181bbf21555SRichard LoweInclude guest memory in core file. 182bbf21555SRichard Lowe.It Fl D 183bbf21555SRichard LoweDestroy the VM on guest initiated power-off. 184bbf21555SRichard Lowe.It Fl d 185bbf21555SRichard LoweSuspend CPUs at boot. 186bbf21555SRichard Lowe.It Fl e 187bbf21555SRichard LoweForce 188bbf21555SRichard Lowe.Nm 189bbf21555SRichard Loweto exit when a guest issues an access to an I/O port that is not emulated. 190bbf21555SRichard LoweThis is intended for debug purposes. 19132640292SAndy Fiddaman.It Fl f Ar name Ns Cm \&, Ns Oo Cm string Ns | Ns Cm file Ns Oc Ns Cm \&= Ns Ar data 19232640292SAndy FiddamanAdd a fw_cfg file 19332640292SAndy Fiddaman.Ar name 19432640292SAndy Fiddamanto the fw_cfg interface. 19532640292SAndy FiddamanIf a 19632640292SAndy Fiddaman.Cm string 19732640292SAndy Fiddamanis specified, the fw_cfg file contains the string as data. 19832640292SAndy FiddamanIf a 19932640292SAndy Fiddaman.Cm file 20032640292SAndy Fiddamanis specified, bhyve reads the file and adds the file content as fw_cfg data. 201bbf21555SRichard Lowe.It Fl G Xo 202bbf21555SRichard Lowe.Sm off 203bbf21555SRichard Lowe.Oo Ar w Oc 204bbf21555SRichard Lowe.Oo Ar bind_address Cm \&: Oc 205bbf21555SRichard Lowe.Ar port 206bbf21555SRichard Lowe.Sm on 207bbf21555SRichard Lowe.Xc 208bbf21555SRichard LoweStart a debug server that uses the GDB protocol to export guest state to a 209bbf21555SRichard Lowedebugger. 210bbf21555SRichard LoweAn IPv4 TCP socket will be bound to the supplied 211bbf21555SRichard Lowe.Ar bind_address 212bbf21555SRichard Loweand 213bbf21555SRichard Lowe.Ar port 214bbf21555SRichard Loweto listen for debugger connections. 215bbf21555SRichard LoweOnly a single debugger may be attached to the debug server at a time. 216bbf21555SRichard LoweIf the option begins with 217bbf21555SRichard Lowe.Sq w , 218bbf21555SRichard Lowe.Nm 219bbf21555SRichard Lowewill pause execution at the first instruction waiting for a debugger to attach. 220bbf21555SRichard Lowe.It Fl H 221bbf21555SRichard LoweYield the virtual CPU thread when a HLT instruction is detected. 222bbf21555SRichard LoweIf this option is not specified, virtual CPUs will use 100% of a host CPU. 223bbf21555SRichard Lowe.It Fl h 224bbf21555SRichard LowePrint help message and exit. 225bbf21555SRichard Lowe.It Fl k Ar config_file 226bbf21555SRichard LoweSet configuration variables from a simple, key-value config file. 227bbf21555SRichard LoweEach line of the config file is expected to consist of a config variable 228bbf21555SRichard Lowename, an equals sign 229bbf21555SRichard Lowe.Pq Sq = , 230bbf21555SRichard Loweand a value. 231bbf21555SRichard LoweNo spaces are permitted between the variable name, equals sign, or 232bbf21555SRichard Lowevalue. 233bbf21555SRichard LoweBlank lines and lines starting with 234bbf21555SRichard Lowe.Sq # 235bbf21555SRichard Loweare ignored. 236bbf21555SRichard LoweSee 237bbf21555SRichard Lowe.Xr bhyve_config 5 238bbf21555SRichard Lowefor more details. 239d7b72f7bSAndy Fiddaman.It Fl K Ar layout 240d7b72f7bSAndy FiddamanSpecify the keyboard layout. 241d7b72f7bSAndy FiddamanThe value that can be specified sets the file name in 242d7b72f7bSAndy Fiddaman.Pa /usr/share/bhyve/kbdlayout . 243d7b72f7bSAndy FiddamanThis specification only works when loaded with UEFI mode for VNC. 244d7b72f7bSAndy FiddamanWhen using a VNC client that supports QEMU Extended Key Event Message 245d7b72f7bSAndy Fiddaman.Pq e.g. TigerVNC , 246d7b72f7bSAndy Fiddamanthis option isn't needed. 247d7b72f7bSAndy FiddamanWhen using a VNC client that doesn't support QEMU Extended Key Event Message 248d7b72f7bSAndy Fiddaman.Pq e.g. tightVNC , 249d7b72f7bSAndy Fiddamanthe layout defaults to the US keyboard unless specified otherwise. 250bbf21555SRichard Lowe.It Fl l Cm help 251bbf21555SRichard LowePrint a list of supported LPC devices. 252bbf21555SRichard Lowe.It Fl l Ar lpcdev Ns Op \&, Ns Ar conf 253bbf21555SRichard LoweAllow devices behind the LPC PCI-ISA bridge to be configured. 254bbf21555SRichard LoweThe only supported devices are the TTY-class devices 255bbf21555SRichard Lowe.Cm com1 , com2 , com3 256bbf21555SRichard Loweand 257bbf21555SRichard Lowe.Cm com4 , 25832640292SAndy Fiddamanthe TPM module 25932640292SAndy Fiddaman.Cm tpm , 260bbf21555SRichard Lowethe boot ROM device 261bbf21555SRichard Lowe.Cm bootrom , 26232640292SAndy Fiddamanthe 26332640292SAndy Fiddaman.Cm fwcfg 26432640292SAndy Fiddamantype and the debug/test device 265bbf21555SRichard Lowe.Cm pc-testdev . 266bbf21555SRichard Lowe.Pp 267bbf21555SRichard LoweThe possible values for the 268bbf21555SRichard Lowe.Ar conf 269bbf21555SRichard Loweargument are listed in the 270bbf21555SRichard Lowe.Fl s 271bbf21555SRichard Loweflag description. 272bbf21555SRichard Lowe.It Xo 273bbf21555SRichard Lowe.Fl m Ar memsize Ns Oo 274bbf21555SRichard Lowe.Sm off 275bbf21555SRichard Lowe.Cm K | k | M | m | G | g | T | t 276bbf21555SRichard Lowe.Sm on 277bbf21555SRichard Lowe.Oc 278bbf21555SRichard Lowe.Xc 279bbf21555SRichard LoweSet the guest physical memory size. 280bbf21555SRichard LoweThe size argument may be suffixed with one of 281bbf21555SRichard Lowe.Cm K , M , G 282bbf21555SRichard Loweor 283bbf21555SRichard Lowe.Cm T 284bbf21555SRichard Lowe.Pq either upper or lower case 285bbf21555SRichard Loweto indicate a multiple of kibibytes, mebibytes, gibibytes, or tebibytes. 286bbf21555SRichard LoweIf no suffix is given, the value is assumed to be in mebibytes. 287bbf21555SRichard Lowe.Pp 288bbf21555SRichard LoweThe default is 256MiB. 289bbf21555SRichard Lowe.It Fl o Ar var Ns Cm = Ns Ar value 290bbf21555SRichard LoweSet the configuration variable 291bbf21555SRichard Lowe.Ar var 292bbf21555SRichard Loweto 293bbf21555SRichard Lowe.Ar value . 294bbf21555SRichard Lowe.It Fl P 295bbf21555SRichard LoweForce the guest virtual CPU to exit when a PAUSE instruction is detected. 296bbf21555SRichard Lowe.It Fl S 297bbf21555SRichard LoweWire guest memory. 298bbf21555SRichard Lowe.It Fl s Cm help 299bbf21555SRichard LowePrint a list of supported PCI devices. 300bbf21555SRichard Lowe.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf 301bbf21555SRichard LoweConfigure a virtual PCI slot and function. 302bbf21555SRichard Lowe.Pp 303bbf21555SRichard Lowe.Nm 304bbf21555SRichard Loweprovides PCI bus emulation and virtual devices that can be attached to 305bbf21555SRichard Loweslots on the bus. 306bbf21555SRichard LoweThere are 32 available slots, with the option of providing up to 8 functions 307bbf21555SRichard Loweper slot. 308bbf21555SRichard Lowe.Pp 309bbf21555SRichard LoweThe 310bbf21555SRichard Lowe.Ar slot 311bbf21555SRichard Lowecan be specified in one of the following formats: 312bbf21555SRichard Lowe.Pp 313bbf21555SRichard Lowe.Bl -bullet -compact 314bbf21555SRichard Lowe.It 315bbf21555SRichard Lowe.Ar pcislot 316bbf21555SRichard Lowe.It 317bbf21555SRichard Lowe.Sm off 318bbf21555SRichard Lowe.Ar pcislot Cm \&: Ar function 319bbf21555SRichard Lowe.Sm on 320bbf21555SRichard Lowe.It 321bbf21555SRichard Lowe.Sm off 322bbf21555SRichard Lowe.Ar bus Cm \&: Ar pcislot Cm \&: Ar function 323bbf21555SRichard Lowe.Sm on 324bbf21555SRichard Lowe.El 325bbf21555SRichard Lowe.Pp 326bbf21555SRichard LoweThe 327bbf21555SRichard Lowe.Ar pcislot 328bbf21555SRichard Lowevalue is 0 to 31. 329bbf21555SRichard LoweThe optional 330bbf21555SRichard Lowe.Ar function 331bbf21555SRichard Lowevalue is 0 to 7. 332bbf21555SRichard LoweThe optional 333bbf21555SRichard Lowe.Ar bus 334bbf21555SRichard Lowevalue is 0 to 255. 335bbf21555SRichard LoweIf not specified, the 336bbf21555SRichard Lowe.Ar function 337bbf21555SRichard Lowevalue defaults to 0. 338bbf21555SRichard LoweIf not specified, the 339bbf21555SRichard Lowe.Ar bus 340bbf21555SRichard Lowevalue defaults to 0. 341bbf21555SRichard Lowe.Pp 342bbf21555SRichard LoweThe 343bbf21555SRichard Lowe.Ar emulation 344bbf21555SRichard Loweargument can be one of the following: 345bbf21555SRichard Lowe.Bl -tag -width "amd_hostbridge" 346bbf21555SRichard Lowe.It Cm hostbridge 347bbf21555SRichard LoweA simple host bridge. 348bbf21555SRichard LoweThis is usually configured at slot 0, and is required by most guest 349bbf21555SRichard Loweoperating systems. 350bbf21555SRichard Lowe.It Cm amd_hostbridge 351bbf21555SRichard LoweEmulation identical to 352bbf21555SRichard Lowe.Cm hostbridge 353bbf21555SRichard Lowebut using a PCI vendor ID of AMD. 354bbf21555SRichard Lowe.It Cm passthru 355bbf21555SRichard LowePCI pass-through device. 356bbf21555SRichard Lowe.It Cm virtio-net-viona 357bbf21555SRichard LoweAccelerated Virtio network interface. 358bbf21555SRichard Lowe.It Cm virtio-net 359bbf21555SRichard LoweLegacy Virtio network interface. 360bbf21555SRichard Lowe.It Cm virtio-blk 361bbf21555SRichard LoweVirtio block storage interface. 362bbf21555SRichard Lowe.It Cm virtio-9p 363bbf21555SRichard LoweVirtio 9p (VirtFS) interface. 364bbf21555SRichard Lowe.It Cm virtio-rnd 365bbf21555SRichard LoweVirtio random number generator interface. 366bbf21555SRichard Lowe.It Cm virtio-console 367bbf21555SRichard LoweVirtio console interface, which exposes multiple ports 368bbf21555SRichard Loweto the guest in the form of simple char devices for simple IO 369bbf21555SRichard Lowebetween the guest and host userspaces. 370bbf21555SRichard Lowe.It Cm ahci 371bbf21555SRichard LoweAHCI controller attached to arbitrary devices. 372bbf21555SRichard Lowe.It Cm ahci-cd 373bbf21555SRichard LoweAHCI controller attached to an ATAPI CD/DVD. 374bbf21555SRichard Lowe.It Cm ahci-hd 375bbf21555SRichard LoweAHCI controller attached to a SATA hard drive. 376bbf21555SRichard Lowe.It Cm e1000 377bbf21555SRichard LoweIntel e82545 network interface. 378bbf21555SRichard Lowe.It Cm uart 379bbf21555SRichard LowePCI 16550 serial device. 380bbf21555SRichard Lowe.It Cm lpc 381bbf21555SRichard LoweLPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, 38232640292SAndy Fiddamana boot ROM, and, optionally, a fwcfg type and the debug/test device. 383bbf21555SRichard LoweThe LPC bridge emulation can only be configured on bus 0. 384bbf21555SRichard Lowe.It Cm fbuf 385bbf21555SRichard LoweRaw framebuffer device attached to VNC server. 386bbf21555SRichard Lowe.It Cm xhci 387bbf21555SRichard LoweeXtensible Host Controller Interface (xHCI) USB controller. 388bbf21555SRichard Lowe.It Cm nvme 389bbf21555SRichard LoweNVM Express (NVMe) controller. 390bbf21555SRichard Lowe.El 391bbf21555SRichard Lowe.Pp 392bbf21555SRichard LoweThe optional parameter 393bbf21555SRichard Lowe.Ar conf 394bbf21555SRichard Lowedescribes the backend for device emulations. 395bbf21555SRichard LoweIf 396bbf21555SRichard Lowe.Ar conf 397bbf21555SRichard Loweis not specified, the device emulation has no backend and can be 398bbf21555SRichard Loweconsidered unconnected. 399bbf21555SRichard Lowe.Pp 400bbf21555SRichard Lowe.Sy Host Bridge Devices 401bbf21555SRichard Lowe.Bl -tag -width 10n 402bbf21555SRichard Lowe.It Cm model Ns = Ns Ar model 403bbf21555SRichard LoweSpecify a hostbridge model to emulate. 404bbf21555SRichard LoweValid model strings, and their associated vendor and device IDs are: 405bbf21555SRichard Lowe.Sy amd Pq 0x1022/0x7432 , 406bbf21555SRichard Lowe.Sy netapp Pq 0x1275/0x1275 , 407bbf21555SRichard Lowe.Sy i440fx Pq 0x8086/0x1237 408bbf21555SRichard Loweand 409bbf21555SRichard Lowe.Sy q35 Pq 0x8086/0x29b0 . 410bbf21555SRichard LoweThe default value of 411bbf21555SRichard Lowe.Ar model 412bbf21555SRichard Loweis 413bbf21555SRichard Lowe.Cm netapp . 414bbf21555SRichard Lowe.It Cm vendor Ns = Ns Ar vendor 415bbf21555SRichard LowePCI vendor ID. 416bbf21555SRichard Lowe.It Cm devid Ns = Ns Ar devid 417bbf21555SRichard LowePCI device ID. 418bbf21555SRichard Lowe.El 419bbf21555SRichard Lowe.Pp 420bbf21555SRichard LoweProviding extra configuration parameters for a host bridge is optional, but if 421bbf21555SRichard Loweparameters are provided then either 422bbf21555SRichard Lowe.Va model 423bbf21555SRichard Loweby itself, or both of 424bbf21555SRichard Lowe.Va vendor 425bbf21555SRichard Loweand 426bbf21555SRichard Lowe.Va devid 427bbf21555SRichard Lowemust be specified. 428bbf21555SRichard Lowe.Pp 429bbf21555SRichard Lowe.Sy Accelerated Virtio Network Backends : 430bbf21555SRichard Lowe.Bl -tag -width 10n 431bbf21555SRichard Lowe.It Oo Cm vnic Ns = Oc Ns Ar vnic Ns Oo , Ns Cm feature_mask Ns = Ns Ar mask Oc 432bbf21555SRichard Lowe.Pp 433bbf21555SRichard Lowe.Ar vnic 434bbf21555SRichard Loweis the name of a configured virtual NIC on the system. 435bbf21555SRichard Lowe.Ar mask 436bbf21555SRichard Loweis applied to the virtio feature flags which are advertised to the guest. 437bbf21555SRichard LoweBits set in the 438bbf21555SRichard Lowe.Ar mask 439bbf21555SRichard Lowevalue are removed from the advertised features. 440bbf21555SRichard Lowe.El 441bbf21555SRichard Lowe.Pp 442bbf21555SRichard Lowe.Sy Other Network Backends : 443bbf21555SRichard Lowe.Bl -tag -width 10n 444bbf21555SRichard Lowe.It Oo Cm vnic Ns = Oc Ns Ar vnic Ns Oo , Ns Ar network-backend-options Oc 445bbf21555SRichard Lowe.Pp 446bbf21555SRichard Lowe.Ar vnic 447bbf21555SRichard Loweis the name of a configured virtual NIC on the system. 448bbf21555SRichard Lowe.El 449bbf21555SRichard Lowe.Pp 450bbf21555SRichard LoweThe 451bbf21555SRichard Lowe.Ar network-backend-options 452bbf21555SRichard Loweare: 453bbf21555SRichard Lowe.Bl -tag -width 8n 454bbf21555SRichard Lowe.It Cm promiscphys 455bbf21555SRichard LoweEnable promiscuous mode at the physical level (default: false) 456bbf21555SRichard Lowe.It Cm promiscsap 457bbf21555SRichard LoweEnable promiscuous mode at the SAP level (default: true) 458bbf21555SRichard Lowe.It Cm promiscmulti 459bbf21555SRichard LoweEnable promiscuous mode for all multicast addresses (default: true) 460bbf21555SRichard Lowe.It Cm promiscrxonly 461bbf21555SRichard LoweThe selected promiscuous modes are only enabled for received traffic 462bbf21555SRichard Lowe(default: true). 463bbf21555SRichard Lowe.El 464bbf21555SRichard Lowe.Pp 465bbf21555SRichard Lowe.Sy Block storage device backends : 466bbf21555SRichard Lowe.Sm off 467bbf21555SRichard Lowe.Bl -bullet 468bbf21555SRichard Lowe.It 469bbf21555SRichard Lowe.Pa /filename Op Cm \&, Ar block-device-options 470bbf21555SRichard Lowe.It 471bbf21555SRichard Lowe.Pa /dev/xxx Op Cm \&, Ar block-device-options 472bbf21555SRichard Lowe.El 473bbf21555SRichard Lowe.Sm on 474bbf21555SRichard Lowe.Pp 475bbf21555SRichard LoweThe 476bbf21555SRichard Lowe.Ar block-device-options 477bbf21555SRichard Loweare: 478bbf21555SRichard Lowe.Bl -tag -width 10n 479bbf21555SRichard Lowe.It Cm nocache 480bbf21555SRichard LoweOpen the file with 481bbf21555SRichard Lowe.Dv O_DIRECT . 482bbf21555SRichard Lowe.It Cm direct 483bbf21555SRichard LoweOpen the file using 484bbf21555SRichard Lowe.Dv O_SYNC . 485bbf21555SRichard Lowe.It Cm ro 486bbf21555SRichard LoweForce the file to be opened read-only. 487bbf21555SRichard Lowe.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc 488bbf21555SRichard LoweSpecify the logical and physical sector sizes of the emulated disk. 489bbf21555SRichard LoweThe physical sector size is optional and is equal to the logical sector size 490bbf21555SRichard Loweif not explicitly specified. 491bbf21555SRichard Lowe.It Cm nodelete 492bbf21555SRichard LoweDisable emulation of guest trim requests via 493bbf21555SRichard Lowe.Dv DIOCGDELETE 494bbf21555SRichard Lowerequests. 49532640292SAndy Fiddaman.It Cm bootindex= Ns Ar index 49632640292SAndy FiddamanAdd the device to the bootorder at 49732640292SAndy Fiddaman.Ar index . 49832640292SAndy FiddamanA fwcfg file is used to specify the bootorder. 49932640292SAndy FiddamanThe guest firmware may ignore or not have support for this fwcfg file. 50032640292SAndy FiddamanIn that case, this feature will not work as expected. 501bbf21555SRichard Lowe.El 502bbf21555SRichard Lowe.Pp 503bbf21555SRichard Lowe.Sy 9P device backends : 504bbf21555SRichard Lowe.Sm off 505bbf21555SRichard Lowe.Bl -bullet 506bbf21555SRichard Lowe.It 507bbf21555SRichard Lowe.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options 508bbf21555SRichard Lowe.El 509bbf21555SRichard Lowe.Sm on 510bbf21555SRichard Lowe.Pp 511bbf21555SRichard LoweThe 512bbf21555SRichard Lowe.Ar 9p-device-options 513bbf21555SRichard Loweare: 514bbf21555SRichard Lowe.Bl -tag -width 10n 515bbf21555SRichard Lowe.It Cm ro 516bbf21555SRichard LoweExpose the share in read-only mode. 517bbf21555SRichard Lowe.El 518bbf21555SRichard Lowe.Pp 519bbf21555SRichard Lowe.Sy TTY device backends : 520bbf21555SRichard Lowe.Bl -tag -width 10n 521bbf21555SRichard Lowe.It Cm stdio 522bbf21555SRichard LoweConnect the serial port to the standard input and output of 523bbf21555SRichard Lowethe 524bbf21555SRichard Lowe.Nm 525bbf21555SRichard Loweprocess. 526bbf21555SRichard Lowe.It Pa /dev/xxx 527bbf21555SRichard LoweUse the host TTY device for serial port I/O. 528bbf21555SRichard Lowe.El 529bbf21555SRichard Lowe.Pp 53032640292SAndy Fiddaman.Sy TPM device backends : 53132640292SAndy Fiddaman.Bl -tag -width 10n 53232640292SAndy Fiddaman.It Ar type Ns \&, Ns Ar path Ns Op Cm \&, Ns Ar tpm-device-options 53332640292SAndy FiddamanEmulate a TPM device. 53432640292SAndy Fiddaman.El 53532640292SAndy Fiddaman.Pp 53632640292SAndy FiddamanThe 53732640292SAndy Fiddaman.Ar tpm-device-options 53832640292SAndy Fiddamanare: 53932640292SAndy Fiddaman.Bl -tag -width 10n 54032640292SAndy Fiddaman.It Cm version= Ns Ar version 54132640292SAndy FiddamanVersion of the TPM device according to the TCG specification. 54232640292SAndy FiddamanDefaults to 54332640292SAndy Fiddaman.Cm 2.0 54432640292SAndy Fiddaman.El 54532640292SAndy Fiddaman.Pp 546bbf21555SRichard Lowe.Sy Boot ROM device backends : 547bbf21555SRichard Lowe.Bl -tag -width 10n 548bbf21555SRichard Lowe.It Pa romfile Ns Op Cm \&, Ns Ar varfile 549bbf21555SRichard LoweMap 550bbf21555SRichard Lowe.Ar romfile 551bbf21555SRichard Lowein the guest address space reserved for boot firmware. 552bbf21555SRichard LoweIf 553bbf21555SRichard Lowe.Ar varfile 554bbf21555SRichard Loweis provided, that file is also mapped in the boot firmware guest 555bbf21555SRichard Loweaddress space, and any modifications the guest makes will be saved 556bbf21555SRichard Loweto that file. 557bbf21555SRichard Lowe.El 558bbf21555SRichard Lowe.Pp 55932640292SAndy FiddamanFwcfg types: 56032640292SAndy Fiddaman.Bl -tag -width 10n 56132640292SAndy Fiddaman.It Ar fwcfg 56232640292SAndy FiddamanThe fwcfg interface is used to pass information such as the CPU count or ACPI 56332640292SAndy Fiddamanables to the guest firmware. 56432640292SAndy FiddamanSupported values are 56532640292SAndy Fiddaman.Ql bhyve 56632640292SAndy Fiddamanand 56732640292SAndy Fiddaman.Ql qemu . 56832640292SAndy FiddamanDue to backward compatibility reasons, 56932640292SAndy Fiddaman.Ql bhyve 57032640292SAndy Fiddamanis the default option. 57132640292SAndy FiddamanWhen 57232640292SAndy Fiddaman.Ql bhyve 57332640292SAndy Fiddamanis used, bhyve's fwctl interface is used. 57432640292SAndy FiddamanIt currently reports only the CPU count to the guest firmware. 57532640292SAndy FiddamanThe 57632640292SAndy Fiddaman.Ql qemu 57732640292SAndy Fiddamanoption uses QEMU's fwcfg interface. 57832640292SAndy FiddamanThis interface is widely used and allows user-defined information to be passed 57932640292SAndy Fiddamano the guest. 58032640292SAndy FiddamanIt is used for passing the CPU count, ACPI tables, a boot order and many other 58132640292SAndy Fiddamanthings to the guest. 58232640292SAndy FiddamanSome operating systems such as Fedora CoreOS can be configured by qemu's fwcfg 58332640292SAndy Fiddamaninterface as well. 58432640292SAndy Fiddaman.El 58532640292SAndy Fiddaman.Pp 586bbf21555SRichard Lowe.Sy Pass-through device backends : 587bbf21555SRichard Lowe.Bl -tag -width 10n 588bbf21555SRichard Lowe.It Pa /dev/ppt Ns Ar N 589bbf21555SRichard LoweConnect to a PCI device on the host identified by the specified path. 590d7b72f7bSAndy Fiddaman.It Cm rom= Ns Ar romfile 591d7b72f7bSAndy FiddamanAdd 592d7b72f7bSAndy Fiddaman.Ar romfile 593d7b72f7bSAndy Fiddamanas option ROM to the PCI device. 594d7b72f7bSAndy FiddamanThe ROM will be loaded by firmware and should be capable of initialising the 595d7b72f7bSAndy Fiddamandevice. 59632640292SAndy Fiddaman.It Cm bootindex= Ns Ar index 59732640292SAndy FiddamanAdd the device to the bootorder at 59832640292SAndy Fiddaman.Ar index . 59932640292SAndy FiddamanA fwcfg file is used to specify the bootorder. 60032640292SAndy FiddamanThe guest firmware may ignore or not have support for this fwcfg file. 60132640292SAndy FiddamanIn that case, this feature will not work as expected. 602bbf21555SRichard Lowe.El 603bbf21555SRichard Lowe.Pp 604bbf21555SRichard LoweGuest memory must be wired using the 605bbf21555SRichard Lowe.Fl S 606bbf21555SRichard Loweoption when a pass-through device is configured. 607bbf21555SRichard Lowe.Pp 608bbf21555SRichard LoweThe host device must have been previously attached to the 609bbf21555SRichard Lowe.Sy ppt 610bbf21555SRichard Lowedriver. 611bbf21555SRichard Lowe.Pp 612bbf21555SRichard Lowe.Sy Virtio console device backends : 613bbf21555SRichard Lowe.Bl -bullet 614bbf21555SRichard Lowe.Sm off 615bbf21555SRichard Lowe.It 616bbf21555SRichard Lowe.Cm port1= Ns Ar /path/to/port1.sock Ns 617bbf21555SRichard Lowe.Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ... 618bbf21555SRichard Lowe.Sm on 619bbf21555SRichard Lowe.El 620bbf21555SRichard Lowe.Pp 621bbf21555SRichard LoweA maximum of 16 ports per device can be created. 622bbf21555SRichard LoweEvery port is named and corresponds to a UNIX domain socket created by 623bbf21555SRichard Lowe.Nm . 624bbf21555SRichard Lowe.Nm 625bbf21555SRichard Loweaccepts at most one connection per port at a time. 626bbf21555SRichard Lowe.Pp 627bbf21555SRichard LoweLimitations: 628bbf21555SRichard Lowe.Bl -bullet 629bbf21555SRichard Lowe.It 630bbf21555SRichard LoweDue to lack of destructors in 631bbf21555SRichard Lowe.Nm , 632bbf21555SRichard Lowesockets on the filesystem must be cleaned up manually after 633bbf21555SRichard Lowe.Nm 634bbf21555SRichard Loweexits. 635bbf21555SRichard Lowe.It 636bbf21555SRichard LoweThere is no way to use the 637bbf21555SRichard Lowe.Dq console port 638bbf21555SRichard Lowefeature, nor the console port resize at present. 639bbf21555SRichard Lowe.It 640bbf21555SRichard LoweEmergency write is advertised, but no-op at present. 641bbf21555SRichard Lowe.El 642bbf21555SRichard Lowe.Pp 64332640292SAndy Fiddaman.Sy TPM devices : 64432640292SAndy Fiddaman.Bl -tag -width 10n 64532640292SAndy Fiddaman.It Ns Ar type 64632640292SAndy FiddamanSpecifies the type of the TPM device. 64732640292SAndy Fiddaman.Pp 64832640292SAndy FiddamanSupported types: 64932640292SAndy Fiddaman.Bl -tag -width 10n 65032640292SAndy Fiddaman.It Cm passthru 65132640292SAndy Fiddaman.El 65232640292SAndy Fiddaman.It Cm version= Ns Ar version 65332640292SAndy FiddamanThe 65432640292SAndy Fiddaman.Ar version 65532640292SAndy Fiddamanof the emulated TPM device according to the TCG specification. 65632640292SAndy Fiddaman.Pp 65732640292SAndy FiddamanSupported versions: 65832640292SAndy Fiddaman.Bl -tag -width 10n 65932640292SAndy Fiddaman.It Cm 2.0 66032640292SAndy Fiddaman.El 66132640292SAndy Fiddaman.El 66232640292SAndy Fiddaman.Pp 663bbf21555SRichard Lowe.Sy Framebuffer device backends : 664bbf21555SRichard Lowe.Bl -bullet 665bbf21555SRichard Lowe.Sm off 666bbf21555SRichard Lowe.It 667bbf21555SRichard Lowe.Op Cm rfb= Ar ip-and-port 668bbf21555SRichard Lowe.Op Cm ,w= Ar width 669bbf21555SRichard Lowe.Op Cm ,h= Ar height 670bbf21555SRichard Lowe.Op Cm ,vga= Ar vgaconf 671bbf21555SRichard Lowe.Op Cm ,wait 672bbf21555SRichard Lowe.Op Cm ,password= Ar password 673bbf21555SRichard Lowe.Sm on 674bbf21555SRichard Lowe.El 675bbf21555SRichard Lowe.Pp 676bbf21555SRichard LoweConfiguration options are defined as follows: 677bbf21555SRichard Lowe.Bl -tag -width 10n 678bbf21555SRichard Lowe.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port 679bbf21555SRichard LoweAn IP address and a port VNC should listen on. 680bbf21555SRichard LoweThere are two formats: 681bbf21555SRichard Lowe.Pp 682bbf21555SRichard Lowe.Bl -bullet -compact 683bbf21555SRichard Lowe.It 684bbf21555SRichard Lowe.Sm off 685bbf21555SRichard Lowe.Op Ar IPv4 Cm \&: 686bbf21555SRichard Lowe.Ar port 687bbf21555SRichard Lowe.Sm on 688bbf21555SRichard Lowe.It 689bbf21555SRichard Lowe.Sm off 690bbf21555SRichard Lowe.Cm \&[ Ar IPv6 Cm \&] Cm \&: Ar port 691bbf21555SRichard Lowe.Sm on 692bbf21555SRichard Lowe.El 693bbf21555SRichard Lowe.Pp 694bbf21555SRichard LoweThe default is to listen on localhost IPv4 address and default VNC port 5900. 695bbf21555SRichard LoweAn IPv6 address must be enclosed in square brackets. 696bbf21555SRichard Lowe.It Cm unix Ns = Ns Ar path 697bbf21555SRichard LoweThe path to a UNIX socket which will be created and where 698bbf21555SRichard Lowe.Nm 699bbf21555SRichard Lowewill accept VNC connections. 700bbf21555SRichard Lowe.It Cm w= Ns Ar width No and Cm h= Ns Ar height 701bbf21555SRichard LoweA display resolution, width and height, respectively. 702bbf21555SRichard LoweIf not specified, a default resolution of 1024x768 pixels will be used. 703bbf21555SRichard LoweMinimal supported resolution is 640x480 pixels, 704*5c4a5fe1SAndy Fiddamanand maximum is 3840x2160 pixels. 705bbf21555SRichard Lowe.It Cm vga= Ns Ar vgaconf 706bbf21555SRichard LowePossible values for this option are 707bbf21555SRichard Lowe.Cm io 708bbf21555SRichard Lowe(default), 709bbf21555SRichard Lowe.Cm on 710bbf21555SRichard Lowe, and 711bbf21555SRichard Lowe.Cm off . 712bbf21555SRichard LowePCI graphics cards have a dual personality in that they are 713bbf21555SRichard Lowestandard PCI devices with BAR addressing, but may also 714bbf21555SRichard Loweimplicitly decode legacy VGA I/O space 715bbf21555SRichard Lowe.Pq Ad 0x3c0-3df 716bbf21555SRichard Loweand memory space 717bbf21555SRichard Lowe.Pq 64KB at Ad 0xA0000 . 718bbf21555SRichard LoweThe default 719bbf21555SRichard Lowe.Cm io 720bbf21555SRichard Loweoption should be used for guests that attempt to issue BIOS calls which result 721bbf21555SRichard Lowein I/O port queries, and fail to boot if I/O decode is disabled. 722bbf21555SRichard Lowe.Pp 723bbf21555SRichard LoweThe 724bbf21555SRichard Lowe.Cm on 725bbf21555SRichard Loweoption should be used along with the CSM BIOS capability in UEFI 726bbf21555SRichard Loweto boot traditional BIOS guests that require the legacy VGA I/O and 727bbf21555SRichard Lowememory regions to be available. 728bbf21555SRichard Lowe.Pp 729bbf21555SRichard LoweThe 730bbf21555SRichard Lowe.Cm off 731bbf21555SRichard Loweoption should be used for the UEFI guests that assume that 732bbf21555SRichard LoweVGA adapter is present if they detect the I/O ports. 733bbf21555SRichard LoweAn example of such a guest is 734bbf21555SRichard Lowe.Ox 735bbf21555SRichard Lowein UEFI mode. 736bbf21555SRichard Lowe.It Cm wait 737bbf21555SRichard LoweInstruct 738bbf21555SRichard Lowe.Nm 739bbf21555SRichard Loweto only boot upon the initiation of a VNC connection, simplifying the 740bbf21555SRichard Loweinstallation of operating systems that require immediate keyboard input. 741bbf21555SRichard LoweThis can be removed for post-installation use. 742bbf21555SRichard Lowe.It Cm password= Ns Ar password 743bbf21555SRichard LoweThis type of authentication is known to be cryptographically weak and is not 744bbf21555SRichard Loweintended for use on untrusted networks. 745bbf21555SRichard LoweMany implementations will want to use stronger security, such as running 746bbf21555SRichard Lowethe session over an encrypted channel provided by IPsec or SSH. 747bbf21555SRichard Lowe.El 748bbf21555SRichard Lowe.Pp 749bbf21555SRichard Lowe.Sy xHCI USB device backends : 750bbf21555SRichard Lowe.Bl -tag -width 10n 751bbf21555SRichard Lowe.It Cm tablet 752bbf21555SRichard LoweA USB tablet device which provides precise cursor synchronization 753bbf21555SRichard Lowewhen using VNC. 754bbf21555SRichard Lowe.El 755bbf21555SRichard Lowe.Pp 756bbf21555SRichard Lowe.Sy NVMe device backends : 757bbf21555SRichard Lowe.Bl -bullet 758bbf21555SRichard Lowe.Sm off 759bbf21555SRichard Lowe.It 760bbf21555SRichard Lowe.Ar devpath 761bbf21555SRichard Lowe.Op Cm ,maxq= Ar # 762bbf21555SRichard Lowe.Op Cm ,qsz= Ar # 763bbf21555SRichard Lowe.Op Cm ,ioslots= Ar # 764bbf21555SRichard Lowe.Op Cm ,sectsz= Ar # 765bbf21555SRichard Lowe.Op Cm ,ser= Ar # 766bbf21555SRichard Lowe.Op Cm ,eui64= Ar # 767bbf21555SRichard Lowe.Op Cm ,dsm= Ar opt 768bbf21555SRichard Lowe.Sm on 769bbf21555SRichard Lowe.El 770bbf21555SRichard Lowe.Pp 771bbf21555SRichard LoweConfiguration options are defined as follows: 772bbf21555SRichard Lowe.Bl -tag -width 10n 773bbf21555SRichard Lowe.It Ar devpath 774bbf21555SRichard LoweAccepted device paths are: 775bbf21555SRichard Lowe.Ar /dev/blockdev 776bbf21555SRichard Loweor 777bbf21555SRichard Lowe.Ar /path/to/image 778bbf21555SRichard Loweor 779bbf21555SRichard Lowe.Cm ram= Ns Ar size_in_MiB . 780bbf21555SRichard Lowe.It Cm maxq 781bbf21555SRichard LoweMax number of queues. 782bbf21555SRichard Lowe.It Cm qsz 783bbf21555SRichard LoweMax elements in each queue. 784bbf21555SRichard Lowe.It Cm ioslots 785bbf21555SRichard LoweMax number of concurrent I/O requests. 786bbf21555SRichard Lowe.It Cm sectsz 787bbf21555SRichard LoweSector size (defaults to blockif sector size). 788bbf21555SRichard Lowe.It Cm ser 789bbf21555SRichard LoweSerial number with maximum 20 characters. 790bbf21555SRichard Lowe.It Cm eui64 791bbf21555SRichard LoweIEEE Extended Unique Identifier (8 byte value). 792bbf21555SRichard Lowe.It Cm dsm 793bbf21555SRichard LoweDataSet Management support. 794bbf21555SRichard LoweSupported values are: 795bbf21555SRichard Lowe.Cm auto , enable , 796bbf21555SRichard Loweand 797bbf21555SRichard Lowe.Cm disable . 798bbf21555SRichard Lowe.El 799bbf21555SRichard Lowe.Pp 800bbf21555SRichard Lowe.Sy AHCI device backends : 801bbf21555SRichard Lowe.Bl -bullet 802bbf21555SRichard Lowe.It 803bbf21555SRichard Lowe.Sm off 804bbf21555SRichard Lowe.Op Oo Cm hd\&: | cd\&: Oc Ar path 805bbf21555SRichard Lowe.Op Cm ,nmrr= Ar nmrr 806bbf21555SRichard Lowe.Op Cm ,ser= Ar # 807bbf21555SRichard Lowe.Op Cm ,rev= Ar # 808bbf21555SRichard Lowe.Op Cm ,model= Ar # 809bbf21555SRichard Lowe.Sm on 810bbf21555SRichard Lowe.El 811bbf21555SRichard Lowe.Pp 812bbf21555SRichard LoweConfiguration options are defined as follows: 813bbf21555SRichard Lowe.Bl -tag -width 10n 814bbf21555SRichard Lowe.It Cm nmrr 815bbf21555SRichard LoweNominal Media Rotation Rate, known as RPM. 816bbf21555SRichard LoweValue 1 will indicate device as Solid State Disk. 817bbf21555SRichard LoweDefault value is 0, not report. 818bbf21555SRichard Lowe.It Cm ser 819bbf21555SRichard LoweSerial Number with maximum 20 characters. 820bbf21555SRichard Lowe.It Cm rev 821bbf21555SRichard LoweRevision Number with maximum 8 characters. 822bbf21555SRichard Lowe.It Cm model 823bbf21555SRichard LoweModel Number with maximum 40 characters. 824bbf21555SRichard Lowe.El 825bbf21555SRichard Lowe.It Fl U Ar uuid 826bbf21555SRichard LoweSet the universally unique identifier 827bbf21555SRichard Lowe.Pq UUID 828bbf21555SRichard Lowein the guest's System Management BIOS System Information structure. 829bbf21555SRichard LoweBy default a UUID is generated from the host's hostname and 830bbf21555SRichard Lowe.Ar vmname . 831bbf21555SRichard Lowe.It Fl u 832bbf21555SRichard LoweRTC keeps UTC time. 833bbf21555SRichard Lowe.It Fl W 834bbf21555SRichard LoweForce virtio PCI device emulations to use MSI interrupts instead of MSI-X 835bbf21555SRichard Loweinterrupts. 836bbf21555SRichard Lowe.It Fl w 837bbf21555SRichard LoweIgnore accesses to unimplemented Model Specific Registers (MSRs). 838bbf21555SRichard LoweThis is intended for debug purposes. 839bbf21555SRichard Lowe.It Fl x 840bbf21555SRichard LoweThe guest's local APIC is configured in x2APIC mode. 841bbf21555SRichard Lowe.It Fl Y 842bbf21555SRichard LoweDisable MPtable generation. 843bbf21555SRichard Lowe.It Ar vmname 844bbf21555SRichard LoweAlphanumeric name of the guest. 845bbf21555SRichard Lowe.El 846bbf21555SRichard Lowe.Sh CONFIGURATION VARIABLES 847bbf21555SRichard Lowe.Nm 848bbf21555SRichard Loweuses an internal tree of configuration variables to describe global and 849bbf21555SRichard Loweper-device settings. 850bbf21555SRichard LoweWhen 851bbf21555SRichard Lowe.Nm 852bbf21555SRichard Lowestarts, 853bbf21555SRichard Loweit parses command line options (including config files) in the order given 854bbf21555SRichard Loweon the command line. 855bbf21555SRichard LoweEach command line option sets one or more configuration variables. 856bbf21555SRichard LoweFor example, 857bbf21555SRichard Lowethe 858bbf21555SRichard Lowe.Fl s 859bbf21555SRichard Loweoption creates a new tree node for a PCI device and sets one or more variables 860bbf21555SRichard Loweunder that node including the device model and device model-specific variables. 861bbf21555SRichard LoweVariables may be set multiple times during this parsing stage with the final 862bbf21555SRichard Lowevalue overriding previous values. 863bbf21555SRichard Lowe.Pp 864bbf21555SRichard LoweOnce all of the command line options have been processed, 865bbf21555SRichard Lowethe configuration values are frozen. 866bbf21555SRichard Lowe.Nm 867bbf21555SRichard Lowethen uses the value of configuration values to initialize device models 868bbf21555SRichard Loweand global settings. 869bbf21555SRichard Lowe.Pp 870bbf21555SRichard LoweMore details on configuration variables can be found in 871bbf21555SRichard Lowe.Xr bhyve_config 5 . 872bbf21555SRichard Lowe.Sh SIGNAL HANDLING 873bbf21555SRichard Lowe.Nm 874bbf21555SRichard Lowedeals with the following signals: 875bbf21555SRichard Lowe.Pp 876bbf21555SRichard Lowe.Bl -tag -width SIGTERM -compact 877bbf21555SRichard Lowe.It SIGTERM 878bbf21555SRichard LoweTrigger ACPI poweroff for a VM 879bbf21555SRichard Lowe.El 880bbf21555SRichard Lowe.Sh EXIT STATUS 881bbf21555SRichard LoweExit status indicates how the VM was terminated: 882bbf21555SRichard Lowe.Pp 883bbf21555SRichard Lowe.Bl -tag -width indent -compact 884bbf21555SRichard Lowe.It 0 885bbf21555SRichard Lowerebooted 886bbf21555SRichard Lowe.It 1 887bbf21555SRichard Lowepowered off 888bbf21555SRichard Lowe.It 2 889bbf21555SRichard Lowehalted 890bbf21555SRichard Lowe.It 3 891bbf21555SRichard Lowetriple fault 892bbf21555SRichard Lowe.It 4 893bbf21555SRichard Loweexited due to an error 894bbf21555SRichard Lowe.El 895bbf21555SRichard Lowe.Sh EXAMPLES 896bbf21555SRichard LoweTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio 897bbf21555SRichard Loweblock device backed by the 898bbf21555SRichard Lowe.Pa /my/image 899bbf21555SRichard Lowefilesystem image, and a serial port for the console: 900bbf21555SRichard Lowe.Bd -literal -offset indent 901bbf21555SRichard Lowebhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \e 902bbf21555SRichard Lowe -l com1,stdio -H -P -m 1G vm1 903bbf21555SRichard Lowe.Ed 904bbf21555SRichard Lowe.Pp 905bbf21555SRichard LoweRun a 24GB single-CPU virtual machine with three network ports. 906bbf21555SRichard Lowe.Bd -literal -offset indent 907bbf21555SRichard Lowebhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net-viona,vmvnic0 \e 908bbf21555SRichard Lowe -s 2:1,virtio-net-viona,vmvnic1 -s 2:2,virtio-net-viona,vmvnic2 \e 909bbf21555SRichard Lowe -s 3,virtio-blk,/my/image -l com1,stdio \e 910bbf21555SRichard Lowe -H -P -m 24G bigvm 911bbf21555SRichard Lowe.Ed 912bbf21555SRichard Lowe.Pp 913bbf21555SRichard LoweRun an 8GB virtual machine with 2 quad core CPUs, 2 NVMe disks and one other 914bbf21555SRichard Lowedisk attached as a Virtio block device, an AHCI ATAPI CD-ROM, a single viona 915bbf21555SRichard Lowenetwork port, an i440fx hostbridge, and the console port connected to a socket. 916bbf21555SRichard Lowe.Bd -literal -offset indent 917bbf21555SRichard Lowebhyve -c sockets=2,cores=4,threads=2 \e 918bbf21555SRichard Lowe -s 0,hostbridge,model=i440fx -s 1,lpc \e 919bbf21555SRichard Lowe -s 1:0,nvme,/dev/zvol/rdsk/tank/hdd0 \e 920bbf21555SRichard Lowe -s 1:1,nvme,/dev/zvol/rdsk/tank/hdd1 \e 921bbf21555SRichard Lowe -s 1:2,virtio-blk,/dev/zvol/rdsk/tank/hdd1 \e 922bbf21555SRichard Lowe -s 2:0,ahci,cd:/images/install.iso \e 923bbf21555SRichard Lowe -s 3,virtio-net-viona,vnic=vmvnic0 \e 924bbf21555SRichard Lowe -l com1,socket,/tmp/vm.com1,wait \e 925bbf21555SRichard Lowe -H -P -m 8G 926bbf21555SRichard Lowe.Ed 927bbf21555SRichard Lowe.Pp 928bbf21555SRichard LoweRun a UEFI virtual machine with a display resolution of 800 by 600 pixels 929bbf21555SRichard Lowethat can be accessed via VNC at: 0.0.0.0:5900. 930bbf21555SRichard Lowe.Bd -literal -offset indent 931bbf21555SRichard Lowebhyve -c 2 -m 4G -w -H \e 932bbf21555SRichard Lowe -s 0,hostbridge \e 933bbf21555SRichard Lowe -s 3,ahci-cd,/path/to/uefi-OS-install.iso \e 934bbf21555SRichard Lowe -s 4,nvme,/dev/zvol/rdsk/tank/hdd0 \e 935bbf21555SRichard Lowe -s 5,virtio-net-viona,vnic=vnmic0 \e 936bbf21555SRichard Lowe -s 29,fbuf,vga=off,rfb=0.0.0.0:5900,w=800,h=600,wait \e 937bbf21555SRichard Lowe -s 30,xhci,tablet \e 938bbf21555SRichard Lowe -s 31,lpc -l com1,stdio \e 939bbf21555SRichard Lowe -l bootrom,/usr/share/bhyve/firmware/BHYVE_UEFI.fd \e 940bbf21555SRichard Lowe uefivm 941bbf21555SRichard Lowe.Ed 942bbf21555SRichard Lowe.Pp 943bbf21555SRichard LoweRun a UEFI virtual machine with a VARS file to save EFI variables. 944bbf21555SRichard LoweNote that 945bbf21555SRichard Lowe.Nm 946bbf21555SRichard Lowewill write guest modifications to the given VARS file. 947bbf21555SRichard LoweBe sure to create a per-guest copy of the template VARS file from 948bbf21555SRichard Lowe.Pa /usr/share/bhyve/firmware . 949bbf21555SRichard Lowe.Bd -literal -offset indent 950bbf21555SRichard Lowebhyve -c 2 -m 4g -w -H \e 951bbf21555SRichard Lowe -s 0,hostbridge \e 95232640292SAndy Fiddaman -s 31,lpc -l com1,stdio \e 953bbf21555SRichard Lowe -l bootrom,/usr/share/bhyve/firmware/BHYVE_UEFI.fd,BHYVE_UEFI_VARS.fd \e 954bbf21555SRichard Lowe uefivm 955bbf21555SRichard Lowe.Ed 956bbf21555SRichard Lowe.Sh SEE ALSO 957bbf21555SRichard Lowe.Xr bhyve_config 5 , 958bbf21555SRichard Lowe.Xr bhyvectl 8 959bbf21555SRichard Lowe.Pp 960bbf21555SRichard Lowe.Rs 961bbf21555SRichard Lowe.%A Intel 962bbf21555SRichard Lowe.%B 64 and IA-32 Architectures Software Developers' Manual 963bbf21555SRichard Lowe.%V Volume 3 964bbf21555SRichard Lowe.Re 965