1.\" Copyright (c) 2013 Peter Grehan 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" Portions Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 26.\" 27.Dd February 26, 2022 28.Dt BHYVE 8 29.Os 30.Sh NAME 31.Nm bhyve 32.Nd "run a guest operating system inside a virtual machine" 33.Sh SYNOPSIS 34.Nm 35.Op Fl aCDdeHhPSuWwxY 36.Oo 37.Sm off 38.Fl c\~ 39.Oo 40.Op Cm cpus= 41.Ar numcpus 42.Oc 43.Op Cm ,sockets= Ar n 44.Op Cm ,cores= Ar n 45.Op Cm ,threads= Ar n 46.Oc 47.Sm on 48.Oo 49.Sm off 50.Fl G\~ 51.Oo Ar w Oc 52.Oo Ar bind_address Cm \&: Oc 53.Ar port 54.Oc 55.Sm on 56.Oo Fl B 57.Sm off 58.Ar type Ns \&, 59.Op Ar key Ns = Ns Ar value 60.Oo \&, Ns Ar key Ns = Ns Ar value Ns Oc \&... 61.Oc 62.Sm on 63.Op Fl k Ar config_file 64.Oo Fl l 65.Sm off 66.Ar lpcdev Op Cm \&, Ar conf 67.Sm on 68.Oc 69.Sm off 70.Oo Fl m\~ 71.Ar memsize 72.Oo 73.Cm K | k | M | m | G | g | T | t 74.Oc 75.Sm on 76.Oc 77.Op Fl o Ar var Ns Cm = Ns Ar value 78.Op Fl r Ar file 79.Sm off 80.Oo Fl s\~ 81.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf 82.Sm on 83.Oc 84.Op Fl U Ar uuid 85.Ar vmname 86.Nm 87.Fl l Cm help 88.Nm 89.Fl s Cm help 90.Sh DESCRIPTION 91.Nm 92is a hypervisor that runs guest operating systems inside a 93virtual machine. 94.Pp 95Parameters such as the number of virtual CPUs, amount of guest memory, and 96I/O connectivity can be specified with command-line parameters. 97.Pp 98.Nm 99runs until the guest operating system reboots or an unhandled hypervisor 100exit is detected. 101.Sh OPTIONS 102.Bl -tag -width 10n 103.It Fl a 104The guest's local APIC is configured in xAPIC mode. 105The xAPIC mode is the default setting so this option is redundant. 106It will be deprecated in a future version. 107.It Xo 108.Fl B 109.Sm off 110.Ar type Ns \&, 111.Op Ar key Ns = Ns Ar value 112.Oo \&, Ns Ar key Ns = Ns Ar value Ns Oc \&... 113.Sm on 114.Xc 115Configure smbios data. 116.Ar type 117must be set to 118.Sy 1 . 119Supported keys are: 120.Sy manufacturer , 121.Sy product , 122.Sy version , 123.Sy serial , 124.Sy sku , 125.Sy family 126and 127.Sy uuid . 128.It Xo Fl c 129.Sm off 130.Op Oo Cm cpus= Oc Ar numcpus 131.Op Cm ,sockets= Ar n 132.Op Cm ,cores= Ar n 133.Op Cm ,threads= Ar n 134.Xc 135.Sm on 136Number of guest virtual CPUs 137and/or the CPU topology. 138The default value for each of 139.Ar numcpus , 140.Ar sockets , 141.Ar cores , 142and 143.Ar threads 144is 1. 145The current maximum number of guest virtual CPUs is 32. 146If 147.Ar numcpus 148is not specified then it will be calculated from the other arguments. 149The topology must be consistent in that the 150.Ar numcpus 151must equal the product of 152.Ar sockets , 153.Ar cores , 154and 155.Ar threads . 156If a 157.Ar setting 158is specified more than once the last one has precedence. 159.It Fl C 160Include guest memory in core file. 161.It Fl D 162Destroy the VM on guest initiated power-off. 163.It Fl d 164Suspend CPUs at boot. 165.It Fl e 166Force 167.Nm 168to exit when a guest issues an access to an I/O port that is not emulated. 169This is intended for debug purposes. 170.It Fl G Xo 171.Sm off 172.Oo Ar w Oc 173.Oo Ar bind_address Cm \&: Oc 174.Ar port 175.Sm on 176.Xc 177Start a debug server that uses the GDB protocol to export guest state to a 178debugger. 179An IPv4 TCP socket will be bound to the supplied 180.Ar bind_address 181and 182.Ar port 183to listen for debugger connections. 184Only a single debugger may be attached to the debug server at a time. 185If the option begins with 186.Sq w , 187.Nm 188will pause execution at the first instruction waiting for a debugger to attach. 189.It Fl H 190Yield the virtual CPU thread when a HLT instruction is detected. 191If this option is not specified, virtual CPUs will use 100% of a host CPU. 192.It Fl h 193Print help message and exit. 194.It Fl k Ar config_file 195Set configuration variables from a simple, key-value config file. 196Each line of the config file is expected to consist of a config variable 197name, an equals sign 198.Pq Sq = , 199and a value. 200No spaces are permitted between the variable name, equals sign, or 201value. 202Blank lines and lines starting with 203.Sq # 204are ignored. 205See 206.Xr bhyve_config 5 207for more details. 208.It Fl l Cm help 209Print a list of supported LPC devices. 210.It Fl l Ar lpcdev Ns Op \&, Ns Ar conf 211Allow devices behind the LPC PCI-ISA bridge to be configured. 212The only supported devices are the TTY-class devices 213.Cm com1 , com2 , com3 214and 215.Cm com4 , 216the boot ROM device 217.Cm bootrom , 218and the debug/test device 219.Cm pc-testdev . 220.Pp 221The possible values for the 222.Ar conf 223argument are listed in the 224.Fl s 225flag description. 226.It Xo 227.Fl m Ar memsize Ns Oo 228.Sm off 229.Cm K | k | M | m | G | g | T | t 230.Sm on 231.Oc 232.Xc 233Set the guest physical memory size. 234The size argument may be suffixed with one of 235.Cm K , M , G 236or 237.Cm T 238.Pq either upper or lower case 239to indicate a multiple of kibibytes, mebibytes, gibibytes, or tebibytes. 240If no suffix is given, the value is assumed to be in mebibytes. 241.Pp 242The default is 256MiB. 243.It Fl o Ar var Ns Cm = Ns Ar value 244Set the configuration variable 245.Ar var 246to 247.Ar value . 248.It Fl P 249Force the guest virtual CPU to exit when a PAUSE instruction is detected. 250.It Fl S 251Wire guest memory. 252.It Fl s Cm help 253Print a list of supported PCI devices. 254.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf 255Configure a virtual PCI slot and function. 256.Pp 257.Nm 258provides PCI bus emulation and virtual devices that can be attached to 259slots on the bus. 260There are 32 available slots, with the option of providing up to 8 functions 261per slot. 262.Pp 263The 264.Ar slot 265can be specified in one of the following formats: 266.Pp 267.Bl -bullet -compact 268.It 269.Ar pcislot 270.It 271.Sm off 272.Ar pcislot Cm \&: Ar function 273.Sm on 274.It 275.Sm off 276.Ar bus Cm \&: Ar pcislot Cm \&: Ar function 277.Sm on 278.El 279.Pp 280The 281.Ar pcislot 282value is 0 to 31. 283The optional 284.Ar function 285value is 0 to 7. 286The optional 287.Ar bus 288value is 0 to 255. 289If not specified, the 290.Ar function 291value defaults to 0. 292If not specified, the 293.Ar bus 294value defaults to 0. 295.Pp 296The 297.Ar emulation 298argument can be one of the following: 299.Bl -tag -width "amd_hostbridge" 300.It Cm hostbridge 301A simple host bridge. 302This is usually configured at slot 0, and is required by most guest 303operating systems. 304.It Cm amd_hostbridge 305Emulation identical to 306.Cm hostbridge 307but using a PCI vendor ID of AMD. 308.It Cm passthru 309PCI pass-through device. 310.It Cm virtio-net-viona 311Accelerated Virtio network interface. 312.It Cm virtio-net 313Legacy Virtio network interface. 314.It Cm virtio-blk 315Virtio block storage interface. 316.It Cm virtio-9p 317Virtio 9p (VirtFS) interface. 318.It Cm virtio-rnd 319Virtio random number generator interface. 320.It Cm virtio-console 321Virtio console interface, which exposes multiple ports 322to the guest in the form of simple char devices for simple IO 323between the guest and host userspaces. 324.It Cm ahci 325AHCI controller attached to arbitrary devices. 326.It Cm ahci-cd 327AHCI controller attached to an ATAPI CD/DVD. 328.It Cm ahci-hd 329AHCI controller attached to a SATA hard drive. 330.It Cm e1000 331Intel e82545 network interface. 332.It Cm uart 333PCI 16550 serial device. 334.It Cm lpc 335LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, 336a boot ROM, and, optionally, the debug/test device. 337The LPC bridge emulation can only be configured on bus 0. 338.It Cm fbuf 339Raw framebuffer device attached to VNC server. 340.It Cm xhci 341eXtensible Host Controller Interface (xHCI) USB controller. 342.It Cm nvme 343NVM Express (NVMe) controller. 344.El 345.Pp 346The optional parameter 347.Ar conf 348describes the backend for device emulations. 349If 350.Ar conf 351is not specified, the device emulation has no backend and can be 352considered unconnected. 353.Pp 354.Sy Host Bridge Devices 355.Bl -tag -width 10n 356.It Cm model Ns = Ns Ar model 357Specify a hostbridge model to emulate. 358Valid model strings, and their associated vendor and device IDs are: 359.Sy amd Pq 0x1022/0x7432 , 360.Sy netapp Pq 0x1275/0x1275 , 361.Sy i440fx Pq 0x8086/0x1237 362and 363.Sy q35 Pq 0x8086/0x29b0 . 364The default value of 365.Ar model 366is 367.Cm netapp . 368.It Cm vendor Ns = Ns Ar vendor 369PCI vendor ID. 370.It Cm devid Ns = Ns Ar devid 371PCI device ID. 372.El 373.Pp 374Providing extra configuration parameters for a host bridge is optional, but if 375parameters are provided then either 376.Va model 377by itself, or both of 378.Va vendor 379and 380.Va devid 381must be specified. 382.Pp 383.Sy Accelerated Virtio Network Backends : 384.Bl -tag -width 10n 385.It Oo Cm vnic Ns = Oc Ns Ar vnic Ns Oo , Ns Cm feature_mask Ns = Ns Ar mask Oc 386.Pp 387.Ar vnic 388is the name of a configured virtual NIC on the system. 389.Ar mask 390is applied to the virtio feature flags which are advertised to the guest. 391Bits set in the 392.Ar mask 393value are removed from the advertised features. 394.El 395.Pp 396.Sy Other Network Backends : 397.Bl -tag -width 10n 398.It Oo Cm vnic Ns = Oc Ns Ar vnic Ns Oo , Ns Ar network-backend-options Oc 399.Pp 400.Ar vnic 401is the name of a configured virtual NIC on the system. 402.El 403.Pp 404The 405.Ar network-backend-options 406are: 407.Bl -tag -width 8n 408.It Cm promiscphys 409Enable promiscuous mode at the physical level (default: false) 410.It Cm promiscsap 411Enable promiscuous mode at the SAP level (default: true) 412.It Cm promiscmulti 413Enable promiscuous mode for all multicast addresses (default: true) 414.It Cm promiscrxonly 415The selected promiscuous modes are only enabled for received traffic 416(default: true). 417.El 418.Pp 419.Sy Block storage device backends : 420.Sm off 421.Bl -bullet 422.It 423.Pa /filename Op Cm \&, Ar block-device-options 424.It 425.Pa /dev/xxx Op Cm \&, Ar block-device-options 426.El 427.Sm on 428.Pp 429The 430.Ar block-device-options 431are: 432.Bl -tag -width 10n 433.It Cm nocache 434Open the file with 435.Dv O_DIRECT . 436.It Cm direct 437Open the file using 438.Dv O_SYNC . 439.It Cm ro 440Force the file to be opened read-only. 441.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc 442Specify the logical and physical sector sizes of the emulated disk. 443The physical sector size is optional and is equal to the logical sector size 444if not explicitly specified. 445.It Cm nodelete 446Disable emulation of guest trim requests via 447.Dv DIOCGDELETE 448requests. 449.El 450.Pp 451.Sy 9P device backends : 452.Sm off 453.Bl -bullet 454.It 455.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options 456.El 457.Sm on 458.Pp 459The 460.Ar 9p-device-options 461are: 462.Bl -tag -width 10n 463.It Cm ro 464Expose the share in read-only mode. 465.El 466.Pp 467.Sy TTY device backends : 468.Bl -tag -width 10n 469.It Cm stdio 470Connect the serial port to the standard input and output of 471the 472.Nm 473process. 474.It Pa /dev/xxx 475Use the host TTY device for serial port I/O. 476.El 477.Pp 478.Sy Boot ROM device backends : 479.Bl -tag -width 10n 480.It Pa romfile Ns Op Cm \&, Ns Ar varfile 481Map 482.Ar romfile 483in the guest address space reserved for boot firmware. 484If 485.Ar varfile 486is provided, that file is also mapped in the boot firmware guest 487address space, and any modifications the guest makes will be saved 488to that file. 489.El 490.Pp 491.Sy Pass-through device backends : 492.Bl -tag -width 10n 493.It Pa /dev/ppt Ns Ar N 494Connect to a PCI device on the host identified by the specified path. 495.El 496.Pp 497Guest memory must be wired using the 498.Fl S 499option when a pass-through device is configured. 500.Pp 501The host device must have been previously attached to the 502.Sy ppt 503driver. 504.Pp 505.Sy Virtio console device backends : 506.Bl -bullet 507.Sm off 508.It 509.Cm port1= Ns Ar /path/to/port1.sock Ns 510.Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ... 511.Sm on 512.El 513.Pp 514A maximum of 16 ports per device can be created. 515Every port is named and corresponds to a UNIX domain socket created by 516.Nm . 517.Nm 518accepts at most one connection per port at a time. 519.Pp 520Limitations: 521.Bl -bullet 522.It 523Due to lack of destructors in 524.Nm , 525sockets on the filesystem must be cleaned up manually after 526.Nm 527exits. 528.It 529There is no way to use the 530.Dq console port 531feature, nor the console port resize at present. 532.It 533Emergency write is advertised, but no-op at present. 534.El 535.Pp 536.Sy Framebuffer device backends : 537.Bl -bullet 538.Sm off 539.It 540.Op Cm rfb= Ar ip-and-port 541.Op Cm ,w= Ar width 542.Op Cm ,h= Ar height 543.Op Cm ,vga= Ar vgaconf 544.Op Cm ,wait 545.Op Cm ,password= Ar password 546.Sm on 547.El 548.Pp 549Configuration options are defined as follows: 550.Bl -tag -width 10n 551.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port 552An IP address and a port VNC should listen on. 553There are two formats: 554.Pp 555.Bl -bullet -compact 556.It 557.Sm off 558.Op Ar IPv4 Cm \&: 559.Ar port 560.Sm on 561.It 562.Sm off 563.Cm \&[ Ar IPv6 Cm \&] Cm \&: Ar port 564.Sm on 565.El 566.Pp 567The default is to listen on localhost IPv4 address and default VNC port 5900. 568An IPv6 address must be enclosed in square brackets. 569.It Cm unix Ns = Ns Ar path 570The path to a UNIX socket which will be created and where 571.Nm 572will accept VNC connections. 573.It Cm w= Ns Ar width No and Cm h= Ns Ar height 574A display resolution, width and height, respectively. 575If not specified, a default resolution of 1024x768 pixels will be used. 576Minimal supported resolution is 640x480 pixels, 577and maximum is 1920x1200 pixels. 578.It Cm vga= Ns Ar vgaconf 579Possible values for this option are 580.Cm io 581(default), 582.Cm on 583, and 584.Cm off . 585PCI graphics cards have a dual personality in that they are 586standard PCI devices with BAR addressing, but may also 587implicitly decode legacy VGA I/O space 588.Pq Ad 0x3c0-3df 589and memory space 590.Pq 64KB at Ad 0xA0000 . 591The default 592.Cm io 593option should be used for guests that attempt to issue BIOS calls which result 594in I/O port queries, and fail to boot if I/O decode is disabled. 595.Pp 596The 597.Cm on 598option should be used along with the CSM BIOS capability in UEFI 599to boot traditional BIOS guests that require the legacy VGA I/O and 600memory regions to be available. 601.Pp 602The 603.Cm off 604option should be used for the UEFI guests that assume that 605VGA adapter is present if they detect the I/O ports. 606An example of such a guest is 607.Ox 608in UEFI mode. 609.It Cm wait 610Instruct 611.Nm 612to only boot upon the initiation of a VNC connection, simplifying the 613installation of operating systems that require immediate keyboard input. 614This can be removed for post-installation use. 615.It Cm password= Ns Ar password 616This type of authentication is known to be cryptographically weak and is not 617intended for use on untrusted networks. 618Many implementations will want to use stronger security, such as running 619the session over an encrypted channel provided by IPsec or SSH. 620.El 621.Pp 622.Sy xHCI USB device backends : 623.Bl -tag -width 10n 624.It Cm tablet 625A USB tablet device which provides precise cursor synchronization 626when using VNC. 627.El 628.Pp 629.Sy NVMe device backends : 630.Bl -bullet 631.Sm off 632.It 633.Ar devpath 634.Op Cm ,maxq= Ar # 635.Op Cm ,qsz= Ar # 636.Op Cm ,ioslots= Ar # 637.Op Cm ,sectsz= Ar # 638.Op Cm ,ser= Ar # 639.Op Cm ,eui64= Ar # 640.Op Cm ,dsm= Ar opt 641.Sm on 642.El 643.Pp 644Configuration options are defined as follows: 645.Bl -tag -width 10n 646.It Ar devpath 647Accepted device paths are: 648.Ar /dev/blockdev 649or 650.Ar /path/to/image 651or 652.Cm ram= Ns Ar size_in_MiB . 653.It Cm maxq 654Max number of queues. 655.It Cm qsz 656Max elements in each queue. 657.It Cm ioslots 658Max number of concurrent I/O requests. 659.It Cm sectsz 660Sector size (defaults to blockif sector size). 661.It Cm ser 662Serial number with maximum 20 characters. 663.It Cm eui64 664IEEE Extended Unique Identifier (8 byte value). 665.It Cm dsm 666DataSet Management support. 667Supported values are: 668.Cm auto , enable , 669and 670.Cm disable . 671.El 672.Pp 673.Sy AHCI device backends : 674.Bl -bullet 675.It 676.Sm off 677.Op Oo Cm hd\&: | cd\&: Oc Ar path 678.Op Cm ,nmrr= Ar nmrr 679.Op Cm ,ser= Ar # 680.Op Cm ,rev= Ar # 681.Op Cm ,model= Ar # 682.Sm on 683.El 684.Pp 685Configuration options are defined as follows: 686.Bl -tag -width 10n 687.It Cm nmrr 688Nominal Media Rotation Rate, known as RPM. 689Value 1 will indicate device as Solid State Disk. 690Default value is 0, not report. 691.It Cm ser 692Serial Number with maximum 20 characters. 693.It Cm rev 694Revision Number with maximum 8 characters. 695.It Cm model 696Model Number with maximum 40 characters. 697.El 698.It Fl U Ar uuid 699Set the universally unique identifier 700.Pq UUID 701in the guest's System Management BIOS System Information structure. 702By default a UUID is generated from the host's hostname and 703.Ar vmname . 704.It Fl u 705RTC keeps UTC time. 706.It Fl W 707Force virtio PCI device emulations to use MSI interrupts instead of MSI-X 708interrupts. 709.It Fl w 710Ignore accesses to unimplemented Model Specific Registers (MSRs). 711This is intended for debug purposes. 712.It Fl x 713The guest's local APIC is configured in x2APIC mode. 714.It Fl Y 715Disable MPtable generation. 716.It Ar vmname 717Alphanumeric name of the guest. 718.El 719.Sh CONFIGURATION VARIABLES 720.Nm 721uses an internal tree of configuration variables to describe global and 722per-device settings. 723When 724.Nm 725starts, 726it parses command line options (including config files) in the order given 727on the command line. 728Each command line option sets one or more configuration variables. 729For example, 730the 731.Fl s 732option creates a new tree node for a PCI device and sets one or more variables 733under that node including the device model and device model-specific variables. 734Variables may be set multiple times during this parsing stage with the final 735value overriding previous values. 736.Pp 737Once all of the command line options have been processed, 738the configuration values are frozen. 739.Nm 740then uses the value of configuration values to initialize device models 741and global settings. 742.Pp 743More details on configuration variables can be found in 744.Xr bhyve_config 5 . 745.Sh SIGNAL HANDLING 746.Nm 747deals with the following signals: 748.Pp 749.Bl -tag -width SIGTERM -compact 750.It SIGTERM 751Trigger ACPI poweroff for a VM 752.El 753.Sh EXIT STATUS 754Exit status indicates how the VM was terminated: 755.Pp 756.Bl -tag -width indent -compact 757.It 0 758rebooted 759.It 1 760powered off 761.It 2 762halted 763.It 3 764triple fault 765.It 4 766exited due to an error 767.El 768.Sh EXAMPLES 769To run a virtual machine with 1GB of memory, two virtual CPUs, a virtio 770block device backed by the 771.Pa /my/image 772filesystem image, and a serial port for the console: 773.Bd -literal -offset indent 774bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \e 775 -l com1,stdio -H -P -m 1G vm1 776.Ed 777.Pp 778Run a 24GB single-CPU virtual machine with three network ports. 779.Bd -literal -offset indent 780bhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net-viona,vmvnic0 \e 781 -s 2:1,virtio-net-viona,vmvnic1 -s 2:2,virtio-net-viona,vmvnic2 \e 782 -s 3,virtio-blk,/my/image -l com1,stdio \e 783 -H -P -m 24G bigvm 784.Ed 785.Pp 786Run an 8GB virtual machine with 2 quad core CPUs, 2 NVMe disks and one other 787disk attached as a Virtio block device, an AHCI ATAPI CD-ROM, a single viona 788network port, an i440fx hostbridge, and the console port connected to a socket. 789.Bd -literal -offset indent 790bhyve -c sockets=2,cores=4,threads=2 \e 791 -s 0,hostbridge,model=i440fx -s 1,lpc \e 792 -s 1:0,nvme,/dev/zvol/rdsk/tank/hdd0 \e 793 -s 1:1,nvme,/dev/zvol/rdsk/tank/hdd1 \e 794 -s 1:2,virtio-blk,/dev/zvol/rdsk/tank/hdd1 \e 795 -s 2:0,ahci,cd:/images/install.iso \e 796 -s 3,virtio-net-viona,vnic=vmvnic0 \e 797 -l com1,socket,/tmp/vm.com1,wait \e 798 -H -P -m 8G 799.Ed 800.Pp 801Run a UEFI virtual machine with a display resolution of 800 by 600 pixels 802that can be accessed via VNC at: 0.0.0.0:5900. 803.Bd -literal -offset indent 804bhyve -c 2 -m 4G -w -H \e 805 -s 0,hostbridge \e 806 -s 3,ahci-cd,/path/to/uefi-OS-install.iso \e 807 -s 4,nvme,/dev/zvol/rdsk/tank/hdd0 \e 808 -s 5,virtio-net-viona,vnic=vnmic0 \e 809 -s 29,fbuf,vga=off,rfb=0.0.0.0:5900,w=800,h=600,wait \e 810 -s 30,xhci,tablet \e 811 -s 31,lpc -l com1,stdio \e 812 -l bootrom,/usr/share/bhyve/firmware/BHYVE_UEFI.fd \e 813 uefivm 814.Ed 815.Pp 816Run a UEFI virtual machine with a VARS file to save EFI variables. 817Note that 818.Nm 819will write guest modifications to the given VARS file. 820Be sure to create a per-guest copy of the template VARS file from 821.Pa /usr/share/bhyve/firmware . 822.Bd -literal -offset indent 823bhyve -c 2 -m 4g -w -H \e 824 -s 0,hostbridge \e 825 -s 31,lpc -p com1,stdio \e 826 -l bootrom,/usr/share/bhyve/firmware/BHYVE_UEFI.fd,BHYVE_UEFI_VARS.fd \e 827 uefivm 828.Ed 829.Sh SEE ALSO 830.Xr bhyve_config 5 , 831.Xr bhyvectl 8 832.Pp 833.Rs 834.%A Intel 835.%B 64 and IA-32 Architectures Software Developers' Manual 836.%V Volume 3 837.Re 838