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$
|
|
|
|
|
.\"
|
2021-04-18 17:54:45 +00:00
|
|
|
|
.Dd April 18, 2021
|
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-12-24 01:15:33 +00:00
|
|
|
|
.Op Fl AaCDeHhPSuWwxY
|
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
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.Op Fl k Ar file
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.Oo Fl l
|
|
|
|
|
.Sm off
|
2021-04-18 17:54:45 +00:00
|
|
|
|
.Ar lpcdev Op Cm \&, Ar conf
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.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
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.Op Fl o Ar var Ns Cm = Ns Ar value
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.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
|
|
|
|
.Sm off
|
2021-04-18 17:54:45 +00:00
|
|
|
|
.Oo Fl s\~
|
|
|
|
|
.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf
|
2020-04-22 06:32:51 +00:00
|
|
|
|
.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
|
2021-04-18 17:54:45 +00:00
|
|
|
|
.Nm
|
|
|
|
|
.Fl l Cm help
|
|
|
|
|
.Nm
|
|
|
|
|
.Fl s Cm help
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.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
|
|
|
|
|
Generate ACPI tables.
|
|
|
|
|
Required for
|
|
|
|
|
.Fx Ns /amd64
|
|
|
|
|
guests.
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl a
|
|
|
|
|
The guest's local APIC is configured in xAPIC mode.
|
|
|
|
|
The xAPIC mode is the default setting so this option is redundant.
|
|
|
|
|
It will be deprecated in a future version.
|
|
|
|
|
.It Fl C
|
|
|
|
|
Include guest memory in core file.
|
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.
|
2020-06-25 12:35:20 +00:00
|
|
|
|
.It Fl D
|
|
|
|
|
Destroy the VM on guest initiated power-off.
|
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.
|
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
|
|
|
|
|
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.
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl h
|
|
|
|
|
Print help message and exit.
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.It Fl k Ar file
|
|
|
|
|
Set configuration variables from a simple, key-value config file.
|
|
|
|
|
Each line of the config file is expected to consist of a config variable
|
|
|
|
|
name, an equals sign
|
|
|
|
|
.Pq Sq = ,
|
|
|
|
|
and a value.
|
|
|
|
|
No spaces are permitted between the variable name, equals sign, or
|
|
|
|
|
value.
|
|
|
|
|
Blank lines and lines starting with
|
|
|
|
|
.Sq #
|
|
|
|
|
are ignored.
|
2021-04-18 19:41:15 +00:00
|
|
|
|
.It Fl l Cm help
|
|
|
|
|
Print a list of supported LPC devices.
|
|
|
|
|
.It Fl l Ar lpcdev Ns Op Cm \&, 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
|
2021-04-18 19:41:15 +00:00
|
|
|
|
.Cm com1 , com2 , com3 ,
|
|
|
|
|
and
|
|
|
|
|
.Cm com4 ,
|
2020-11-17 13:14:04 +00:00
|
|
|
|
the boot ROM device
|
2021-04-18 19:41:15 +00:00
|
|
|
|
.Cm bootrom ,
|
2020-11-17 13:14:04 +00:00
|
|
|
|
and the debug/test device
|
2021-04-18 19:41:15 +00:00
|
|
|
|
.Cm pc-testdev .
|
2018-08-23 07:34:51 +00:00
|
|
|
|
.Pp
|
2021-04-18 19:41:15 +00:00
|
|
|
|
The possible values for the
|
|
|
|
|
.Ar conf
|
|
|
|
|
argument are listed in the
|
|
|
|
|
.Fl s
|
|
|
|
|
flag description.
|
2021-04-18 19:56:13 +00:00
|
|
|
|
.It Xo
|
|
|
|
|
.Fl m Ar memsize Ns Oo
|
|
|
|
|
.Sm off
|
|
|
|
|
.Cm K | k | M | m | G | g | T | t
|
|
|
|
|
.Sm on
|
|
|
|
|
.Oc
|
|
|
|
|
.Xc
|
|
|
|
|
Set the guest physical memory size
|
2014-06-27 15:20:34 +00:00
|
|
|
|
This must be the same size that was given to
|
|
|
|
|
.Xr bhyveload 8 .
|
|
|
|
|
.Pp
|
2021-04-18 19:56:13 +00:00
|
|
|
|
The size argument may be suffixed with one of
|
|
|
|
|
.Cm K , M , G
|
|
|
|
|
or
|
|
|
|
|
.Cm T
|
|
|
|
|
(either upper or lower case)
|
|
|
|
|
to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes.
|
2014-06-27 15:20:34 +00:00
|
|
|
|
If no suffix is given, the value is assumed to be in megabytes.
|
2016-06-26 14:44:01 +00:00
|
|
|
|
.Pp
|
2021-04-18 19:56:13 +00:00
|
|
|
|
The default is 256M.
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.It Fl o Ar var Ns Cm = Ns Ar value
|
|
|
|
|
Set the configuration variable
|
|
|
|
|
.Ar var
|
|
|
|
|
to
|
|
|
|
|
.Ar value .
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl P
|
|
|
|
|
Force the guest virtual CPU to exit when a PAUSE instruction is detected.
|
2021-04-18 20:01:30 +00:00
|
|
|
|
.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu
|
2014-05-05 18:06:35 +00:00
|
|
|
|
Pin guest's virtual CPU
|
|
|
|
|
.Em vcpu
|
|
|
|
|
to
|
|
|
|
|
.Em 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
|
|
|
|
.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
|
2021-04-18 20:03:40 +00:00
|
|
|
|
.Fl s
|
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
|
|
|
|
and
|
2021-04-18 20:03:40 +00:00
|
|
|
|
.Fl l
|
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
|
|
|
|
options.
|
|
|
|
|
The count of vCPUs and memory configuration are read from the snapshot.
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl S
|
|
|
|
|
Wire guest memory.
|
2021-04-18 20:28:47 +00:00
|
|
|
|
.It Fl s Cm help
|
|
|
|
|
Print a list of supported PCI devices.
|
|
|
|
|
.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, 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.
|
2021-04-18 20:56:19 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar slot
|
|
|
|
|
can be specified in one of the following formats:
|
|
|
|
|
.Pp
|
|
|
|
|
.Bl -bullet -compact
|
|
|
|
|
.It
|
|
|
|
|
.Ar pcislot
|
|
|
|
|
.It
|
|
|
|
|
.Sm off
|
|
|
|
|
.Ar pcislot Cm \&: Ar function
|
|
|
|
|
.Sm on
|
|
|
|
|
.It
|
|
|
|
|
.Sm off
|
|
|
|
|
.Ar bus Cm \&: Ar pcislot Cm \&: Ar function
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
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.
|
2021-04-18 20:56:19 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar emulation
|
|
|
|
|
argument
|
|
|
|
|
can be one of the following:
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.Bl -tag -width "amd_hostbridge"
|
|
|
|
|
.It Cm hostbridge
|
|
|
|
|
A simple host bridge.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
This is usually configured at slot 0, and is required by most guest
|
|
|
|
|
operating systems.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm amd_hostbridge
|
|
|
|
|
Emulation identical to
|
|
|
|
|
.Cm hostbridge
|
|
|
|
|
using a PCI vendor ID of AMD.
|
|
|
|
|
.It Cm passthru
|
2013-12-13 08:31:13 +00:00
|
|
|
|
PCI pass-through device.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-net
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Virtio network interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-blk
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Virtio block storage interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-scsi
|
2018-06-11 02:09:20 +00:00
|
|
|
|
Virtio SCSI interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-9p
|
2020-10-03 19:05:13 +00:00
|
|
|
|
Virtio 9p (VirtFS) interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-rnd
|
2014-04-02 20:18:17 +00:00
|
|
|
|
Virtio RNG interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm virtio-console
|
2017-02-27 15:37:38 +00:00
|
|
|
|
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.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm ahci
|
2016-10-17 09:40:18 +00:00
|
|
|
|
AHCI controller attached to arbitrary devices.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm ahci-cd
|
2013-12-13 08:31:13 +00:00
|
|
|
|
AHCI controller attached to an ATAPI CD/DVD.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm ahci-hd
|
|
|
|
|
AHCI controller attached to a SATA hard drive.
|
|
|
|
|
.It Cm e1000
|
2016-07-09 20:41:59 +00:00
|
|
|
|
Intel e82545 network interface.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm uart
|
2013-12-13 08:31:13 +00:00
|
|
|
|
PCI 16550 serial device.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm lpc
|
|
|
|
|
LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports,
|
|
|
|
|
a boot ROM, and,
|
2020-11-17 13:14:04 +00:00
|
|
|
|
optionally, the debug/test device.
|
2015-06-18 06:00:17 +00:00
|
|
|
|
The LPC bridge emulation can only be configured on bus 0.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm fbuf
|
2017-04-28 05:43:27 +00:00
|
|
|
|
Raw framebuffer device attached to VNC server.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm xhci
|
2017-05-03 21:44:04 +00:00
|
|
|
|
eXtensible Host Controller Interface (xHCI) USB controller.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm nvme
|
- 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
|
|
|
|
NVM Express (NVMe) controller.
|
2021-04-18 21:08:39 +00:00
|
|
|
|
.It Cm hda
|
2019-06-25 06:14:11 +00:00
|
|
|
|
High Definition Audio Controller.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
2021-04-18 20:56:19 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The optional parameter
|
|
|
|
|
.Ar conf
|
|
|
|
|
describes the backend for device emulations.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
If
|
|
|
|
|
.Ar conf
|
|
|
|
|
is not specified, the device emulation has no backend and can be
|
|
|
|
|
considered unconnected.
|
|
|
|
|
.Pp
|
2021-04-18 21:29:30 +00:00
|
|
|
|
Network backends formats for
|
|
|
|
|
.Ar conf :
|
|
|
|
|
.Sm off
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.It
|
|
|
|
|
.Xo
|
|
|
|
|
.Cm tap Ar N
|
|
|
|
|
.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
|
|
|
|
|
.Op Cm \&,mtu= Ar N
|
|
|
|
|
.Xc
|
|
|
|
|
.It
|
|
|
|
|
.Xo
|
|
|
|
|
.Cm vmnet Ar N
|
|
|
|
|
.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
|
|
|
|
|
.Op Cm \&,mtu= Ar N
|
|
|
|
|
.Xc
|
|
|
|
|
.It
|
|
|
|
|
.Xo
|
|
|
|
|
.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK
|
|
|
|
|
.Op Cm \&,socket= Ar NAME
|
|
|
|
|
.Op Cm \&,hook= Ar HOOK
|
|
|
|
|
.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx
|
|
|
|
|
.Op Cm \&,mtu= Ar N
|
|
|
|
|
.Xc
|
|
|
|
|
.El
|
|
|
|
|
.Sm on
|
2013-12-13 08:31:13 +00:00
|
|
|
|
If
|
2021-04-18 21:29:30 +00:00
|
|
|
|
.Cm mac
|
2013-12-13 08:31:13 +00:00
|
|
|
|
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
|
2021-04-18 21:29:30 +00:00
|
|
|
|
With
|
|
|
|
|
.Cm virtio-net
|
|
|
|
|
devices, the
|
|
|
|
|
.Cm mtu
|
2020-05-09 07:57:41 +00:00
|
|
|
|
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
|
2021-04-18 21:29:30 +00:00
|
|
|
|
With
|
|
|
|
|
.Cm netgraph
|
|
|
|
|
backend, the
|
|
|
|
|
.Cm path
|
2020-05-18 15:03:52 +00:00
|
|
|
|
and
|
2021-04-18 21:29:30 +00:00
|
|
|
|
.Cm peerhook
|
2020-05-18 15:03:52 +00:00
|
|
|
|
parameters must be specified to set the destination node and corresponding hook.
|
|
|
|
|
The optional parameters
|
2021-04-18 21:29:30 +00:00
|
|
|
|
.Cm socket
|
2020-05-18 15:03:52 +00:00
|
|
|
|
and
|
2021-04-18 21:29:30 +00:00
|
|
|
|
.Cm hook
|
2020-05-18 15:03:52 +00:00
|
|
|
|
may be used to set the
|
|
|
|
|
.Xr ng_socket 4
|
|
|
|
|
node name and source hook.
|
|
|
|
|
The
|
|
|
|
|
.Ar ADDRESS ,
|
2021-04-18 21:29:30 +00:00
|
|
|
|
.Ar HOOK ,
|
2020-05-18 15:03:52 +00:00
|
|
|
|
and
|
|
|
|
|
.Ar NAME
|
|
|
|
|
must comply with
|
|
|
|
|
.Xr netgraph 4
|
|
|
|
|
addressing rules.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Pp
|
2021-04-18 21:39:53 +00:00
|
|
|
|
Block storage device backends:
|
|
|
|
|
.Sm off
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.It
|
|
|
|
|
.Ar /filename Op Cm \&, Ar block-device-options
|
|
|
|
|
.It
|
|
|
|
|
.Ar /dev/xxx Op Cm \&, Ar block-device-options
|
2015-05-12 00:30:39 +00:00
|
|
|
|
.El
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.Sm on
|
2015-05-12 00:30:39 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar block-device-options
|
|
|
|
|
are:
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.Bl -tag -width 10n
|
|
|
|
|
.It Cm nocache
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Open the file with
|
|
|
|
|
.Dv O_DIRECT .
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.It Cm direct
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Open the file using
|
|
|
|
|
.Dv O_SYNC .
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.It Cm ro
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Force the file to be opened read-only.
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc
|
2015-05-12 00:30:39 +00:00
|
|
|
|
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.
|
2021-04-18 21:39:53 +00:00
|
|
|
|
.It Cm nodelete
|
2021-01-21 20:32:15 +00:00
|
|
|
|
Disable emulation of guest trim requests via
|
|
|
|
|
.Dv DIOCGDELETE
|
|
|
|
|
requests.
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2021-04-18 21:49:18 +00:00
|
|
|
|
SCSI device backends:
|
|
|
|
|
.Sm off
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.It
|
|
|
|
|
.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc
|
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
|
|
|
|
.El
|
2021-04-18 21:49:18 +00:00
|
|
|
|
.Sm on
|
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
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar scsi-device-options
|
|
|
|
|
are:
|
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 21:49:18 +00:00
|
|
|
|
.It Cm iid= Ns Ar IID
|
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
|
|
|
|
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
|
2021-04-18 21:52:48 +00:00
|
|
|
|
9P device backends:
|
|
|
|
|
.Sm off
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.It
|
|
|
|
|
.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options
|
2020-10-03 19:05:13 +00:00
|
|
|
|
.El
|
2021-04-18 21:52:48 +00:00
|
|
|
|
.Sm on
|
2020-10-03 19:05:13 +00:00
|
|
|
|
.Pp
|
|
|
|
|
The
|
|
|
|
|
.Ar 9p-device-options
|
|
|
|
|
are:
|
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 21:52:48 +00:00
|
|
|
|
.It Cm ro
|
2020-10-03 19:05:13 +00:00
|
|
|
|
Expose the share in read-only mode.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2021-04-18 22:09:22 +00:00
|
|
|
|
TTY device backends:
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 22:09:22 +00:00
|
|
|
|
.It Cm stdio
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Connect the serial port to the standard input and output of
|
2015-08-07 10:48:52 +00:00
|
|
|
|
the
|
|
|
|
|
.Nm
|
|
|
|
|
process.
|
2021-04-18 22:09:22 +00:00
|
|
|
|
.It Ar /dev/xxx
|
2013-12-13 08:31:13 +00:00
|
|
|
|
Use the host TTY device for serial port I/O.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2021-04-18 22:09:22 +00:00
|
|
|
|
Boot ROM device backends:
|
2015-06-18 06:00:17 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 22:09:22 +00:00
|
|
|
|
.It Ar romfile
|
2015-06-18 06:00:17 +00:00
|
|
|
|
Map
|
|
|
|
|
.Ar romfile
|
|
|
|
|
in the guest address space reserved for boot firmware.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2021-04-18 22:09:22 +00:00
|
|
|
|
Pass-through device backends:
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 22:09:22 +00:00
|
|
|
|
.It Ns Ar slot Ns Cm \&/ Ns Ar bus Ns Cm \&/ Ns Ar function
|
2013-12-13 08:31:13 +00:00
|
|
|
|
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
|
2021-04-18 22:23:26 +00:00
|
|
|
|
Virtio console device backends:
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.Sm off
|
|
|
|
|
.It
|
|
|
|
|
.Cm port1= Ns Ar /path/to/port1.sock Ns Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ...
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2017-02-27 15:37:38 +00:00
|
|
|
|
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:
|
2021-04-18 22:23:26 +00:00
|
|
|
|
.Bl -bullet -offset
|
2017-02-27 15:37:38 +00:00
|
|
|
|
.It
|
|
|
|
|
Due to lack of destructors in
|
|
|
|
|
.Nm ,
|
|
|
|
|
sockets on the filesystem must be cleaned up manually after
|
|
|
|
|
.Nm
|
|
|
|
|
exits.
|
|
|
|
|
.It
|
2021-04-18 22:23:26 +00:00
|
|
|
|
There is no way to use the
|
|
|
|
|
.Dq 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
|
2017-04-28 05:43:27 +00:00
|
|
|
|
.Pp
|
2021-04-18 22:59:44 +00:00
|
|
|
|
Framebuffer devices backends:
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.Sm off
|
|
|
|
|
.It
|
|
|
|
|
.Op Cm rfb= Ar ip-and-port
|
|
|
|
|
.Op Cm ,w= Ar width
|
|
|
|
|
.Op Cm ,h= Ar height
|
|
|
|
|
.Op Cm ,vga= Ar vgaconf
|
|
|
|
|
.Op Cm ,wait
|
|
|
|
|
.Op Cm ,password= Ar password
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
Configuration options are defined as follows:
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port
|
|
|
|
|
An IP address and a port VNC should listen on.
|
|
|
|
|
There are two formats:
|
|
|
|
|
.Pp
|
|
|
|
|
.Bl -bullet -compact
|
|
|
|
|
.It IPv4
|
|
|
|
|
.Sm off
|
|
|
|
|
.Op Ar IPv4 Cm \&:
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Ar port
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Sm on
|
|
|
|
|
.It IPv6
|
|
|
|
|
.Sm off
|
|
|
|
|
.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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.
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.It Cm w= Ns Ar width No and Cm h= Ns Ar height
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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.
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.It Cm vga= Ns Ar vgaconf
|
2017-05-03 21:44:04 +00:00
|
|
|
|
Possible values for this option are
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm io
|
2017-05-03 21:44:04 +00:00
|
|
|
|
(default),
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm on
|
2017-05-03 21:44:04 +00:00
|
|
|
|
, and
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm off .
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm 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
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm on
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.Cm off
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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.
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.It Cm 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.
|
2021-04-18 22:59:44 +00:00
|
|
|
|
.It Cm password= Ns Ar password
|
2017-06-02 02:35:16 +00:00
|
|
|
|
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
|
|
|
|
.Pp
|
2021-04-18 23:16:51 +00:00
|
|
|
|
xHCI USB device backends:
|
2017-05-03 21:44:04 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm tablet
|
2017-05-03 21:44:04 +00:00
|
|
|
|
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
|
2021-04-18 23:16:51 +00:00
|
|
|
|
NVMe device backends:
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.Sm off
|
|
|
|
|
.It
|
|
|
|
|
.Ar devpath
|
|
|
|
|
.Op Cm ,maxq= Ar #
|
|
|
|
|
.Op Cm ,qsz= Ar #
|
|
|
|
|
.Op Cm ,ioslots= Ar #
|
|
|
|
|
.Op Cm ,sectsz= Ar #
|
|
|
|
|
.Op Cm ,ser= Ar #
|
|
|
|
|
.Op Cm ,eui64= Ar #
|
|
|
|
|
.Op Cm ,dsm= Ar opt
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
Configuration options are defined as follows:
|
- 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
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Ar devpath
|
- 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
|
|
|
|
Accepted device paths are:
|
|
|
|
|
.Ar /dev/blockdev
|
|
|
|
|
or
|
|
|
|
|
.Ar /path/to/image
|
|
|
|
|
or
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.Cm ram= Ns Ar size_in_MiB .
|
|
|
|
|
.It Cm maxq
|
- 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
|
|
|
|
Max number of queues.
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm qsz
|
- 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
|
|
|
|
Max elements in each queue.
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm ioslots
|
- 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
|
|
|
|
Max number of concurrent I/O requests.
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm sectsz
|
- 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
|
|
|
|
Sector size (defaults to blockif sector size).
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm ser
|
- 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
|
|
|
|
Serial number with maximum 20 characters.
|
2021-04-18 23:16:51 +00:00
|
|
|
|
.It Cm eui64
|
|
|
|
|
IEEE Extended Unique Identifier (8 byte value).
|
|
|
|
|
.It Cm dsm
|
|
|
|
|
DataSet Management support.
|
|
|
|
|
Supported values are:
|
|
|
|
|
.Cm auto , enable ,
|
|
|
|
|
and
|
|
|
|
|
.Cm disable .
|
- 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
|
|
|
|
.El
|
2019-06-25 06:14:11 +00:00
|
|
|
|
.Pp
|
2021-04-18 23:44:23 +00:00
|
|
|
|
AHCI device backends:
|
|
|
|
|
.Bl -bullet
|
|
|
|
|
.It
|
|
|
|
|
.Sm off
|
|
|
|
|
.Op Oo Cm hd\&: | cd\&: Oc Ar path
|
|
|
|
|
.Op Cm ,nmrr= Ar nmrr
|
|
|
|
|
.Op Cm ,ser= Ar #
|
|
|
|
|
.Op Cm ,rev= Ar #
|
|
|
|
|
.Op Cm ,model= Ar #
|
|
|
|
|
.Sm on
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
Configuration options are defined as follows:
|
2020-07-27 07:56:55 +00:00
|
|
|
|
.Bl -tag -width 10n
|
2021-04-18 23:44:23 +00:00
|
|
|
|
.It Cm nmrr
|
|
|
|
|
Nominal Media Rotation Rate, known as RPM.
|
|
|
|
|
Value 1 will indicate device as Solid State Disk.
|
|
|
|
|
Default value is 0, not report.
|
|
|
|
|
.It Cm ser
|
2020-07-27 07:56:55 +00:00
|
|
|
|
Serial Number with maximum 20 characters.
|
2021-04-18 23:44:23 +00:00
|
|
|
|
.It Cm rev
|
2020-07-27 07:56:55 +00:00
|
|
|
|
Revision Number with maximum 8 characters.
|
2021-04-18 23:44:23 +00:00
|
|
|
|
.It Cm model
|
2020-07-27 07:56:55 +00:00
|
|
|
|
Model Number with maximum 40 characters.
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
2019-06-25 06:14:11 +00:00
|
|
|
|
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
|
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 .
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl u
|
|
|
|
|
RTC keeps UTC time.
|
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.
|
2021-04-18 18:26:04 +00:00
|
|
|
|
.It Fl w
|
|
|
|
|
Ignore accesses to unimplemented Model Specific Registers (MSRs).
|
|
|
|
|
This is intended for debug purposes.
|
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
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.Sh CONFIGURATION VARIABLES
|
|
|
|
|
.Nm
|
|
|
|
|
uses an internal tree of configuration variables to describe global and
|
|
|
|
|
per-device settings.
|
|
|
|
|
When
|
|
|
|
|
.Nm
|
|
|
|
|
starts,
|
|
|
|
|
it parses command line options (including config files) in the order given
|
|
|
|
|
on the command line.
|
|
|
|
|
Each command line option sets one or more configuration variables.
|
|
|
|
|
For example,
|
|
|
|
|
the
|
|
|
|
|
.Fl s
|
|
|
|
|
option creates a new tree node for a PCI device and sets one or more variables
|
|
|
|
|
under that node including the device model and device model-specific variables.
|
|
|
|
|
Variables may be set multiple times during this parsing stage with the final
|
|
|
|
|
value overriding previous values.
|
|
|
|
|
.Pp
|
|
|
|
|
Once all of the command line options have been processed,
|
|
|
|
|
the configuration values are frozen.
|
|
|
|
|
.Nm
|
|
|
|
|
then uses the value of configuration values to initialize device models
|
|
|
|
|
and global settings.
|
|
|
|
|
.Pp
|
|
|
|
|
More details on configuration variables can be found in
|
|
|
|
|
.Xr bhyve_config 5 .
|
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
|
2021-04-18 20:06:12 +00:00
|
|
|
|
.Bl -tag -width SIGTERM -compact
|
2016-04-20 06:29:03 +00:00
|
|
|
|
.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 ,
|
2019-06-26 20:30:41 +00:00
|
|
|
|
.Xr bhyve_config 5 ,
|
2013-12-13 08:31:13 +00:00
|
|
|
|
.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
|