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*866036f4SRebecca Cran.Dd November 28, 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 48775f6f45SMateusz Piotrowski.Oo 49b70b050aSJohn Baldwin.Sm off 50775f6f45SMateusz Piotrowski.Fl G\~ 51b70b050aSJohn Baldwin.Oo Ar w Oc 52775f6f45SMateusz Piotrowski.Oo Ar bind_address Cm \&: Oc 53b70b050aSJohn Baldwin.Ar port 54b70b050aSJohn Baldwin.Sm on 55b70b050aSJohn Baldwin.Oc 56f656df58SMateusz Piotrowski.Op Fl k Ar config_file 5777d208a3SMateusz Piotrowski.Oo Fl l 5877d208a3SMateusz Piotrowski.Sm off 59bfe40b69SMateusz Piotrowski.Ar lpcdev Op Cm \&, Ar conf 6077d208a3SMateusz Piotrowski.Sm on 6177d208a3SMateusz Piotrowski.Oc 6277d208a3SMateusz Piotrowski.Sm off 63775f6f45SMateusz Piotrowski.Oo Fl m\~ 6477d208a3SMateusz Piotrowski.Ar memsize 6577d208a3SMateusz Piotrowski.Oo 668d9fefe6SMateusz Piotrowski.Cm K | Cm k | Cm M | Cm m | Cm G | Cm g | Cm T | Cm t 6777d208a3SMateusz Piotrowski.Oc 6877d208a3SMateusz Piotrowski.Sm on 6977d208a3SMateusz Piotrowski.Oc 70621b5090SJohn Baldwin.Op Fl o Ar var Ns Cm = Ns Ar value 7177d208a3SMateusz Piotrowski.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu 72483d953aSJohn Baldwin.Op Fl r Ar file 7377d208a3SMateusz Piotrowski.Sm off 74bfe40b69SMateusz Piotrowski.Oo Fl s\~ 75bfe40b69SMateusz Piotrowski.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf 7677d208a3SMateusz Piotrowski.Sm on 7777d208a3SMateusz Piotrowski.Oc 785749449dSJohn Baldwin.Op Fl U Ar uuid 79b13e60daSPeter Grehan.Ar vmname 80bfe40b69SMateusz Piotrowski.Nm 81bfe40b69SMateusz Piotrowski.Fl l Cm help 82bfe40b69SMateusz Piotrowski.Nm 83bfe40b69SMateusz Piotrowski.Fl s Cm help 84b13e60daSPeter Grehan.Sh DESCRIPTION 85b13e60daSPeter Grehan.Nm 867fca1ad5SGlen Barberis a hypervisor that runs guest operating systems inside a 87b13e60daSPeter Grehanvirtual machine. 88b13e60daSPeter Grehan.Pp 89b13e60daSPeter GrehanParameters such as the number of virtual CPUs, amount of guest memory, and 90b13e60daSPeter GrehanI/O connectivity can be specified with command-line parameters. 91b13e60daSPeter Grehan.Pp 925c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must be loaded with 9384fe889cSChristian Brueffer.Xr bhyveload 8 94b13e60daSPeter Grehanor a similar boot loader before running 955c3ec676SGleb Smirnoff.Nm , 965c3ec676SGleb Smirnoffotherwise, it is enough to run 975c3ec676SGleb Smirnoff.Nm 985c3ec676SGleb Smirnoffwith a boot ROM of choice. 99b13e60daSPeter Grehan.Pp 100b13e60daSPeter Grehan.Nm 101b13e60daSPeter Grehanruns until the guest operating system reboots or an unhandled hypervisor 102b13e60daSPeter Grehanexit is detected. 103b13e60daSPeter Grehan.Sh OPTIONS 104b13e60daSPeter Grehan.Bl -tag -width 10n 105b13e60daSPeter Grehan.It Fl A 106b13e60daSPeter GrehanGenerate ACPI tables. 107b13e60daSPeter GrehanRequired for 108b13e60daSPeter Grehan.Fx Ns /amd64 109b13e60daSPeter Grehanguests. 110ccb1c87aSMateusz Piotrowski.It Fl a 111ccb1c87aSMateusz PiotrowskiThe guest's local APIC is configured in xAPIC mode. 112ccb1c87aSMateusz PiotrowskiThe xAPIC mode is the default setting so this option is redundant. 113ccb1c87aSMateusz PiotrowskiIt will be deprecated in a future version. 114ccb1c87aSMateusz Piotrowski.It Fl C 115ccb1c87aSMateusz PiotrowskiInclude guest memory in core file. 11601d822d3SRodney W. Grimes.It Fl c Op Ar setting ... 11701d822d3SRodney W. GrimesNumber of guest virtual CPUs 11801d822d3SRodney W. Grimesand/or the CPU topology. 11901d822d3SRodney W. GrimesThe default value for each of 12001d822d3SRodney W. Grimes.Ar numcpus , 12101d822d3SRodney W. Grimes.Ar sockets , 12201d822d3SRodney W. Grimes.Ar cores , 12301d822d3SRodney W. Grimesand 12401d822d3SRodney W. Grimes.Ar threads 12501d822d3SRodney W. Grimesis 1. 12601d822d3SRodney W. GrimesThe current maximum number of guest virtual CPUs is 16. 12701d822d3SRodney W. GrimesIf 12801d822d3SRodney W. Grimes.Ar numcpus 12901d822d3SRodney W. Grimesis not specified then it will be calculated from the other arguments. 13001d822d3SRodney W. GrimesThe topology must be consistent in that the 13101d822d3SRodney W. Grimes.Ar numcpus 13201d822d3SRodney W. Grimesmust equal the product of 13301d822d3SRodney W. Grimes.Ar sockets , 13401d822d3SRodney W. Grimes.Ar cores , 13501d822d3SRodney W. Grimesand 13601d822d3SRodney W. Grimes.Ar threads . 13701d822d3SRodney W. GrimesIf a 13801d822d3SRodney W. Grimes.Ar setting 13901d822d3SRodney W. Grimesis specified more than once the last one has precedence. 1400a1016f9SPawel Biernacki.It Fl D 1410a1016f9SPawel BiernackiDestroy the VM on guest initiated power-off. 142cde1f5b8SJohn Baldwin.It Fl e 143cde1f5b8SJohn BaldwinForce 144cde1f5b8SJohn Baldwin.Nm 145cde1f5b8SJohn Baldwinto exit when a guest issues an access to an I/O port that is not emulated. 146cde1f5b8SJohn BaldwinThis is intended for debug purposes. 1472cdff991SMariusz Zaborski.It Fl G Xo 1482cdff991SMariusz Zaborski.Sm off 1492cdff991SMariusz Zaborski.Oo Ar w Oc 150775f6f45SMateusz Piotrowski.Oo Ar bind_address Cm \&: Oc 1512cdff991SMariusz Zaborski.Ar port 1522cdff991SMariusz Zaborski.Sm on 1532cdff991SMariusz Zaborski.Xc 154cd377eb3SJohn BaldwinStart a debug server that uses the GDB protocol to export guest state to a 155cd377eb3SJohn Baldwindebugger. 156cd377eb3SJohn BaldwinAn IPv4 TCP socket will be bound to the supplied 1572cdff991SMariusz Zaborski.Ar bind_address 1582cdff991SMariusz Zaborskiand 159cd377eb3SJohn Baldwin.Ar port 160cd377eb3SJohn Baldwinto listen for debugger connections. 161cd377eb3SJohn BaldwinOnly a single debugger may be attached to the debug server at a time. 1622cdff991SMariusz ZaborskiIf the option begins with 163cd377eb3SJohn Baldwin.Sq w , 164cd377eb3SJohn Baldwin.Nm 165cd377eb3SJohn Baldwinwill pause execution at the first instruction waiting for a debugger to attach. 166cde1f5b8SJohn Baldwin.It Fl H 167cde1f5b8SJohn BaldwinYield the virtual CPU thread when a HLT instruction is detected. 168cde1f5b8SJohn BaldwinIf this option is not specified, virtual CPUs will use 100% of a host CPU. 169ccb1c87aSMateusz Piotrowski.It Fl h 170ccb1c87aSMateusz PiotrowskiPrint help message and exit. 171f656df58SMateusz Piotrowski.It Fl k Ar config_file 172621b5090SJohn BaldwinSet configuration variables from a simple, key-value config file. 173621b5090SJohn BaldwinEach line of the config file is expected to consist of a config variable 174621b5090SJohn Baldwinname, an equals sign 175621b5090SJohn Baldwin.Pq Sq = , 176621b5090SJohn Baldwinand a value. 177621b5090SJohn BaldwinNo spaces are permitted between the variable name, equals sign, or 178621b5090SJohn Baldwinvalue. 179621b5090SJohn BaldwinBlank lines and lines starting with 180621b5090SJohn Baldwin.Sq # 181621b5090SJohn Baldwinare ignored. 182f656df58SMateusz PiotrowskiSee 183f656df58SMateusz Piotrowski.Xr bhyve_config 5 184f656df58SMateusz Piotrowskifor more details. 1854c08b978SMateusz Piotrowski.It Fl l Cm help 1864c08b978SMateusz PiotrowskiPrint a list of supported LPC devices. 1874c08b978SMateusz Piotrowski.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf 188cde1f5b8SJohn BaldwinAllow devices behind the LPC PCI-ISA bridge to be configured. 1899b1aa8d6SNeel NatuThe only supported devices are the TTY-class devices 1904c08b978SMateusz Piotrowski.Cm com1 , com2 , com3 , 1914c08b978SMateusz Piotrowskiand 1924c08b978SMateusz Piotrowski.Cm com4 , 1932f40fc6fSPeter Grehanthe boot ROM device 1944c08b978SMateusz Piotrowski.Cm bootrom , 1952f40fc6fSPeter Grehanand the debug/test device 1964c08b978SMateusz Piotrowski.Cm pc-testdev . 1971aa56353SMarcelo Araujo.Pp 1984c08b978SMateusz PiotrowskiThe possible values for the 1994c08b978SMateusz Piotrowski.Ar conf 2004c08b978SMateusz Piotrowskiargument are listed in the 2014c08b978SMateusz Piotrowski.Fl s 2024c08b978SMateusz Piotrowskiflag description. 2037e0cb3dfSMateusz Piotrowski.It Xo 2047e0cb3dfSMateusz Piotrowski.Fl m Ar memsize Ns Oo 2057e0cb3dfSMateusz Piotrowski.Sm off 2067e0cb3dfSMateusz Piotrowski.Cm K | k | M | m | G | g | T | t 2077e0cb3dfSMateusz Piotrowski.Sm on 2087e0cb3dfSMateusz Piotrowski.Oc 2097e0cb3dfSMateusz Piotrowski.Xc 2107e0cb3dfSMateusz PiotrowskiSet the guest physical memory size 211cde1f5b8SJohn BaldwinThis must be the same size that was given to 212cde1f5b8SJohn Baldwin.Xr bhyveload 8 . 213cde1f5b8SJohn Baldwin.Pp 2147e0cb3dfSMateusz PiotrowskiThe size argument may be suffixed with one of 2157e0cb3dfSMateusz Piotrowski.Cm K , M , G 2167e0cb3dfSMateusz Piotrowskior 2177e0cb3dfSMateusz Piotrowski.Cm T 2187e0cb3dfSMateusz Piotrowski(either upper or lower case) 2197e0cb3dfSMateusz Piotrowskito indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. 220cde1f5b8SJohn BaldwinIf no suffix is given, the value is assumed to be in megabytes. 2216ee52c65SRoman Bogorodskiy.Pp 2227e0cb3dfSMateusz PiotrowskiThe default is 256M. 223621b5090SJohn Baldwin.It Fl o Ar var Ns Cm = Ns Ar value 224621b5090SJohn BaldwinSet the configuration variable 225621b5090SJohn Baldwin.Ar var 226621b5090SJohn Baldwinto 227621b5090SJohn Baldwin.Ar value . 228ccb1c87aSMateusz Piotrowski.It Fl P 229ccb1c87aSMateusz PiotrowskiForce the guest virtual CPU to exit when a PAUSE instruction is detected. 23090df5437SMateusz Piotrowski.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu 2319b6155a2SNeel NatuPin guest's virtual CPU 2329b6155a2SNeel Natu.Em vcpu 2339b6155a2SNeel Natuto 2349b6155a2SNeel Natu.Em hostcpu . 235483d953aSJohn Baldwin.It Fl r Ar file 236483d953aSJohn BaldwinResume a guest from a snapshot. 237483d953aSJohn BaldwinThe guest memory contents are restored from 238483d953aSJohn Baldwin.Ar file , 239483d953aSJohn Baldwinand the guest device and vCPU state are restored from the file 240483d953aSJohn Baldwin.Dq Ar file Ns .kern . 241483d953aSJohn Baldwin.Pp 242483d953aSJohn BaldwinNote that the current snapshot file format requires that the configuration of 243483d953aSJohn Baldwindevices in the new VM match the VM from which the snapshot was taken by specifying the 244483d953aSJohn Baldwinsame 245b24eea8cSMateusz Piotrowski.Fl s 246483d953aSJohn Baldwinand 247b24eea8cSMateusz Piotrowski.Fl l 248483d953aSJohn Baldwinoptions. 249483d953aSJohn BaldwinThe count of vCPUs and memory configuration are read from the snapshot. 250ccb1c87aSMateusz Piotrowski.It Fl S 251ccb1c87aSMateusz PiotrowskiWire guest memory. 252449f0e48SMateusz Piotrowski.It Fl s Cm help 253449f0e48SMateusz PiotrowskiPrint a list of supported PCI devices. 254449f0e48SMateusz Piotrowski.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf 255b13e60daSPeter GrehanConfigure a virtual PCI slot and function. 256b13e60daSPeter Grehan.Pp 25784fe889cSChristian Brueffer.Nm 258b13e60daSPeter Grehanprovides PCI bus emulation and virtual devices that can be attached to 259b13e60daSPeter Grehanslots on the bus. 260b13e60daSPeter GrehanThere are 32 available slots, with the option of providing up to 8 functions 261b13e60daSPeter Grehanper slot. 262234d8c47SMateusz Piotrowski.Pp 263234d8c47SMateusz PiotrowskiThe 264234d8c47SMateusz Piotrowski.Ar slot 265234d8c47SMateusz Piotrowskican be specified in one of the following formats: 266234d8c47SMateusz Piotrowski.Pp 267234d8c47SMateusz Piotrowski.Bl -bullet -compact 268234d8c47SMateusz Piotrowski.It 269234d8c47SMateusz Piotrowski.Ar pcislot 270234d8c47SMateusz Piotrowski.It 271234d8c47SMateusz Piotrowski.Sm off 272234d8c47SMateusz Piotrowski.Ar pcislot Cm \&: Ar function 273234d8c47SMateusz Piotrowski.Sm on 274234d8c47SMateusz Piotrowski.It 275234d8c47SMateusz Piotrowski.Sm off 276234d8c47SMateusz Piotrowski.Ar bus Cm \&: Ar pcislot Cm \&: Ar function 277234d8c47SMateusz Piotrowski.Sm on 278234d8c47SMateusz Piotrowski.El 279b13e60daSPeter Grehan.Pp 280b13e60daSPeter GrehanThe 281b13e60daSPeter Grehan.Ar pcislot 28284fe889cSChristian Brueffervalue is 0 to 31. 28384fe889cSChristian BruefferThe optional 28484fe889cSChristian Brueffer.Ar function 28584fe889cSChristian Brueffervalue is 0 to 7. 28684fe889cSChristian BruefferThe optional 28706db1b4aSNeel Natu.Ar bus 28806db1b4aSNeel Natuvalue is 0 to 255. 28984fe889cSChristian BruefferIf not specified, the 29084fe889cSChristian Brueffer.Ar function 29184fe889cSChristian Brueffervalue defaults to 0. 29284fe889cSChristian BruefferIf not specified, the 29384fe889cSChristian Brueffer.Ar bus 29484fe889cSChristian Brueffervalue defaults to 0. 295234d8c47SMateusz Piotrowski.Pp 296234d8c47SMateusz PiotrowskiThe 297234d8c47SMateusz Piotrowski.Ar emulation 298234d8c47SMateusz Piotrowskiargument 299234d8c47SMateusz Piotrowskican be one of the following: 3007014cb23SMateusz Piotrowski.Bl -tag -width "amd_hostbridge" 3017014cb23SMateusz Piotrowski.It Cm hostbridge 3027014cb23SMateusz PiotrowskiA simple host bridge. 303b13e60daSPeter GrehanThis is usually configured at slot 0, and is required by most guest 304b13e60daSPeter Grehanoperating systems. 3057014cb23SMateusz Piotrowski.It Cm amd_hostbridge 3067014cb23SMateusz PiotrowskiEmulation identical to 3077014cb23SMateusz Piotrowski.Cm hostbridge 3087014cb23SMateusz Piotrowskiusing a PCI vendor ID of AMD. 3097014cb23SMateusz Piotrowski.It Cm passthru 310b13e60daSPeter GrehanPCI pass-through device. 3117014cb23SMateusz Piotrowski.It Cm virtio-net 312b13e60daSPeter GrehanVirtio network interface. 3137014cb23SMateusz Piotrowski.It Cm virtio-blk 314b13e60daSPeter GrehanVirtio block storage interface. 3157014cb23SMateusz Piotrowski.It Cm virtio-scsi 316f9c005a1SMarcelo AraujoVirtio SCSI interface. 3177014cb23SMateusz Piotrowski.It Cm virtio-9p 318100353cfSJakub Wojciech KlamaVirtio 9p (VirtFS) interface. 3197014cb23SMateusz Piotrowski.It Cm virtio-rnd 3209d0c4e17SPeter GrehanVirtio RNG interface. 3217014cb23SMateusz Piotrowski.It Cm virtio-console 3225121b6ccSRoman BogorodskiyVirtio console interface, which exposes multiple ports 3235121b6ccSRoman Bogorodskiyto the guest in the form of simple char devices for simple IO 3245121b6ccSRoman Bogorodskiybetween the guest and host userspaces. 325054accacSCorvin Köhne.It Cm virtio-input 326054accacSCorvin KöhneVirtio input interface. 3277014cb23SMateusz Piotrowski.It Cm ahci 328d6099860SMaxim KonovalovAHCI controller attached to arbitrary devices. 3297014cb23SMateusz Piotrowski.It Cm ahci-cd 330b13e60daSPeter GrehanAHCI controller attached to an ATAPI CD/DVD. 3317014cb23SMateusz Piotrowski.It Cm ahci-hd 3327014cb23SMateusz PiotrowskiAHCI controller attached to a SATA hard drive. 3337014cb23SMateusz Piotrowski.It Cm e1000 3349e749f25SAlexander MotinIntel e82545 network interface. 3357014cb23SMateusz Piotrowski.It Cm uart 336b13e60daSPeter GrehanPCI 16550 serial device. 3377014cb23SMateusz Piotrowski.It Cm lpc 3387014cb23SMateusz PiotrowskiLPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, 3397014cb23SMateusz Piotrowskia boot ROM, and, 3402f40fc6fSPeter Grehanoptionally, the debug/test device. 3419b1aa8d6SNeel NatuThe LPC bridge emulation can only be configured on bus 0. 3427014cb23SMateusz Piotrowski.It Cm fbuf 3436c87a2c0SGleb SmirnoffRaw framebuffer device attached to VNC server. 3447014cb23SMateusz Piotrowski.It Cm xhci 3455c3ec676SGleb SmirnoffeXtensible Host Controller Interface (xHCI) USB controller. 3467014cb23SMateusz Piotrowski.It Cm nvme 347c066c68cSMarcelo AraujoNVM Express (NVMe) controller. 3487014cb23SMateusz Piotrowski.It Cm hda 34936f9f044SWarner LoshHigh Definition Audio Controller. 350b13e60daSPeter Grehan.El 351234d8c47SMateusz Piotrowski.Pp 352234d8c47SMateusz PiotrowskiThe optional parameter 353234d8c47SMateusz Piotrowski.Ar conf 354234d8c47SMateusz Piotrowskidescribes the backend for device emulations. 355b13e60daSPeter GrehanIf 356b13e60daSPeter Grehan.Ar conf 357b13e60daSPeter Grehanis not specified, the device emulation has no backend and can be 358b13e60daSPeter Grehanconsidered unconnected. 359b13e60daSPeter Grehan.Pp 3608d9fefe6SMateusz PiotrowskiNetwork device backends: 3617fb22729SMateusz Piotrowski.Sm off 3627fb22729SMateusz Piotrowski.Bl -bullet 3637fb22729SMateusz Piotrowski.It 3647fb22729SMateusz Piotrowski.Xo 3657fb22729SMateusz Piotrowski.Cm tap Ar N 3667fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx 3677fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N 3687fb22729SMateusz Piotrowski.Xc 3697fb22729SMateusz Piotrowski.It 3707fb22729SMateusz Piotrowski.Xo 3717fb22729SMateusz Piotrowski.Cm vmnet Ar N 3727fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx 3737fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N 3747fb22729SMateusz Piotrowski.Xc 3757fb22729SMateusz Piotrowski.It 3767fb22729SMateusz Piotrowski.Xo 3777fb22729SMateusz Piotrowski.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK 3787fb22729SMateusz Piotrowski.Op Cm \&,socket= Ar NAME 3797fb22729SMateusz Piotrowski.Op Cm \&,hook= Ar HOOK 3807fb22729SMateusz Piotrowski.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx 3817fb22729SMateusz Piotrowski.Op Cm \&,mtu= Ar N 3827fb22729SMateusz Piotrowski.Xc 3837fb22729SMateusz Piotrowski.El 3847fb22729SMateusz Piotrowski.Sm on 385b13e60daSPeter GrehanIf 3867fb22729SMateusz Piotrowski.Cm mac 387b13e60daSPeter Grehanis not specified, the MAC address is derived from a fixed OUI and the 388b13e60daSPeter Grehanremaining bytes from an MD5 hash of the slot and function numbers and 389b13e60daSPeter Grehanthe device name. 390b13e60daSPeter Grehan.Pp 391b13e60daSPeter GrehanThe MAC address is an ASCII string in 392b13e60daSPeter Grehan.Xr ethers 5 393b13e60daSPeter Grehanformat. 394692dbfe9SVincenzo Maffione.Pp 3957fb22729SMateusz PiotrowskiWith 3967fb22729SMateusz Piotrowski.Cm virtio-net 3977fb22729SMateusz Piotrowskidevices, the 3987fb22729SMateusz Piotrowski.Cm mtu 399692dbfe9SVincenzo Maffioneparameter can be specified to inform the guest about the largest MTU 400692dbfe9SVincenzo Maffionethat should be allowed, expressed in bytes. 401e90337e4SAleksandr Fedorov.Pp 4027fb22729SMateusz PiotrowskiWith 4037fb22729SMateusz Piotrowski.Cm netgraph 4047fb22729SMateusz Piotrowskibackend, the 4057fb22729SMateusz Piotrowski.Cm path 406e90337e4SAleksandr Fedorovand 4077fb22729SMateusz Piotrowski.Cm peerhook 408e90337e4SAleksandr Fedorovparameters must be specified to set the destination node and corresponding hook. 409e90337e4SAleksandr FedorovThe optional parameters 4107fb22729SMateusz Piotrowski.Cm socket 411e90337e4SAleksandr Fedorovand 4127fb22729SMateusz Piotrowski.Cm hook 413e90337e4SAleksandr Fedorovmay be used to set the 414e90337e4SAleksandr Fedorov.Xr ng_socket 4 415e90337e4SAleksandr Fedorovnode name and source hook. 416e90337e4SAleksandr FedorovThe 417e90337e4SAleksandr Fedorov.Ar ADDRESS , 4187fb22729SMateusz Piotrowski.Ar HOOK , 419e90337e4SAleksandr Fedorovand 420e90337e4SAleksandr Fedorov.Ar NAME 421e90337e4SAleksandr Fedorovmust comply with 422e90337e4SAleksandr Fedorov.Xr netgraph 4 423e90337e4SAleksandr Fedorovaddressing rules. 424b13e60daSPeter Grehan.Pp 4255232a35fSMateusz PiotrowskiBlock storage device backends: 4265232a35fSMateusz Piotrowski.Sm off 4275232a35fSMateusz Piotrowski.Bl -bullet 4285232a35fSMateusz Piotrowski.It 4295232a35fSMateusz Piotrowski.Ar /filename Op Cm \&, Ar block-device-options 4305232a35fSMateusz Piotrowski.It 4315232a35fSMateusz Piotrowski.Ar /dev/xxx Op Cm \&, Ar block-device-options 4324e43c1e8SNeel Natu.El 4335232a35fSMateusz Piotrowski.Sm on 4344e43c1e8SNeel Natu.Pp 4354e43c1e8SNeel NatuThe 4364e43c1e8SNeel Natu.Ar block-device-options 4374e43c1e8SNeel Natuare: 4385232a35fSMateusz Piotrowski.Bl -tag -width 10n 4395232a35fSMateusz Piotrowski.It Cm nocache 440b13e60daSPeter GrehanOpen the file with 441b13e60daSPeter Grehan.Dv O_DIRECT . 4425232a35fSMateusz Piotrowski.It Cm direct 443b13e60daSPeter GrehanOpen the file using 444b13e60daSPeter Grehan.Dv O_SYNC . 4455232a35fSMateusz Piotrowski.It Cm ro 446b13e60daSPeter GrehanForce the file to be opened read-only. 4475232a35fSMateusz Piotrowski.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc 4484e43c1e8SNeel NatuSpecify the logical and physical sector sizes of the emulated disk. 4494e43c1e8SNeel NatuThe physical sector size is optional and is equal to the logical sector size 4504e43c1e8SNeel Natuif not explicitly specified. 4515232a35fSMateusz Piotrowski.It Cm nodelete 452e6d795d1SAllan JudeDisable emulation of guest trim requests via 453e6d795d1SAllan Jude.Dv DIOCGDELETE 454e6d795d1SAllan Juderequests. 455b13e60daSPeter Grehan.El 456b13e60daSPeter Grehan.Pp 4577c5829c9SMateusz PiotrowskiSCSI device backends: 4587c5829c9SMateusz Piotrowski.Sm off 4597c5829c9SMateusz Piotrowski.Bl -bullet 4607c5829c9SMateusz Piotrowski.It 4617c5829c9SMateusz Piotrowski.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc 46249f87822SAlexander Motin.El 4637c5829c9SMateusz Piotrowski.Sm on 46449f87822SAlexander Motin.Pp 46549f87822SAlexander MotinThe 46649f87822SAlexander Motin.Ar scsi-device-options 46749f87822SAlexander Motinare: 46849f87822SAlexander Motin.Bl -tag -width 10n 4697c5829c9SMateusz Piotrowski.It Cm iid= Ns Ar IID 47049f87822SAlexander MotinInitiator ID to use when sending requests to specified CTL port. 47149f87822SAlexander MotinThe default value is 0. 472f9c005a1SMarcelo Araujo.El 473f9c005a1SMarcelo Araujo.Pp 4742d00b570SMateusz Piotrowski9P device backends: 4752d00b570SMateusz Piotrowski.Sm off 4762d00b570SMateusz Piotrowski.Bl -bullet 4772d00b570SMateusz Piotrowski.It 4782d00b570SMateusz Piotrowski.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options 479100353cfSJakub Wojciech Klama.El 4802d00b570SMateusz Piotrowski.Sm on 481100353cfSJakub Wojciech Klama.Pp 482100353cfSJakub Wojciech KlamaThe 483100353cfSJakub Wojciech Klama.Ar 9p-device-options 484100353cfSJakub Wojciech Klamaare: 485100353cfSJakub Wojciech Klama.Bl -tag -width 10n 4862d00b570SMateusz Piotrowski.It Cm ro 487100353cfSJakub Wojciech KlamaExpose the share in read-only mode. 488100353cfSJakub Wojciech Klama.El 489100353cfSJakub Wojciech Klama.Pp 4902fda01a1SMateusz PiotrowskiTTY device backends: 491b13e60daSPeter Grehan.Bl -tag -width 10n 4922fda01a1SMateusz Piotrowski.It Cm stdio 493b13e60daSPeter GrehanConnect the serial port to the standard input and output of 49484fe889cSChristian Bruefferthe 49584fe889cSChristian Brueffer.Nm 49684fe889cSChristian Bruefferprocess. 4972fda01a1SMateusz Piotrowski.It Ar /dev/xxx 498b13e60daSPeter GrehanUse the host TTY device for serial port I/O. 499b13e60daSPeter Grehan.El 500b13e60daSPeter Grehan.Pp 5012fda01a1SMateusz PiotrowskiBoot ROM device backends: 5029b1aa8d6SNeel Natu.Bl -tag -width 10n 503*866036f4SRebecca Cran.It Ar romfile Ns Op Cm \&, Ns Ar varfile 5049b1aa8d6SNeel NatuMap 5059b1aa8d6SNeel Natu.Ar romfile 5069b1aa8d6SNeel Natuin the guest address space reserved for boot firmware. 507*866036f4SRebecca CranIf 508*866036f4SRebecca Cran.Ar varfile 509*866036f4SRebecca Cranis provided, that file is also mapped in the boot firmware guest 510*866036f4SRebecca Cranaddress space, and any modifications the guest makes will be saved 511*866036f4SRebecca Cranto that file. 5129b1aa8d6SNeel Natu.El 5139b1aa8d6SNeel Natu.Pp 5142fda01a1SMateusz PiotrowskiPass-through device backends: 515b13e60daSPeter Grehan.Bl -tag -width 10n 5162fda01a1SMateusz Piotrowski.It Ns Ar slot Ns Cm \&/ Ns Ar bus Ns Cm \&/ Ns Ar function 517b13e60daSPeter GrehanConnect to a PCI device on the host at the selector described by 518b13e60daSPeter Grehan.Ar slot , 519b13e60daSPeter Grehan.Ar bus , 520b13e60daSPeter Grehanand 521b13e60daSPeter Grehan.Ar function 522b13e60daSPeter Grehannumbers. 523b13e60daSPeter Grehan.El 524b13e60daSPeter Grehan.Pp 5259b1aa8d6SNeel NatuGuest memory must be wired using the 5269b1aa8d6SNeel Natu.Fl S 5279b1aa8d6SNeel Natuoption when a pass-through device is configured. 5289b1aa8d6SNeel Natu.Pp 529b13e60daSPeter GrehanThe host device must have been reserved at boot-time using the 530a9258f9bSWarren Block.Va pptdevs 531b13e60daSPeter Grehanloader variable as described in 532b13e60daSPeter Grehan.Xr vmm 4 . 5335121b6ccSRoman Bogorodskiy.Pp 5343f4c771fSMateusz PiotrowskiVirtio console device backends: 5353f4c771fSMateusz Piotrowski.Bl -bullet 5363f4c771fSMateusz Piotrowski.Sm off 5373f4c771fSMateusz Piotrowski.It 5383f4c771fSMateusz 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 ... 5393f4c771fSMateusz Piotrowski.Sm on 5403f4c771fSMateusz Piotrowski.El 5413f4c771fSMateusz Piotrowski.Pp 5425121b6ccSRoman BogorodskiyA maximum of 16 ports per device can be created. 5435121b6ccSRoman BogorodskiyEvery port is named and corresponds to a Unix domain socket created by 5445121b6ccSRoman Bogorodskiy.Nm . 5455121b6ccSRoman Bogorodskiy.Nm 5465121b6ccSRoman Bogorodskiyaccepts at most one connection per port at a time. 5475121b6ccSRoman Bogorodskiy.Pp 5485121b6ccSRoman BogorodskiyLimitations: 5498d9fefe6SMateusz Piotrowski.Bl -bullet 5505121b6ccSRoman Bogorodskiy.It 5515121b6ccSRoman BogorodskiyDue to lack of destructors in 5525121b6ccSRoman Bogorodskiy.Nm , 5535121b6ccSRoman Bogorodskiysockets on the filesystem must be cleaned up manually after 5545121b6ccSRoman Bogorodskiy.Nm 5555121b6ccSRoman Bogorodskiyexits. 5565121b6ccSRoman Bogorodskiy.It 5573f4c771fSMateusz PiotrowskiThere is no way to use the 5583f4c771fSMateusz Piotrowski.Dq console port 5593f4c771fSMateusz Piotrowskifeature, nor the console port 5600ee3a4b4SRoman Bogorodskiyresize at present. 5615121b6ccSRoman Bogorodskiy.It 5620ee3a4b4SRoman BogorodskiyEmergency write is advertised, but no-op at present. 5635121b6ccSRoman Bogorodskiy.El 5646c87a2c0SGleb Smirnoff.Pp 565054accacSCorvin KöhneVirtio input device backends: 566054accacSCorvin Köhne.Bl -tag -width 10n 567054accacSCorvin Köhne.It Ar /dev/input/eventX 568054accacSCorvin KöhneSend input events of 569054accacSCorvin Köhne.Ar /dev/input/eventX 570054accacSCorvin Köhneto guest by VirtIO Input Interface. 571054accacSCorvin Köhne.El 572054accacSCorvin Köhne.Pp 5738b97e975SMateusz PiotrowskiFramebuffer devices backends: 5748b97e975SMateusz Piotrowski.Bl -bullet 5758b97e975SMateusz Piotrowski.Sm off 5768b97e975SMateusz Piotrowski.It 5778b97e975SMateusz Piotrowski.Op Cm rfb= Ar ip-and-port 5788b97e975SMateusz Piotrowski.Op Cm ,w= Ar width 5798b97e975SMateusz Piotrowski.Op Cm ,h= Ar height 5808b97e975SMateusz Piotrowski.Op Cm ,vga= Ar vgaconf 5818b97e975SMateusz Piotrowski.Op Cm ,wait 5828b97e975SMateusz Piotrowski.Op Cm ,password= Ar password 5838b97e975SMateusz Piotrowski.Sm on 5848b97e975SMateusz Piotrowski.El 5858b97e975SMateusz Piotrowski.Pp 5868b97e975SMateusz PiotrowskiConfiguration options are defined as follows: 5875c3ec676SGleb Smirnoff.Bl -tag -width 10n 5888b97e975SMateusz Piotrowski.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port 5898b97e975SMateusz PiotrowskiAn IP address and a port VNC should listen on. 5908b97e975SMateusz PiotrowskiThere are two formats: 5918b97e975SMateusz Piotrowski.Pp 5928b97e975SMateusz Piotrowski.Bl -bullet -compact 5938d9fefe6SMateusz Piotrowski.It 5948b97e975SMateusz Piotrowski.Sm off 5958b97e975SMateusz Piotrowski.Op Ar IPv4 Cm \&: 5965c3ec676SGleb Smirnoff.Ar port 5978b97e975SMateusz Piotrowski.Sm on 5988d9fefe6SMateusz Piotrowski.It 5998b97e975SMateusz Piotrowski.Sm off 6008b97e975SMateusz Piotrowski.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port 6018b97e975SMateusz Piotrowski.Sm on 6028b97e975SMateusz Piotrowski.El 6038b97e975SMateusz Piotrowski.Pp 6046c87a2c0SGleb SmirnoffThe default is to listen on localhost IPv4 address and default VNC port 5900. 6058883128bSBjoern A. ZeebAn IPv6 address must be enclosed in square brackets and may contain an 6067d9545fcSRodney W. Grimesoptional zone identifier. 6078b97e975SMateusz Piotrowski.It Cm w= Ns Ar width No and Cm h= Ns Ar height 6085c3ec676SGleb SmirnoffA display resolution, width and height, respectively. 6095c3ec676SGleb SmirnoffIf not specified, a default resolution of 1024x768 pixels will be used. 6105c3ec676SGleb SmirnoffMinimal supported resolution is 640x480 pixels, 6115c3ec676SGleb Smirnoffand maximum is 1920x1200 pixels. 6128b97e975SMateusz Piotrowski.It Cm vga= Ns Ar vgaconf 6135c3ec676SGleb SmirnoffPossible values for this option are 6148b97e975SMateusz Piotrowski.Cm io 6155c3ec676SGleb Smirnoff(default), 6168b97e975SMateusz Piotrowski.Cm on 6175c3ec676SGleb Smirnoff, and 6188b97e975SMateusz Piotrowski.Cm off . 6195c3ec676SGleb SmirnoffPCI graphics cards have a dual personality in that they are 6205c3ec676SGleb Smirnoffstandard PCI devices with BAR addressing, but may also 6215c3ec676SGleb Smirnoffimplicitly decode legacy VGA I/O space 6225c3ec676SGleb Smirnoff.Pq Ad 0x3c0-3df 6235c3ec676SGleb Smirnoffand memory space 6245c3ec676SGleb Smirnoff.Pq 64KB at Ad 0xA0000 . 6255c3ec676SGleb SmirnoffThe default 6268b97e975SMateusz Piotrowski.Cm io 6278d56c805SYuri Pankovoption should be used for guests that attempt to issue BIOS calls which result 6288d56c805SYuri Pankovin I/O port queries, and fail to boot if I/O decode is disabled. 6295c3ec676SGleb Smirnoff.Pp 6305c3ec676SGleb SmirnoffThe 6318b97e975SMateusz Piotrowski.Cm on 6325c3ec676SGleb Smirnoffoption should be used along with the CSM BIOS capability in UEFI 6335c3ec676SGleb Smirnoffto boot traditional BIOS guests that require the legacy VGA I/O and 6345c3ec676SGleb Smirnoffmemory regions to be available. 6355c3ec676SGleb Smirnoff.Pp 6365c3ec676SGleb SmirnoffThe 6378b97e975SMateusz Piotrowski.Cm off 6385c3ec676SGleb Smirnoffoption should be used for the UEFI guests that assume that 6395c3ec676SGleb SmirnoffVGA adapter is present if they detect the I/O ports. 6405c3ec676SGleb SmirnoffAn example of such a guest is 6415c3ec676SGleb Smirnoff.Ox 6425c3ec676SGleb Smirnoffin UEFI mode. 6435c3ec676SGleb Smirnoff.Pp 6445c3ec676SGleb SmirnoffPlease refer to the 6455c3ec676SGleb Smirnoff.Nm 6465c3ec676SGleb Smirnoff.Fx 6475c3ec676SGleb Smirnoffwiki page 6485c3ec676SGleb Smirnoff.Pq Lk https://wiki.freebsd.org/bhyve 6495c3ec676SGleb Smirnofffor configuration notes of particular guests. 6508b97e975SMateusz Piotrowski.It Cm wait 6515c3ec676SGleb SmirnoffInstruct 6525c3ec676SGleb Smirnoff.Nm 6538d56c805SYuri Pankovto only boot upon the initiation of a VNC connection, simplifying the 6548d56c805SYuri Pankovinstallation of operating systems that require immediate keyboard input. 6555c3ec676SGleb SmirnoffThis can be removed for post-installation use. 6568b97e975SMateusz Piotrowski.It Cm password= Ns Ar password 657f4d34383SMarcelo AraujoThis type of authentication is known to be cryptographically weak and is not 658f4d34383SMarcelo Araujointended for use on untrusted networks. 659f4d34383SMarcelo AraujoMany implementations will want to use stronger security, such as running 660f4d34383SMarcelo Araujothe session over an encrypted channel provided by IPsec or SSH. 6615c3ec676SGleb Smirnoff.El 6626c87a2c0SGleb Smirnoff.Pp 6636eff58acSMateusz PiotrowskixHCI USB device backends: 6645c3ec676SGleb Smirnoff.Bl -tag -width 10n 6656eff58acSMateusz Piotrowski.It Cm tablet 6665c3ec676SGleb SmirnoffA USB tablet device which provides precise cursor synchronization 6675c3ec676SGleb Smirnoffwhen using VNC. 6686c87a2c0SGleb Smirnoff.El 669c066c68cSMarcelo Araujo.Pp 6706eff58acSMateusz PiotrowskiNVMe device backends: 6716eff58acSMateusz Piotrowski.Bl -bullet 6726eff58acSMateusz Piotrowski.Sm off 6736eff58acSMateusz Piotrowski.It 6746eff58acSMateusz Piotrowski.Ar devpath 6756eff58acSMateusz Piotrowski.Op Cm ,maxq= Ar # 6766eff58acSMateusz Piotrowski.Op Cm ,qsz= Ar # 6776eff58acSMateusz Piotrowski.Op Cm ,ioslots= Ar # 6786eff58acSMateusz Piotrowski.Op Cm ,sectsz= Ar # 6796eff58acSMateusz Piotrowski.Op Cm ,ser= Ar # 6806eff58acSMateusz Piotrowski.Op Cm ,eui64= Ar # 6816eff58acSMateusz Piotrowski.Op Cm ,dsm= Ar opt 6826eff58acSMateusz Piotrowski.Sm on 6836eff58acSMateusz Piotrowski.El 6846eff58acSMateusz Piotrowski.Pp 6856eff58acSMateusz PiotrowskiConfiguration options are defined as follows: 686c066c68cSMarcelo Araujo.Bl -tag -width 10n 6876eff58acSMateusz Piotrowski.It Ar devpath 688c066c68cSMarcelo AraujoAccepted device paths are: 689c066c68cSMarcelo Araujo.Ar /dev/blockdev 690c066c68cSMarcelo Araujoor 691c066c68cSMarcelo Araujo.Ar /path/to/image 692c066c68cSMarcelo Araujoor 6936eff58acSMateusz Piotrowski.Cm ram= Ns Ar size_in_MiB . 6946eff58acSMateusz Piotrowski.It Cm maxq 695c066c68cSMarcelo AraujoMax number of queues. 6966eff58acSMateusz Piotrowski.It Cm qsz 697c066c68cSMarcelo AraujoMax elements in each queue. 6986eff58acSMateusz Piotrowski.It Cm ioslots 699c066c68cSMarcelo AraujoMax number of concurrent I/O requests. 7006eff58acSMateusz Piotrowski.It Cm sectsz 701c066c68cSMarcelo AraujoSector size (defaults to blockif sector size). 7026eff58acSMateusz Piotrowski.It Cm ser 703c066c68cSMarcelo AraujoSerial number with maximum 20 characters. 7046eff58acSMateusz Piotrowski.It Cm eui64 7056eff58acSMateusz PiotrowskiIEEE Extended Unique Identifier (8 byte value). 7066eff58acSMateusz Piotrowski.It Cm dsm 7076eff58acSMateusz PiotrowskiDataSet Management support. 7086eff58acSMateusz PiotrowskiSupported values are: 7096eff58acSMateusz Piotrowski.Cm auto , enable , 7106eff58acSMateusz Piotrowskiand 7116eff58acSMateusz Piotrowski.Cm disable . 712c066c68cSMarcelo Araujo.El 71336f9f044SWarner Losh.Pp 714d5fcc4b6SMateusz PiotrowskiAHCI device backends: 715d5fcc4b6SMateusz Piotrowski.Bl -bullet 716d5fcc4b6SMateusz Piotrowski.It 717d5fcc4b6SMateusz Piotrowski.Sm off 718d5fcc4b6SMateusz Piotrowski.Op Oo Cm hd\&: | cd\&: Oc Ar path 719d5fcc4b6SMateusz Piotrowski.Op Cm ,nmrr= Ar nmrr 720d5fcc4b6SMateusz Piotrowski.Op Cm ,ser= Ar # 721d5fcc4b6SMateusz Piotrowski.Op Cm ,rev= Ar # 722d5fcc4b6SMateusz Piotrowski.Op Cm ,model= Ar # 723d5fcc4b6SMateusz Piotrowski.Sm on 724d5fcc4b6SMateusz Piotrowski.El 725d5fcc4b6SMateusz Piotrowski.Pp 726d5fcc4b6SMateusz PiotrowskiConfiguration options are defined as follows: 7279af3bcd7SPeter Grehan.Bl -tag -width 10n 728d5fcc4b6SMateusz Piotrowski.It Cm nmrr 729d5fcc4b6SMateusz PiotrowskiNominal Media Rotation Rate, known as RPM. 730d5fcc4b6SMateusz PiotrowskiValue 1 will indicate device as Solid State Disk. 731d5fcc4b6SMateusz PiotrowskiDefault value is 0, not report. 732d5fcc4b6SMateusz Piotrowski.It Cm ser 7339af3bcd7SPeter GrehanSerial Number with maximum 20 characters. 734d5fcc4b6SMateusz Piotrowski.It Cm rev 7359af3bcd7SPeter GrehanRevision Number with maximum 8 characters. 736d5fcc4b6SMateusz Piotrowski.It Cm model 7379af3bcd7SPeter GrehanModel Number with maximum 40 characters. 7389af3bcd7SPeter Grehan.El 7399af3bcd7SPeter Grehan.Pp 740061f37d2SMateusz PiotrowskiHD Audio device backends: 741061f37d2SMateusz Piotrowski.Bl -bullet 742061f37d2SMateusz Piotrowski.It 743061f37d2SMateusz Piotrowski.Sm off 744061f37d2SMateusz Piotrowski.Op Cm play= Ar playback 745061f37d2SMateusz Piotrowski.Op Cm ,rec= Ar recording 746061f37d2SMateusz Piotrowski.Sm on 747061f37d2SMateusz Piotrowski.El 748061f37d2SMateusz Piotrowski.Pp 749061f37d2SMateusz PiotrowskiConfiguration options are defined as follows: 75036f9f044SWarner Losh.Bl -tag -width 10n 751061f37d2SMateusz Piotrowski.It Cm play 75236f9f044SWarner LoshPlayback device, typically 75336f9f044SWarner Losh.Ar /dev/dsp0 . 754061f37d2SMateusz Piotrowski.It Cm rec 75536f9f044SWarner LoshRecording device, typically 75636f9f044SWarner Losh.Ar /dev/dsp0 . 75736f9f044SWarner Losh.El 7585749449dSJohn Baldwin.It Fl U Ar uuid 7595749449dSJohn BaldwinSet the universally unique identifier 7605749449dSJohn Baldwin.Pq UUID 7615749449dSJohn Baldwinin the guest's System Management BIOS System Information structure. 7625749449dSJohn BaldwinBy default a UUID is generated from the host's hostname and 7635749449dSJohn Baldwin.Ar vmname . 764ccb1c87aSMateusz Piotrowski.It Fl u 765ccb1c87aSMateusz PiotrowskiRTC keeps UTC time. 766cde1f5b8SJohn Baldwin.It Fl W 767cde1f5b8SJohn BaldwinForce virtio PCI device emulations to use MSI interrupts instead of MSI-X 768cde1f5b8SJohn Baldwininterrupts. 769ccb1c87aSMateusz Piotrowski.It Fl w 770ccb1c87aSMateusz PiotrowskiIgnore accesses to unimplemented Model Specific Registers (MSRs). 771ccb1c87aSMateusz PiotrowskiThis is intended for debug purposes. 7729777ca20SNeel Natu.It Fl x 7739777ca20SNeel NatuThe guest's local APIC is configured in x2APIC mode. 774b100acf2SNeel Natu.It Fl Y 775b100acf2SNeel NatuDisable MPtable generation. 776b13e60daSPeter Grehan.It Ar vmname 777b13e60daSPeter GrehanAlphanumeric name of the guest. 778b13e60daSPeter GrehanThis should be the same as that created by 779b13e60daSPeter Grehan.Xr bhyveload 8 . 780b13e60daSPeter Grehan.El 781621b5090SJohn Baldwin.Sh CONFIGURATION VARIABLES 782621b5090SJohn Baldwin.Nm 783621b5090SJohn Baldwinuses an internal tree of configuration variables to describe global and 784621b5090SJohn Baldwinper-device settings. 785621b5090SJohn BaldwinWhen 786621b5090SJohn Baldwin.Nm 787621b5090SJohn Baldwinstarts, 788621b5090SJohn Baldwinit parses command line options (including config files) in the order given 789621b5090SJohn Baldwinon the command line. 790621b5090SJohn BaldwinEach command line option sets one or more configuration variables. 791621b5090SJohn BaldwinFor example, 792621b5090SJohn Baldwinthe 793621b5090SJohn Baldwin.Fl s 794621b5090SJohn Baldwinoption creates a new tree node for a PCI device and sets one or more variables 795621b5090SJohn Baldwinunder that node including the device model and device model-specific variables. 796621b5090SJohn BaldwinVariables may be set multiple times during this parsing stage with the final 797621b5090SJohn Baldwinvalue overriding previous values. 798621b5090SJohn Baldwin.Pp 799621b5090SJohn BaldwinOnce all of the command line options have been processed, 800621b5090SJohn Baldwinthe configuration values are frozen. 801621b5090SJohn Baldwin.Nm 802621b5090SJohn Baldwinthen uses the value of configuration values to initialize device models 803621b5090SJohn Baldwinand global settings. 804621b5090SJohn Baldwin.Pp 805621b5090SJohn BaldwinMore details on configuration variables can be found in 806621b5090SJohn Baldwin.Xr bhyve_config 5 . 807cd377eb3SJohn Baldwin.Sh DEBUG SERVER 808cd377eb3SJohn BaldwinThe current debug server provides limited support for debuggers. 809cd377eb3SJohn Baldwin.Ss Registers 810cd377eb3SJohn BaldwinEach virtual CPU is exposed to the debugger as a thread. 811cd377eb3SJohn Baldwin.Pp 812cd377eb3SJohn BaldwinGeneral purpose registers can be queried for each virtual CPU, but other 813cd377eb3SJohn Baldwinregisters such as floating-point and system registers cannot be queried. 814cd377eb3SJohn Baldwin.Ss Memory 815976ba8c6SJohn BaldwinMemory (including memory mapped I/O regions) can be read and written by the debugger. 8168d56c805SYuri PankovMemory operations use virtual addresses that are resolved to physical addresses 8178d56c805SYuri Pankovvia the current virtual CPU's active address translation. 818cd377eb3SJohn Baldwin.Ss Control 819cd377eb3SJohn BaldwinThe running guest can be interrupted by the debugger at any time 820cd377eb3SJohn Baldwin.Pq for example, by pressing Ctrl-C in the debugger . 821cd377eb3SJohn Baldwin.Pp 822cd377eb3SJohn BaldwinSingle stepping is only supported on Intel CPUs supporting the MTRAP VM exit. 823cd377eb3SJohn Baldwin.Pp 824cbd03a9dSJohn BaldwinBreakpoints are supported on Intel CPUs that support single stepping. 825cbd03a9dSJohn BaldwinNote that continuing from a breakpoint while interrupts are enabled in the 826cbd03a9dSJohn Baldwinguest may not work as expected due to timer interrupts firing while single 827cbd03a9dSJohn Baldwinstepping over the breakpoint. 828c2202d41SRoman Bogorodskiy.Sh SIGNAL HANDLING 829c2202d41SRoman Bogorodskiy.Nm 830c2202d41SRoman Bogorodskiydeals with the following signals: 831c2202d41SRoman Bogorodskiy.Pp 8323357e948SMateusz Piotrowski.Bl -tag -width SIGTERM -compact 833c2202d41SRoman Bogorodskiy.It SIGTERM 834c2202d41SRoman BogorodskiyTrigger ACPI poweroff for a VM 835c2202d41SRoman Bogorodskiy.El 836c2202d41SRoman Bogorodskiy.Sh EXIT STATUS 837c2202d41SRoman BogorodskiyExit status indicates how the VM was terminated: 838c2202d41SRoman Bogorodskiy.Pp 839c2202d41SRoman Bogorodskiy.Bl -tag -width indent -compact 840c2202d41SRoman Bogorodskiy.It 0 841c2202d41SRoman Bogorodskiyrebooted 842c2202d41SRoman Bogorodskiy.It 1 843c2202d41SRoman Bogorodskiypowered off 844c2202d41SRoman Bogorodskiy.It 2 845c2202d41SRoman Bogorodskiyhalted 846c2202d41SRoman Bogorodskiy.It 3 847c2202d41SRoman Bogorodskiytriple fault 848989e062bSMarcelo Araujo.It 4 849989e062bSMarcelo Araujoexited due to an error 850c2202d41SRoman Bogorodskiy.El 851b13e60daSPeter Grehan.Sh EXAMPLES 8525c3ec676SGleb SmirnoffIf not using a boot ROM, the guest operating system must have been loaded with 85384fe889cSChristian Brueffer.Xr bhyveload 8 854b13e60daSPeter Grehanor a similar boot loader before 855b13e60daSPeter Grehan.Xr bhyve 4 856b13e60daSPeter Grehancan be run. 8575c3ec676SGleb SmirnoffOtherwise, the boot loader is not needed. 858b13e60daSPeter Grehan.Pp 859b13e60daSPeter GrehanTo run a virtual machine with 1GB of memory, two virtual CPUs, a virtio 860b13e60daSPeter Grehanblock device backed by the 861b13e60daSPeter Grehan.Pa /my/image 862b13e60daSPeter Grehanfilesystem image, and a serial port for the console: 863b13e60daSPeter Grehan.Bd -literal -offset indent 864b13e60daSPeter Grehanbhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ 865b13e60daSPeter Grehan -l com1,stdio -A -H -P -m 1G vm1 866b13e60daSPeter Grehan.Ed 867b13e60daSPeter Grehan.Pp 868b13e60daSPeter GrehanRun a 24GB single-CPU virtual machine with three network ports, one of which 869b13e60daSPeter Grehanhas a MAC address specified: 870b13e60daSPeter Grehan.Bd -literal -offset indent 871b13e60daSPeter Grehanbhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \\ 872b13e60daSPeter Grehan -s 2:1,virtio-net,tap1 \\ 873b13e60daSPeter Grehan -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \\ 874b13e60daSPeter Grehan -s 3,virtio-blk,/my/image -l com1,stdio \\ 875b13e60daSPeter Grehan -A -H -P -m 24G bigvm 876b13e60daSPeter Grehan.Ed 877b13e60daSPeter Grehan.Pp 878b13e60daSPeter GrehanRun an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI 879b13e60daSPeter GrehanCD-ROM, a single virtio network port, an AMD hostbridge, and the console 880b13e60daSPeter Grehanport connected to an 881b13e60daSPeter Grehan.Xr nmdm 4 88284fe889cSChristian Brueffernull-modem device. 883b13e60daSPeter Grehan.Bd -literal -offset indent 884a7ab1463SAlexander Motinbhyve -c 4 \\ 885b13e60daSPeter Grehan -s 0,amd_hostbridge -s 1,lpc \\ 886098f5155SAlexander Motin -s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\ 887098f5155SAlexander Motinhd:/images/disk.3,hd:/images/disk.4,\\ 888098f5155SAlexander Motinhd:/images/disk.5,hd:/images/disk.6,\\ 889098f5155SAlexander Motinhd:/images/disk.7,hd:/images/disk.8,\\ 890098f5155SAlexander Motincd:/images/install.iso \\ 891b13e60daSPeter Grehan -s 3,virtio-net,tap0 \\ 892b13e60daSPeter Grehan -l com1,/dev/nmdm0A \\ 893b13e60daSPeter Grehan -A -H -P -m 8G 894b13e60daSPeter Grehan.Ed 8955c3ec676SGleb Smirnoff.Pp 8965c3ec676SGleb SmirnoffRun a UEFI virtual machine with a display resolution of 800 by 600 pixels 8975c3ec676SGleb Smirnoffthat can be accessed via VNC at: 0.0.0.0:5900. 8985c3ec676SGleb Smirnoff.Bd -literal -offset indent 8995c3ec676SGleb Smirnoffbhyve -c 2 -m 4G -w -H \\ 9005c3ec676SGleb Smirnoff -s 0,hostbridge \\ 9015c3ec676SGleb Smirnoff -s 3,ahci-cd,/path/to/uefi-OS-install.iso \\ 9025c3ec676SGleb Smirnoff -s 4,ahci-hd,disk.img \\ 9035c3ec676SGleb Smirnoff -s 5,virtio-net,tap0 \\ 9045c3ec676SGleb Smirnoff -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\ 9055c3ec676SGleb Smirnoff -s 30,xhci,tablet \\ 9065c3ec676SGleb Smirnoff -s 31,lpc -l com1,stdio \\ 9075c3ec676SGleb Smirnoff -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ 9085c3ec676SGleb Smirnoff uefivm 9095c3ec676SGleb Smirnoff.Ed 9108883128bSBjoern A. Zeeb.Pp 9118883128bSBjoern A. ZeebRun a UEFI virtual machine with a VNC display that is bound to all IPv6 9128883128bSBjoern A. Zeebaddresses on port 5900. 9138883128bSBjoern A. Zeeb.Bd -literal -offset indent 9148883128bSBjoern A. Zeebbhyve -c 2 -m 4G -w -H \\ 9158883128bSBjoern A. Zeeb -s 0,hostbridge \\ 9168883128bSBjoern A. Zeeb -s 4,ahci-hd,disk.img \\ 9178883128bSBjoern A. Zeeb -s 5,virtio-net,tap0 \\ 9188883128bSBjoern A. Zeeb -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\ 9198883128bSBjoern A. Zeeb -s 30,xhci,tablet \\ 9208883128bSBjoern A. Zeeb -s 31,lpc -l com1,stdio \\ 9218883128bSBjoern A. Zeeb -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ 9228883128bSBjoern A. Zeeb uefivm 9238883128bSBjoern A. Zeeb.Ed 924*866036f4SRebecca Cran.Pp 925*866036f4SRebecca CranRun a UEFI virtual machine with a VARS file to save EFI variables. 926*866036f4SRebecca CranNote that 927*866036f4SRebecca Cran.Nm 928*866036f4SRebecca Cranwill write guest modifications to the given VARS file. 929*866036f4SRebecca CranBe sure to create a per-guest copy of the template VARS file from 930*866036f4SRebecca Cran.Pa /usr . 931*866036f4SRebecca Cran.Bd -literal -offset indent 932*866036f4SRebecca Cranbhyve -c 2 -m 4g -w -H \\ 933*866036f4SRebecca Cran -s 0,hostbridge \\ 934*866036f4SRebecca Cran -s 31,lpc -p com1,stdio \\ 935*866036f4SRebecca Cran -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd 936*866036f4SRebecca Cran uefivm 937*866036f4SRebecca Cran.Ed 938b13e60daSPeter Grehan.Sh SEE ALSO 939b13e60daSPeter Grehan.Xr bhyve 4 , 940e90337e4SAleksandr Fedorov.Xr netgraph 4 , 941e90337e4SAleksandr Fedorov.Xr ng_socket 4 , 942b13e60daSPeter Grehan.Xr nmdm 4 , 943b13e60daSPeter Grehan.Xr vmm 4 , 944621b5090SJohn Baldwin.Xr bhyve_config 5 , 945b13e60daSPeter Grehan.Xr ethers 5 , 94605f7cd8bSJoel Dahl.Xr bhyvectl 8 , 94705f7cd8bSJoel Dahl.Xr bhyveload 8 9488d56c805SYuri Pankov.Pp 9498d56c805SYuri Pankov.Rs 9508d56c805SYuri Pankov.%A Intel 9518d56c805SYuri Pankov.%B 64 and IA-32 Architectures Software Developer’s Manual 9528d56c805SYuri Pankov.%V Volume 3 9538d56c805SYuri Pankov.Re 954b13e60daSPeter Grehan.Sh HISTORY 955b13e60daSPeter Grehan.Nm 956b13e60daSPeter Grehanfirst appeared in 957b13e60daSPeter Grehan.Fx 10.0 . 958b13e60daSPeter Grehan.Sh AUTHORS 95901c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@freebsd.org 96001c2b8acSBaptiste Daroussin.An Peter Grehan Aq Mt grehan@freebsd.org 961