NAME bhyve - run a guest operating system inside a virtual machine. SYNOPSIS bhyve [-aAHIPWeh] [-c num-cpus] [-g gdb-port] [-p pinned-cpu] [-s slot,emulation[,conf]] [-S slot,emulation[,conf]] [-l lpc-dev[,conf]] vmname DESCRIPTION bhyve is an experimental hypervisor that is used to run guest operating systems inside a virtual machine. Parameters such as the number of virtual CPUs, amount of guest memory, and I/O connectivity can be specified using command-line parameters. The guest operating system must have been loaded prior to running bhyve, using bhyveload or a similar boot loader. bhyve will run until either the guest operating system reboots or halts, or a unhandled hypervisor exit is detected. OPTIONS -a Disallow use of the local APIC in X2APIC mode. -A Generate ACPI tables. Required for FreeBSD/amd64 guests. -c Number of guest virtual CPUs. The default is 1 and the maximum is 16. -H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. -g For FreeBSD/amd64 kernels compiled with the 'bvmdebug' option, allow a remote kernel kgdb to be relayed to the guest kernel gdb stub via a local IPv4 address and this port. This option will be deprecated in a future version. -p Force guest virtual CPUs to be pinned to host CPUs. The mapping is virtual CPU 'n' is pinned to host CPU 'pinned-cpu + n'. -P Force the guest virtual CPU to exit when a PAUSE instruction is detected. -W Force the virtio device emulation to use MSI vectors instead of MSI-x vectors. -s Configure a virtual PCI slot/function. bhyve provides a PCI bus emulation and virtual devices that can be attached to slots on the bus. There are 32 available slots, with the option of also providing up to 8 functions at each slot. slot pci-slot[:function] The pci-slot value is 0-31 and the optional function value is 0-7. If not specified, the function value is 0. driver hostbridge amd-hostbridge Provides a simple hostbridge. This is usually configured at slot 0, and is required by most guest operating systems. The amd-hostbridge driver is identical but uses a PCI vendor ID of AMD virtio-net Virtio network interface virtio-block Virtio block interface ahci-cd AHCI controller attached to an ATAPI CD/DVD. ahci-hd AHCI controller attached to a SATA hard-drive uart PCI 16550 serial device. lpc PCI-ISA bridge with COM1 and COM2 serial ports configinfo This optional parameter describes the backend for device emulations. An empty configinfo string implies that the device emulation has no backend and can be considered unconnected. Network devices tapN|vmnetN[,mac=xx:xx:xx:xx:xx:xx] If the mac parameter is not passed, the MAC address is derived from a fixed OUI and the remaining bytes from an MD5 hash of the device's slot/function number and the device name. The mac address is an ascii string in ethers(5) format. Block devices /filename|/dev/xxx[,nocache][,direct][,ro] nocache - open the file with O_DIRECT direct - open the file using O_SYNC ro - enforce that the file is open read-only The nocache,direct and ro options are not available for virtio block devices. TTY devices stdio Connect the output of the serial port to the bhyve process's stdio. -S Identical to the -s option except the device is instructed to use legacy ISA addresses. Currently this only applies to the uart device. This option will be deprecated in a future version. -l [,configinfo] Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices, com1 and com2. -m size[K|k|M|m|G|g|T|t] Guest physical memory size in bytes. This must be less than or equal to the size passed to bhyveload. The size argument may be suffixed with one of K, M, G or T (either upper or lower case) to indicate a multiple of Kilobytes, Megabytes, Gigabytes or Terabytes respectively. If no suffix is given, the value is assumed to be in Megabytes. -e Force bhyve to exit when a guest issues an access to an i/o port that isn't emulated. This is intended for debug purposes. -h Print help message and exit vmname Alphanumeric name of the guest. This should be the same as created by bhyveload. EXAMPLES To run a virtual machine with 1GB of memory, two virtual CPUs, a virtio block device backed by the /my/image filesystem image and a serial port for the console: bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \ -l com1,stdio -A -H -P -m 1G vm1 A 24G single-CPU virtual machine with three network ports, one of which has a MAC address specified bhyve -s 0,hostbridge -s 1,lpc -s 2:0,virtio-net,tap0 \ -s 2:1,virtio-net,tap1 -s 2:2,virtio-net,tap2,mac=00:be:fa:76:45:00 \ -s 3,virtio-blk,/my/image -l com1,stdio \ -A -H -P -m 24G bigvm An 8G quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI CDROM, a single virtio network port and an AMD hostbridge bhyve -c 4 \ -s 0,amd_hostbridge -s 1,lpc \ -s 1:0,ahci-hd,/images/disk.1 \ -s 1:1,ahci-hd,/images/disk.1 \ -s 1:2,ahci-hd,/images/disk.1 \ -s 1:3,ahci-hd,/images/disk.1 \ -s 1:4,ahci-hd,/images/disk.1 \ -s 1:5,ahci-hd,/images/disk.1 \ -s 1:6,ahci-hd,/images/disk.1 \ -s 1:7,ahci-hd,/images/disk.1 \ -s 2,ahci-cd,/images.install.iso \ -s 3,virtio-net,tap0 \ -l com1,stdio \ -A -H -P -m 8G SEE ALSO bhyve(4), vmm(4), ethers(5), bhyveload(8), bhyvectl(8) HISTORY bhyve first appeared in FreeBSD 10.0 AUTHORS Neel Natu Peter Grehan