2013-12-13 08:31:13 +00:00
|
|
|
|
.\" Copyright (c) 2013 Peter Grehan
|
|
|
|
|
.\" All rights reserved.
|
|
|
|
|
.\"
|
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
|
.\" are met:
|
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
|
.\"
|
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
|
.\"
|
|
|
|
|
.\" $FreeBSD$
|
|
|
|
|
.\"
|
2020-05-18 15:03:52 +00:00
|
|
|
|
.Dd May 18, 2020
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Dt BHYVE 8
|
|
|
|
|
.Os
|
|
|
|
|
.Sh NAME
|
|
|
|
|
.Nm bhyve
|
|
|
|
|
.Nd "run a guest operating system inside a virtual machine"
|
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
|
.Nm
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Op Fl AabCeHhPSuWwxY
|
Add the ability to control the CPU topology of created VMs
from userland without the need to use sysctls, it allows the old
sysctls to continue to function, but deprecates them at
FreeBSD_version 1200060 (Relnotes for deprecate).
The command line of bhyve is maintained in a backwards compatible way.
The API of libvmmapi is maintained in a backwards compatible way.
The sysctl's are maintained in a backwards compatible way.
Added command option looks like:
bhyve -c [[cpus=]n][,sockets=n][,cores=n][,threads=n][,maxcpus=n]
The optional parts can be specified in any order, but only a single
integer invokes the backwards compatible parse. [,maxcpus=n] is
hidden by #ifdef until kernel support is added, though the api
is put in place.
bhyvectl --get-cpu-topology option added.
Reviewed by: grehan (maintainer, earlier version),
Reviewed by: bcr (manpages)
Approved by: bde (mentor), phk (mentor)
Tested by: Oleg Ginzburg <olevole@olevole.ru> (cbsd)
MFC after: 1 week
Relnotes: Y
Differential Revision: https://reviews.freebsd.org/D9930
2018-04-08 19:24:49 +00:00
|
|
|
|
.Oo
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Sm off
|
|
|
|
|
.Fl c\~
|
Add the ability to control the CPU topology of created VMs
from userland without the need to use sysctls, it allows the old
sysctls to continue to function, but deprecates them at
FreeBSD_version 1200060 (Relnotes for deprecate).
The command line of bhyve is maintained in a backwards compatible way.
The API of libvmmapi is maintained in a backwards compatible way.
The sysctl's are maintained in a backwards compatible way.
Added command option looks like:
bhyve -c [[cpus=]n][,sockets=n][,cores=n][,threads=n][,maxcpus=n]
The optional parts can be specified in any order, but only a single
integer invokes the backwards compatible parse. [,maxcpus=n] is
hidden by #ifdef until kernel support is added, though the api
is put in place.
bhyvectl --get-cpu-topology option added.
Reviewed by: grehan (maintainer, earlier version),
Reviewed by: bcr (manpages)
Approved by: bde (mentor), phk (mentor)
Tested by: Oleg Ginzburg <olevole@olevole.ru> (cbsd)
MFC after: 1 week
Relnotes: Y
Differential Revision: https://reviews.freebsd.org/D9930
2018-04-08 19:24:49 +00:00
|
|
|
|
.Oo
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Op Cm cpus=
|
|
|
|
|
.Ar numcpus
|
Add the ability to control the CPU topology of created VMs
from userland without the need to use sysctls, it allows the old
sysctls to continue to function, but deprecates them at
FreeBSD_version 1200060 (Relnotes for deprecate).
The command line of bhyve is maintained in a backwards compatible way.
The API of libvmmapi is maintained in a backwards compatible way.
The sysctl's are maintained in a backwards compatible way.
Added command option looks like:
bhyve -c [[cpus=]n][,sockets=n][,cores=n][,threads=n][,maxcpus=n]
The optional parts can be specified in any order, but only a single
integer invokes the backwards compatible parse. [,maxcpus=n] is
hidden by #ifdef until kernel support is added, though the api
is put in place.
bhyvectl --get-cpu-topology option added.
Reviewed by: grehan (maintainer, earlier version),
Reviewed by: bcr (manpages)
Approved by: bde (mentor), phk (mentor)
Tested by: Oleg Ginzburg <olevole@olevole.ru> (cbsd)
MFC after: 1 week
Relnotes: Y
Differential Revision: https://reviews.freebsd.org/D9930
2018-04-08 19:24:49 +00:00
|
|
|
|
.Oc
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Op Cm ,sockets= Ar n
|
|
|
|
|
.Op Cm ,cores= Ar n
|
|
|
|
|
.Op Cm ,threads= Ar n
|
|
|
|
|
.Oc
|
|
|
|
|
.Sm on
|
2018-05-01 15:17:46 +00:00
|
|
|
|
.Op Fl G Ar port
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Op Fl g Ar gdbport
|
|
|
|
|
.Oo Fl l
|
|
|
|
|
.Sm off
|
|
|
|
|
.Cm help | Ar lpcdev Op Cm \&, Ar conf
|
|
|
|
|
.Sm on
|
|
|
|
|
.Oc
|
|
|
|
|
.Oo Fl m
|
|
|
|
|
.Sm off
|
|
|
|
|
.Ar memsize
|
|
|
|
|
.Oo
|
|
|
|
|
.Cm K No | Cm k No | Cm M No | Cm m No | Cm G No | Cm g No | Cm T No | Cm t
|
|
|
|
|
.Oc
|
|
|
|
|
.Sm on
|
|
|
|
|
.Oc
|
|
|
|
|
.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu
|
Initial support for bhyve save and restore.
Save and restore (also known as suspend and resume) permits a snapshot
to be taken of a guest's state that can later be resumed. In the
current implementation, bhyve(8) creates a UNIX domain socket that is
used by bhyvectl(8) to send a request to save a snapshot (and
optionally exit after the snapshot has been taken). A snapshot
currently consists of two files: the first holds a copy of guest RAM,
and the second file holds other guest state such as vCPU register
values and device model state.
To resume a guest, bhyve(8) must be started with a matching pair of
command line arguments to instantiate the same set of device models as
well as a pointer to the saved snapshot.
While the current implementation is useful for several uses cases, it
has a few limitations. The file format for saving the guest state is
tied to the ABI of internal bhyve structures and is not
self-describing (in that it does not communicate the set of device
models present in the system). In addition, the state saved for some
device models closely matches the internal data structures which might
prove a challenge for compatibility of snapshot files across a range
of bhyve versions. The file format also does not currently support
versioning of individual chunks of state. As a result, the current
file format is not a fixed binary format and future revisions to save
and restore will break binary compatiblity of snapshot files. The
goal is to move to a more flexible format that adds versioning,
etc. and at that point to commit to providing a reasonable level of
compatibility. As a result, the current implementation is not enabled
by default. It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
for userland builds, and the kernel option BHYVE_SHAPSHOT.
Submitted by: Mihai Tiganus, Flavius Anton, Darius Mihai
Submitted by: Elena Mihailescu, Mihai Carabas, Sergiu Weisz
Relnotes: yes
Sponsored by: University Politehnica of Bucharest
Sponsored by: Matthew Grooms (student scholarships)
Sponsored by: iXsystems
Differential Revision: https://reviews.freebsd.org/D19495
2020-05-05 00:02:04 +00:00
|
|
|
|
.Op Fl r Ar file
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Oo Fl s
|
|
|
|
|
.Sm off
|
|
|
|
|
.Cm help | Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf
|
|
|
|
|
.Sm on
|
|
|
|
|
.Oc
|
2014-06-26 20:12:38 +00:00
|
|
|
|
.Op Fl U Ar uuid
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Ar vmname
|
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
|
.Nm
|
2014-09-17 16:45:20 +00:00
|
|
|
|
is a hypervisor that runs guest operating systems inside a
|
2013-12-13 08:31:13 +00:00
|
|
|
|
virtual machine.
|
|
|
|
|
.Pp
|
|
|
|
|
Parameters such as the number of virtual CPUs, amount of guest memory, and
|
|
|
|
|
I/O connectivity can be specified with command-line parameters.
|
|
|
|
|
.Pp
|
2017-05-03 21:44:04 +00:00
|
|
|
|
If not using a boot ROM, the guest operating system must be loaded with
|
2015-08-07 10:48:52 +00:00
|
|
|
|
.Xr bhyveload 8
|
2013-12-13 08:31:13 +00:00
|
|
|
|
or a similar boot loader before running
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Nm ,
|
|
|
|
|
otherwise, it is enough to run
|
|
|
|
|
.Nm
|
|
|
|
|
with a boot ROM of choice.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Pp
|
|
|
|
|
.Nm
|
|
|
|
|
runs until the guest operating system reboots or an unhandled hypervisor
|
|
|
|
|
exit is detected.
|
|
|
|
|
.Sh OPTIONS
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Fl a
|
2014-02-26 19:14:54 +00:00
|
|
|
|
The guest's local APIC is configured in xAPIC mode.
|
2015-08-07 10:48:52 +00:00
|
|
|
|
The xAPIC mode is the default setting so this option is redundant.
|
|
|
|
|
It will be deprecated in a future version.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Fl A
|
|
|
|
|
Generate ACPI tables.
|
|
|
|
|
Required for
|
|
|
|
|
.Fx Ns /amd64
|
|
|
|
|
guests.
|
2014-06-26 20:12:38 +00:00
|
|
|
|
.It Fl b
|
|
|
|
|
Enable a low-level console device supported by
|
2014-11-19 18:19:21 +00:00
|
|
|
|
.Fx
|
|
|
|
|
kernels compiled with
|
2014-06-26 20:12:38 +00:00
|
|
|
|
.Cd "device bvmconsole" .
|
|
|
|
|
This option will be deprecated in a future version.
|
Add the ability to control the CPU topology of created VMs
from userland without the need to use sysctls, it allows the old
sysctls to continue to function, but deprecates them at
FreeBSD_version 1200060 (Relnotes for deprecate).
The command line of bhyve is maintained in a backwards compatible way.
The API of libvmmapi is maintained in a backwards compatible way.
The sysctl's are maintained in a backwards compatible way.
Added command option looks like:
bhyve -c [[cpus=]n][,sockets=n][,cores=n][,threads=n][,maxcpus=n]
The optional parts can be specified in any order, but only a single
integer invokes the backwards compatible parse. [,maxcpus=n] is
hidden by #ifdef until kernel support is added, though the api
is put in place.
bhyvectl --get-cpu-topology option added.
Reviewed by: grehan (maintainer, earlier version),
Reviewed by: bcr (manpages)
Approved by: bde (mentor), phk (mentor)
Tested by: Oleg Ginzburg <olevole@olevole.ru> (cbsd)
MFC after: 1 week
Relnotes: Y
Differential Revision: https://reviews.freebsd.org/D9930
2018-04-08 19:24:49 +00:00
|
|
|
|
.It Fl c Op Ar setting ...
|
|
|
|
|
Number of guest virtual CPUs
|
|
|
|
|
and/or the CPU topology.
|
|
|
|
|
The default value for each of
|
|
|
|
|
.Ar numcpus ,
|
|
|
|
|
.Ar sockets ,
|
|
|
|
|
.Ar cores ,
|
|
|
|
|
and
|
|
|
|
|
.Ar threads
|
|
|
|
|
is 1.
|
|
|
|
|
The current maximum number of guest virtual CPUs is 16.
|
|
|
|
|
If
|
|
|
|
|
.Ar numcpus
|
|
|
|
|
is not specified then it will be calculated from the other arguments.
|
|
|
|
|
The topology must be consistent in that the
|
|
|
|
|
.Ar numcpus
|
|
|
|
|
must equal the product of
|
|
|
|
|
.Ar sockets ,
|
|
|
|
|
.Ar cores ,
|
|
|
|
|
and
|
|
|
|
|
.Ar threads .
|
|
|
|
|
If a
|
|
|
|
|
.Ar setting
|
|
|
|
|
is specified more than once the last one has precedence.
|
2014-05-13 16:40:27 +00:00
|
|
|
|
.It Fl C
|
|
|
|
|
Include guest memory in core file.
|
2014-06-27 15:20:34 +00:00
|
|
|
|
.It Fl e
|
|
|
|
|
Force
|
|
|
|
|
.Nm
|
|
|
|
|
to exit when a guest issues an access to an I/O port that is not emulated.
|
|
|
|
|
This is intended for debug purposes.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Fl g Ar gdbport
|
|
|
|
|
For
|
2014-06-26 20:12:38 +00:00
|
|
|
|
.Fx
|
|
|
|
|
kernels compiled with
|
|
|
|
|
.Cd "device bvmdebug" ,
|
2013-12-13 08:31:13 +00:00
|
|
|
|
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.
|
2018-05-01 15:17:46 +00:00
|
|
|
|
.It Fl G Ar port
|
|
|
|
|
Start a debug server that uses the GDB protocol to export guest state to a
|
|
|
|
|
debugger.
|
|
|
|
|
An IPv4 TCP socket will be bound to the supplied
|
|
|
|
|
.Ar port
|
|
|
|
|
to listen for debugger connections.
|
|
|
|
|
Only a single debugger may be attached to the debug server at a time.
|
|
|
|
|
If
|
|
|
|
|
.Ar port
|
|
|
|
|
begins with
|
|
|
|
|
.Sq w ,
|
|
|
|
|
.Nm
|
|
|
|
|
will pause execution at the first instruction waiting for a debugger to attach.
|
2014-06-27 15:20:34 +00:00
|
|
|
|
.It Fl h
|
|
|
|
|
Print help message and exit.
|
|
|
|
|
.It Fl 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.
|
2018-08-23 07:34:51 +00:00
|
|
|
|
.It Fl l Op Ar help|lpcdev Ns Op , Ns Ar conf
|
2014-06-27 15:20:34 +00:00
|
|
|
|
Allow devices behind the LPC PCI-ISA bridge to be configured.
|
2015-06-18 06:00:17 +00:00
|
|
|
|
The only supported devices are the TTY-class devices
|
|
|
|
|
.Ar com1
|
2014-06-27 15:20:34 +00:00
|
|
|
|
and
|
2015-06-18 06:00:17 +00:00
|
|
|
|
.Ar com2
|
|
|
|
|
and the boot ROM device
|
|
|
|
|
.Ar bootrom .
|
2018-08-23 07:34:51 +00:00
|
|
|
|
.Pp
|
|
|
|
|
.Ar help
|
|
|
|
|
print a list of supported LPC devices.
|
2016-06-26 14:44:01 +00:00
|
|
|
|
.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
|
2014-06-27 15:20:34 +00:00
|
|
|
|
Guest physical memory size in bytes.
|
|
|
|
|
This must be the same size that was given to
|
|
|
|
|
.Xr bhyveload 8 .
|
|
|
|
|
.Pp
|
|
|
|
|
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.
|
|
|
|
|
If no suffix is given, the value is assumed to be in megabytes.
|
2016-06-26 14:44:01 +00:00
|
|
|
|
.Pp
|
|
|
|
|
.Ar memsize
|
|
|
|
|
defaults to 256M.
|
2014-05-05 18:06:35 +00:00
|
|
|
|
.It Fl p Ar vcpu:hostcpu
|
|
|
|
|
Pin guest's virtual CPU
|
|
|
|
|
.Em vcpu
|
|
|
|
|
to
|
|
|
|
|
.Em hostcpu .
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Fl P
|
|
|
|
|
Force the guest virtual CPU to exit when a PAUSE instruction is detected.
|
Initial support for bhyve save and restore.
Save and restore (also known as suspend and resume) permits a snapshot
to be taken of a guest's state that can later be resumed. In the
current implementation, bhyve(8) creates a UNIX domain socket that is
used by bhyvectl(8) to send a request to save a snapshot (and
optionally exit after the snapshot has been taken). A snapshot
currently consists of two files: the first holds a copy of guest RAM,
and the second file holds other guest state such as vCPU register
values and device model state.
To resume a guest, bhyve(8) must be started with a matching pair of
command line arguments to instantiate the same set of device models as
well as a pointer to the saved snapshot.
While the current implementation is useful for several uses cases, it
has a few limitations. The file format for saving the guest state is
tied to the ABI of internal bhyve structures and is not
self-describing (in that it does not communicate the set of device
models present in the system). In addition, the state saved for some
device models closely matches the internal data structures which might
prove a challenge for compatibility of snapshot files across a range
of bhyve versions. The file format also does not currently support
versioning of individual chunks of state. As a result, the current
file format is not a fixed binary format and future revisions to save
and restore will break binary compatiblity of snapshot files. The
goal is to move to a more flexible format that adds versioning,
etc. and at that point to commit to providing a reasonable level of
compatibility. As a result, the current implementation is not enabled
by default. It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
for userland builds, and the kernel option BHYVE_SHAPSHOT.
Submitted by: Mihai Tiganus, Flavius Anton, Darius Mihai
Submitted by: Elena Mihailescu, Mihai Carabas, Sergiu Weisz
Relnotes: yes
Sponsored by: University Politehnica of Bucharest
Sponsored by: Matthew Grooms (student scholarships)
Sponsored by: iXsystems
Differential Revision: https://reviews.freebsd.org/D19495
2020-05-05 00:02:04 +00:00
|
|
|
|
.It Fl r Ar file
|
|
|
|
|
Resume a guest from a snapshot.
|
|
|
|
|
The guest memory contents are restored from
|
|
|
|
|
.Ar file ,
|
|
|
|
|
and the guest device and vCPU state are restored from the file
|
|
|
|
|
.Dq Ar file Ns .kern .
|
|
|
|
|
.Pp
|
|
|
|
|
Note that the current snapshot file format requires that the configuration of
|
|
|
|
|
devices in the new VM match the VM from which the snapshot was taken by specifying the
|
|
|
|
|
same
|
|
|
|
|
.Op Fl s
|
|
|
|
|
and
|
|
|
|
|
.Op Fl l
|
|
|
|
|
options.
|
|
|
|
|
The count of vCPUs and memory configuration are read from the snapshot.
|
2018-08-23 07:34:51 +00:00
|
|
|
|
.It Fl s Op Ar help|slot,emulation Ns Op , Ns Ar conf
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Configure a virtual PCI slot and function.
|
|
|
|
|
.Pp
|
2015-08-07 10:48:52 +00:00
|
|
|
|
.Nm
|
2013-12-13 08:31:13 +00:00
|
|
|
|
provides PCI bus emulation and virtual devices that can be attached to
|
|
|
|
|
slots on the bus.
|
|
|
|
|
There are 32 available slots, with the option of providing up to 8 functions
|
|
|
|
|
per slot.
|
|
|
|
|
.Bl -tag -width 10n
|
2018-08-23 07:34:51 +00:00
|
|
|
|
.It Ar help
|
|
|
|
|
print a list of supported PCI devices.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Ar slot
|
2014-02-14 21:46:04 +00:00
|
|
|
|
.Ar pcislot[:function]
|
|
|
|
|
.Ar bus:pcislot:function
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar pcislot
|
2015-08-07 10:48:52 +00:00
|
|
|
|
value is 0 to 31.
|
|
|
|
|
The optional
|
|
|
|
|
.Ar function
|
|
|
|
|
value is 0 to 7.
|
|
|
|
|
The optional
|
2014-02-14 21:46:04 +00:00
|
|
|
|
.Ar bus
|
|
|
|
|
value is 0 to 255.
|
2015-08-07 10:48:52 +00:00
|
|
|
|
If not specified, the
|
|
|
|
|
.Ar function
|
|
|
|
|
value defaults to 0.
|
|
|
|
|
If not specified, the
|
|
|
|
|
.Ar bus
|
|
|
|
|
value defaults to 0.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Ar emulation
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li hostbridge | Li amd_hostbridge
|
|
|
|
|
.Pp
|
|
|
|
|
Provide a simple host bridge.
|
|
|
|
|
This is usually configured at slot 0, and is required by most guest
|
|
|
|
|
operating systems.
|
|
|
|
|
The
|
|
|
|
|
.Li amd_hostbridge
|
|
|
|
|
emulation is identical but uses a PCI vendor ID of
|
|
|
|
|
.Li AMD .
|
|
|
|
|
.It Li passthru
|
|
|
|
|
PCI pass-through device.
|
|
|
|
|
.It Li virtio-net
|
|
|
|
|
Virtio network interface.
|
2014-01-08 08:37:30 +00:00
|
|
|
|
.It Li virtio-blk
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Virtio block storage interface.
|
2018-06-11 02:09:20 +00:00
|
|
|
|
.It Li virtio-scsi
|
|
|
|
|
Virtio SCSI interface.
|
2014-04-02 20:18:17 +00:00
|
|
|
|
.It Li virtio-rnd
|
|
|
|
|
Virtio RNG interface.
|
2017-02-27 15:37:38 +00:00
|
|
|
|
.It Li virtio-console
|
|
|
|
|
Virtio console interface, which exposes multiple ports
|
|
|
|
|
to the guest in the form of simple char devices for simple IO
|
|
|
|
|
between the guest and host userspaces.
|
2016-07-08 21:25:37 +00:00
|
|
|
|
.It Li ahci
|
2016-10-17 09:40:18 +00:00
|
|
|
|
AHCI controller attached to arbitrary devices.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Li ahci-cd
|
|
|
|
|
AHCI controller attached to an ATAPI CD/DVD.
|
|
|
|
|
.It Li ahci-hd
|
|
|
|
|
AHCI controller attached to a SATA hard-drive.
|
2016-07-09 20:41:59 +00:00
|
|
|
|
.It Li e1000
|
|
|
|
|
Intel e82545 network interface.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Li uart
|
|
|
|
|
PCI 16550 serial device.
|
|
|
|
|
.It Li lpc
|
2015-06-18 06:00:17 +00:00
|
|
|
|
LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM.
|
|
|
|
|
The LPC bridge emulation can only be configured on bus 0.
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.It Li fbuf
|
|
|
|
|
Raw framebuffer device attached to VNC server.
|
|
|
|
|
.It Li xhci
|
2017-05-03 21:44:04 +00:00
|
|
|
|
eXtensible Host Controller Interface (xHCI) USB controller.
|
- Add bhyve NVMe device emulation.
The initial work on bhyve NVMe device emulation was done by the GSoC student
Shunsuke Mie and was heavily modified in performan, functionality and
guest support by Leon Dang.
bhyve:
-s <n>,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#,ser=A-Z
accepted devpath:
/dev/blockdev
/path/to/image
ram=size_in_MiB
Tested with guest OS: FreeBSD Head, Linux Fedora fc27, Ubuntu 18.04,
OpenSuse 15.0, Windows Server 2016 Datacenter.
Tested with all accepted device paths: Real nvme, zdev and also with ram.
Tested on: AMD Ryzen Threadripper 1950X 16-Core Processor and
Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz.
Tests at: https://people.freebsd.org/~araujo/bhyve_nvme/nvme.txt
Submitted by: Shunsuke Mie <sux2mfgj_gmail.com>,
Leon Dang <leon_digitalmsx.com>
Reviewed by: chuck (early version), grehan
Relnotes: Yes
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D14022
2018-07-05 03:33:58 +00:00
|
|
|
|
.It Li nvme
|
|
|
|
|
NVM Express (NVMe) controller.
|
2019-06-25 06:14:11 +00:00
|
|
|
|
.It Li hda
|
|
|
|
|
High Definition Audio Controller.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
|
|
|
|
.It Op Ar conf
|
|
|
|
|
This optional parameter describes the backend for device emulations.
|
|
|
|
|
If
|
|
|
|
|
.Ar conf
|
|
|
|
|
is not specified, the device emulation has no backend and can be
|
|
|
|
|
considered unconnected.
|
|
|
|
|
.Pp
|
2020-05-18 15:03:52 +00:00
|
|
|
|
Network backends:
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2020-05-09 07:57:41 +00:00
|
|
|
|
.It Ar tapN Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc
|
|
|
|
|
.It Ar vmnetN Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc
|
2020-05-18 15:03:52 +00:00
|
|
|
|
.It Ar netgraph,path=ADDRESS,peerhook=HOOK Ns Oo , Ns Ar socket=NAME Oc Ns Oo , Ns Ar hook=HOOK Oc Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Pp
|
|
|
|
|
If
|
|
|
|
|
.Ar mac
|
|
|
|
|
is not specified, the MAC address is derived from a fixed OUI and the
|
|
|
|
|
remaining bytes from an MD5 hash of the slot and function numbers and
|
|
|
|
|
the device name.
|
|
|
|
|
.Pp
|
|
|
|
|
The MAC address is an ASCII string in
|
|
|
|
|
.Xr ethers 5
|
|
|
|
|
format.
|
2020-05-09 07:57:41 +00:00
|
|
|
|
.Pp
|
|
|
|
|
With virtio-net devices, the
|
|
|
|
|
.Ar mtu
|
|
|
|
|
parameter can be specified to inform the guest about the largest MTU
|
|
|
|
|
that should be allowed, expressed in bytes.
|
2020-05-18 15:03:52 +00:00
|
|
|
|
.Pp
|
|
|
|
|
With netgraph backend, the
|
|
|
|
|
.Ar path
|
|
|
|
|
and
|
|
|
|
|
.Ar peerhook
|
|
|
|
|
parameters must be specified to set the destination node and corresponding hook.
|
|
|
|
|
The optional parameters
|
|
|
|
|
.Ar socket
|
|
|
|
|
and
|
|
|
|
|
.Ar hook
|
|
|
|
|
may be used to set the
|
|
|
|
|
.Xr ng_socket 4
|
|
|
|
|
node name and source hook.
|
|
|
|
|
The
|
|
|
|
|
.Ar ADDRESS ,
|
|
|
|
|
.Ar HOOK
|
|
|
|
|
and
|
|
|
|
|
.Ar NAME
|
|
|
|
|
must comply with
|
|
|
|
|
.Xr netgraph 4
|
|
|
|
|
addressing rules.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
Block storage devices:
|
|
|
|
|
.Bl -tag -width 10n
|
2015-05-12 00:30:39 +00:00
|
|
|
|
.It Pa /filename Ns Oo , Ns Ar block-device-options Oc
|
|
|
|
|
.It Pa /dev/xxx Ns Oo , Ns Ar block-device-options Oc
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar block-device-options
|
|
|
|
|
are:
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Bl -tag -width 8n
|
|
|
|
|
.It Li nocache
|
|
|
|
|
Open the file with
|
|
|
|
|
.Dv O_DIRECT .
|
|
|
|
|
.It Li direct
|
|
|
|
|
Open the file using
|
|
|
|
|
.Dv O_SYNC .
|
|
|
|
|
.It Li ro
|
|
|
|
|
Force the file to be opened read-only.
|
2015-05-12 00:30:39 +00:00
|
|
|
|
.It Li sectorsize= Ns Ar logical Ns Oo / Ns Ar physical Oc
|
|
|
|
|
Specify the logical and physical sector sizes of the emulated disk.
|
|
|
|
|
The physical sector size is optional and is equal to the logical sector size
|
|
|
|
|
if not explicitly specified.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2018-06-11 02:09:20 +00:00
|
|
|
|
SCSI devices:
|
|
|
|
|
.Bl -tag -width 10n
|
Allow CTL device specification in bhyve virtio-scsi.
There was a large refactoring done in CTL to allow multiple ioctl frontend
ports (and respective devices) to be created, particularly for bhyve.
Unfortunately, respective part of bhyve functionality got lost somehow from
the original virtio-scsi commit. This change allows wanted device path to
be specified in either of two ways:
-s 6,virtio-scsi,/dev/cam/ctl1.1
-s 6,virtio-scsi,dev=/dev/cam/ctl2.3
If neither is specified, the default /dev/cam/ctl device is used.
While there, remove per-queue CTL device opening, which makes no sense at
this point.
Reported by: wg
Reviewed by: araujo
MFC after: 3 days
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D18504
2018-12-11 20:47:00 +00:00
|
|
|
|
.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar scsi-device-options Oc
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar scsi-device-options
|
|
|
|
|
are:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li iid= Ns Ar IID
|
|
|
|
|
Initiator ID to use when sending requests to specified CTL port.
|
|
|
|
|
The default value is 0.
|
2018-06-11 02:09:20 +00:00
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2013-12-13 08:31:13 +00:00
|
|
|
|
TTY devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li stdio
|
|
|
|
|
Connect the serial port to the standard input and output of
|
2015-08-07 10:48:52 +00:00
|
|
|
|
the
|
|
|
|
|
.Nm
|
|
|
|
|
process.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Pa /dev/xxx
|
|
|
|
|
Use the host TTY device for serial port I/O.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2015-06-18 06:00:17 +00:00
|
|
|
|
Boot ROM device:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Pa romfile
|
|
|
|
|
Map
|
|
|
|
|
.Ar romfile
|
|
|
|
|
in the guest address space reserved for boot firmware.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Pass-through devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function
|
|
|
|
|
Connect to a PCI device on the host at the selector described by
|
|
|
|
|
.Ar slot ,
|
|
|
|
|
.Ar bus ,
|
|
|
|
|
and
|
|
|
|
|
.Ar function
|
|
|
|
|
numbers.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2015-06-18 06:00:17 +00:00
|
|
|
|
Guest memory must be wired using the
|
|
|
|
|
.Fl S
|
|
|
|
|
option when a pass-through device is configured.
|
|
|
|
|
.Pp
|
2013-12-13 08:31:13 +00:00
|
|
|
|
The host device must have been reserved at boot-time using the
|
2019-07-02 14:53:51 +00:00
|
|
|
|
.Va pptdevs
|
2013-12-13 08:31:13 +00:00
|
|
|
|
loader variable as described in
|
|
|
|
|
.Xr vmm 4 .
|
2017-02-27 15:37:38 +00:00
|
|
|
|
.Pp
|
|
|
|
|
Virtio console devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li port1= Ns Pa /path/to/port1.sock Ns ,anotherport= Ns Pa ...
|
|
|
|
|
A maximum of 16 ports per device can be created.
|
|
|
|
|
Every port is named and corresponds to a Unix domain socket created by
|
|
|
|
|
.Nm .
|
|
|
|
|
.Nm
|
|
|
|
|
accepts at most one connection per port at a time.
|
|
|
|
|
.Pp
|
|
|
|
|
Limitations:
|
|
|
|
|
.Bl -bullet -offset 2n
|
|
|
|
|
.It
|
|
|
|
|
Due to lack of destructors in
|
|
|
|
|
.Nm ,
|
|
|
|
|
sockets on the filesystem must be cleaned up manually after
|
|
|
|
|
.Nm
|
|
|
|
|
exits.
|
|
|
|
|
.It
|
|
|
|
|
There is no way to use the "console port" feature, nor the console port
|
2017-04-01 15:01:10 +00:00
|
|
|
|
resize at present.
|
2017-02-27 15:37:38 +00:00
|
|
|
|
.It
|
2017-04-01 15:01:10 +00:00
|
|
|
|
Emergency write is advertised, but no-op at present.
|
2017-02-27 15:37:38 +00:00
|
|
|
|
.El
|
|
|
|
|
.El
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.Pp
|
2017-05-03 21:44:04 +00:00
|
|
|
|
Framebuffer devices:
|
|
|
|
|
.Bl -tag -width 10n
|
2018-10-27 21:24:28 +00:00
|
|
|
|
.It Xo
|
|
|
|
|
.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns
|
|
|
|
|
.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns
|
|
|
|
|
.Ar password Oc
|
|
|
|
|
.Xc
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Bl -tag -width 8n
|
2018-10-24 08:45:33 +00:00
|
|
|
|
.It Ar IPv4:port No or Ar [IPv6%zone]:port
|
2017-05-03 21:44:04 +00:00
|
|
|
|
An
|
|
|
|
|
.Ar IP
|
|
|
|
|
address and a
|
|
|
|
|
.Ar port
|
|
|
|
|
VNC should listen on.
|
|
|
|
|
The default is to listen on localhost IPv4 address and default VNC port 5900.
|
2018-10-24 08:45:33 +00:00
|
|
|
|
An IPv6 address must be enclosed in square brackets and may contain an
|
2019-01-11 14:21:59 +00:00
|
|
|
|
optional zone identifier.
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.It Ar width No and Ar height
|
|
|
|
|
A display resolution, width and height, respectively.
|
|
|
|
|
If not specified, a default resolution of 1024x768 pixels will be used.
|
|
|
|
|
Minimal supported resolution is 640x480 pixels,
|
|
|
|
|
and maximum is 1920x1200 pixels.
|
|
|
|
|
.It Ar vgaconf
|
|
|
|
|
Possible values for this option are
|
|
|
|
|
.Dq io
|
|
|
|
|
(default),
|
|
|
|
|
.Dq on
|
|
|
|
|
, and
|
|
|
|
|
.Dq off .
|
|
|
|
|
PCI graphics cards have a dual personality in that they are
|
|
|
|
|
standard PCI devices with BAR addressing, but may also
|
|
|
|
|
implicitly decode legacy VGA I/O space
|
|
|
|
|
.Pq Ad 0x3c0-3df
|
|
|
|
|
and memory space
|
|
|
|
|
.Pq 64KB at Ad 0xA0000 .
|
|
|
|
|
The default
|
|
|
|
|
.Dq io
|
2018-10-27 21:24:28 +00:00
|
|
|
|
option should be used for guests that attempt to issue BIOS calls which result
|
|
|
|
|
in I/O port queries, and fail to boot if I/O decode is disabled.
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Dq on
|
|
|
|
|
option should be used along with the CSM BIOS capability in UEFI
|
|
|
|
|
to boot traditional BIOS guests that require the legacy VGA I/O and
|
|
|
|
|
memory regions to be available.
|
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Dq off
|
|
|
|
|
option should be used for the UEFI guests that assume that
|
|
|
|
|
VGA adapter is present if they detect the I/O ports.
|
|
|
|
|
An example of such a guest is
|
|
|
|
|
.Ox
|
|
|
|
|
in UEFI mode.
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.Pp
|
2017-05-03 21:44:04 +00:00
|
|
|
|
Please refer to the
|
|
|
|
|
.Nm
|
|
|
|
|
.Fx
|
|
|
|
|
wiki page
|
|
|
|
|
.Pq Lk https://wiki.freebsd.org/bhyve
|
|
|
|
|
for configuration notes of particular guests.
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.It wait
|
2017-05-03 21:44:04 +00:00
|
|
|
|
Instruct
|
|
|
|
|
.Nm
|
2018-10-27 21:24:28 +00:00
|
|
|
|
to only boot upon the initiation of a VNC connection, simplifying the
|
|
|
|
|
installation of operating systems that require immediate keyboard input.
|
2017-05-03 21:44:04 +00:00
|
|
|
|
This can be removed for post-installation use.
|
2017-06-02 02:35:16 +00:00
|
|
|
|
.It password
|
|
|
|
|
This type of authentication is known to be cryptographically weak and is not
|
|
|
|
|
intended for use on untrusted networks.
|
|
|
|
|
Many implementations will want to use stronger security, such as running
|
|
|
|
|
the session over an encrypted channel provided by IPsec or SSH.
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.El
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2017-05-03 21:44:04 +00:00
|
|
|
|
xHCI USB devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li tablet
|
|
|
|
|
A USB tablet device which provides precise cursor synchronization
|
|
|
|
|
when using VNC.
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.El
|
- Add bhyve NVMe device emulation.
The initial work on bhyve NVMe device emulation was done by the GSoC student
Shunsuke Mie and was heavily modified in performan, functionality and
guest support by Leon Dang.
bhyve:
-s <n>,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#,ser=A-Z
accepted devpath:
/dev/blockdev
/path/to/image
ram=size_in_MiB
Tested with guest OS: FreeBSD Head, Linux Fedora fc27, Ubuntu 18.04,
OpenSuse 15.0, Windows Server 2016 Datacenter.
Tested with all accepted device paths: Real nvme, zdev and also with ram.
Tested on: AMD Ryzen Threadripper 1950X 16-Core Processor and
Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz.
Tests at: https://people.freebsd.org/~araujo/bhyve_nvme/nvme.txt
Submitted by: Shunsuke Mie <sux2mfgj_gmail.com>,
Leon Dang <leon_digitalmsx.com>
Reviewed by: chuck (early version), grehan
Relnotes: Yes
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D14022
2018-07-05 03:33:58 +00:00
|
|
|
|
.Pp
|
|
|
|
|
NVMe devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li devpath
|
|
|
|
|
Accepted device paths are:
|
|
|
|
|
.Ar /dev/blockdev
|
|
|
|
|
or
|
|
|
|
|
.Ar /path/to/image
|
|
|
|
|
or
|
|
|
|
|
.Ar ram=size_in_MiB .
|
|
|
|
|
.It Li maxq
|
|
|
|
|
Max number of queues.
|
|
|
|
|
.It Li qsz
|
|
|
|
|
Max elements in each queue.
|
|
|
|
|
.It Li ioslots
|
|
|
|
|
Max number of concurrent I/O requests.
|
|
|
|
|
.It Li sectsz
|
|
|
|
|
Sector size (defaults to blockif sector size).
|
|
|
|
|
.It Li ser
|
|
|
|
|
Serial number with maximum 20 characters.
|
|
|
|
|
.El
|
2019-06-25 06:14:11 +00:00
|
|
|
|
.Pp
|
|
|
|
|
HD Audio devices:
|
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Li play
|
|
|
|
|
Playback device, typically
|
|
|
|
|
.Ar /dev/dsp0 .
|
|
|
|
|
.It Li rec
|
|
|
|
|
Recording device, typically
|
|
|
|
|
.Ar /dev/dsp0 .
|
|
|
|
|
.El
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
2015-06-18 06:00:17 +00:00
|
|
|
|
.It Fl S
|
|
|
|
|
Wire guest memory.
|
2015-02-24 02:04:16 +00:00
|
|
|
|
.It Fl u
|
|
|
|
|
RTC keeps UTC time.
|
2014-06-26 20:12:38 +00:00
|
|
|
|
.It Fl U Ar uuid
|
|
|
|
|
Set the universally unique identifier
|
|
|
|
|
.Pq UUID
|
|
|
|
|
in the guest's System Management BIOS System Information structure.
|
|
|
|
|
By default a UUID is generated from the host's hostname and
|
|
|
|
|
.Ar vmname .
|
2013-12-23 15:00:15 +00:00
|
|
|
|
.It Fl w
|
2015-08-07 10:48:52 +00:00
|
|
|
|
Ignore accesses to unimplemented Model Specific Registers (MSRs).
|
|
|
|
|
This is intended for debug purposes.
|
2014-06-27 15:20:34 +00:00
|
|
|
|
.It Fl W
|
|
|
|
|
Force virtio PCI device emulations to use MSI interrupts instead of MSI-X
|
|
|
|
|
interrupts.
|
2014-02-26 19:14:54 +00:00
|
|
|
|
.It Fl x
|
|
|
|
|
The guest's local APIC is configured in x2APIC mode.
|
2014-05-02 04:51:31 +00:00
|
|
|
|
.It Fl Y
|
|
|
|
|
Disable MPtable generation.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.It Ar vmname
|
|
|
|
|
Alphanumeric name of the guest.
|
|
|
|
|
This should be the same as that created by
|
|
|
|
|
.Xr bhyveload 8 .
|
|
|
|
|
.El
|
2018-05-01 15:17:46 +00:00
|
|
|
|
.Sh DEBUG SERVER
|
|
|
|
|
The current debug server provides limited support for debuggers.
|
|
|
|
|
.Ss Registers
|
|
|
|
|
Each virtual CPU is exposed to the debugger as a thread.
|
|
|
|
|
.Pp
|
|
|
|
|
General purpose registers can be queried for each virtual CPU, but other
|
|
|
|
|
registers such as floating-point and system registers cannot be queried.
|
|
|
|
|
.Ss Memory
|
2019-12-13 02:18:44 +00:00
|
|
|
|
Memory (including memory mapped I/O regions) can be read and written by the debugger.
|
2018-10-27 21:24:28 +00:00
|
|
|
|
Memory operations use virtual addresses that are resolved to physical addresses
|
|
|
|
|
via the current virtual CPU's active address translation.
|
2018-05-01 15:17:46 +00:00
|
|
|
|
.Ss Control
|
|
|
|
|
The running guest can be interrupted by the debugger at any time
|
|
|
|
|
.Pq for example, by pressing Ctrl-C in the debugger .
|
|
|
|
|
.Pp
|
|
|
|
|
Single stepping is only supported on Intel CPUs supporting the MTRAP VM exit.
|
|
|
|
|
.Pp
|
2019-12-13 19:21:58 +00:00
|
|
|
|
Breakpoints are supported on Intel CPUs that support single stepping.
|
|
|
|
|
Note that continuing from a breakpoint while interrupts are enabled in the
|
|
|
|
|
guest may not work as expected due to timer interrupts firing while single
|
|
|
|
|
stepping over the breakpoint.
|
2016-04-20 06:29:03 +00:00
|
|
|
|
.Sh SIGNAL HANDLING
|
|
|
|
|
.Nm
|
|
|
|
|
deals with the following signals:
|
|
|
|
|
.Pp
|
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
|
.It SIGTERM
|
|
|
|
|
Trigger ACPI poweroff for a VM
|
|
|
|
|
.El
|
|
|
|
|
.Sh EXIT STATUS
|
|
|
|
|
Exit status indicates how the VM was terminated:
|
|
|
|
|
.Pp
|
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
|
.It 0
|
|
|
|
|
rebooted
|
|
|
|
|
.It 1
|
|
|
|
|
powered off
|
|
|
|
|
.It 2
|
|
|
|
|
halted
|
|
|
|
|
.It 3
|
|
|
|
|
triple fault
|
2018-07-11 03:23:09 +00:00
|
|
|
|
.It 4
|
|
|
|
|
exited due to an error
|
2016-04-20 06:29:03 +00:00
|
|
|
|
.El
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Sh EXAMPLES
|
2017-05-03 21:44:04 +00:00
|
|
|
|
If not using a boot ROM, the guest operating system must have been loaded with
|
2015-08-07 10:48:52 +00:00
|
|
|
|
.Xr bhyveload 8
|
2013-12-13 08:31:13 +00:00
|
|
|
|
or a similar boot loader before
|
|
|
|
|
.Xr bhyve 4
|
|
|
|
|
can be run.
|
2017-05-03 21:44:04 +00:00
|
|
|
|
Otherwise, the boot loader is not needed.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Pp
|
|
|
|
|
To run a virtual machine with 1GB of memory, two virtual CPUs, a virtio
|
|
|
|
|
block device backed by the
|
|
|
|
|
.Pa /my/image
|
|
|
|
|
filesystem image, and a serial port for the console:
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\
|
|
|
|
|
-l com1,stdio -A -H -P -m 1G vm1
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
|
|
|
|
Run a 24GB single-CPU virtual machine with three network ports, one of which
|
|
|
|
|
has a MAC address specified:
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
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
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
|
|
|
|
Run an 8GB quad-CPU virtual machine with 8 AHCI SATA disks, an AHCI ATAPI
|
|
|
|
|
CD-ROM, a single virtio network port, an AMD hostbridge, and the console
|
|
|
|
|
port connected to an
|
|
|
|
|
.Xr nmdm 4
|
2015-08-07 10:48:52 +00:00
|
|
|
|
null-modem device.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Bd -literal -offset indent
|
2015-08-11 09:00:27 +00:00
|
|
|
|
bhyve -c 4 \\
|
2013-12-13 08:31:13 +00:00
|
|
|
|
-s 0,amd_hostbridge -s 1,lpc \\
|
2016-07-08 21:25:37 +00:00
|
|
|
|
-s 1:0,ahci,hd:/images/disk.1,hd:/images/disk.2,\\
|
|
|
|
|
hd:/images/disk.3,hd:/images/disk.4,\\
|
|
|
|
|
hd:/images/disk.5,hd:/images/disk.6,\\
|
|
|
|
|
hd:/images/disk.7,hd:/images/disk.8,\\
|
|
|
|
|
cd:/images/install.iso \\
|
2013-12-13 08:31:13 +00:00
|
|
|
|
-s 3,virtio-net,tap0 \\
|
|
|
|
|
-l com1,/dev/nmdm0A \\
|
|
|
|
|
-A -H -P -m 8G
|
|
|
|
|
.Ed
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Pp
|
|
|
|
|
Run a UEFI virtual machine with a display resolution of 800 by 600 pixels
|
|
|
|
|
that can be accessed via VNC at: 0.0.0.0:5900.
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
bhyve -c 2 -m 4G -w -H \\
|
|
|
|
|
-s 0,hostbridge \\
|
|
|
|
|
-s 3,ahci-cd,/path/to/uefi-OS-install.iso \\
|
|
|
|
|
-s 4,ahci-hd,disk.img \\
|
|
|
|
|
-s 5,virtio-net,tap0 \\
|
|
|
|
|
-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\
|
|
|
|
|
-s 30,xhci,tablet \\
|
|
|
|
|
-s 31,lpc -l com1,stdio \\
|
|
|
|
|
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
|
|
|
|
|
uefivm
|
|
|
|
|
.Ed
|
2018-10-24 08:45:33 +00:00
|
|
|
|
.Pp
|
|
|
|
|
Run a UEFI virtual machine with a VNC display that is bound to all IPv6
|
|
|
|
|
addresses on port 5900.
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
bhyve -c 2 -m 4G -w -H \\
|
|
|
|
|
-s 0,hostbridge \\
|
|
|
|
|
-s 4,ahci-hd,disk.img \\
|
|
|
|
|
-s 5,virtio-net,tap0 \\
|
|
|
|
|
-s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\
|
|
|
|
|
-s 30,xhci,tablet \\
|
|
|
|
|
-s 31,lpc -l com1,stdio \\
|
|
|
|
|
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
|
|
|
|
|
uefivm
|
|
|
|
|
.Ed
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Sh SEE ALSO
|
|
|
|
|
.Xr bhyve 4 ,
|
2020-05-18 15:03:52 +00:00
|
|
|
|
.Xr netgraph 4 ,
|
|
|
|
|
.Xr ng_socket 4 ,
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Xr nmdm 4 ,
|
|
|
|
|
.Xr vmm 4 ,
|
|
|
|
|
.Xr ethers 5 ,
|
2013-12-15 08:52:16 +00:00
|
|
|
|
.Xr bhyvectl 8 ,
|
|
|
|
|
.Xr bhyveload 8
|
2018-10-27 21:24:28 +00:00
|
|
|
|
.Pp
|
|
|
|
|
.Rs
|
|
|
|
|
.%A Intel
|
|
|
|
|
.%B 64 and IA-32 Architectures Software Developer’s Manual
|
|
|
|
|
.%V Volume 3
|
|
|
|
|
.Re
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Sh HISTORY
|
|
|
|
|
.Nm
|
|
|
|
|
first appeared in
|
|
|
|
|
.Fx 10.0 .
|
|
|
|
|
.Sh AUTHORS
|
2014-06-20 09:57:27 +00:00
|
|
|
|
.An Neel Natu Aq Mt neel@freebsd.org
|
|
|
|
|
.An Peter Grehan Aq Mt grehan@freebsd.org
|