xref: /freebsd/usr.sbin/bhyvectl/bhyvectl.8 (revision df21a004be237a1dccd03c7b47254625eea62fa9)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2015 Christian Brueffer
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd May 8, 2025
29.Dt BHYVECTL 8
30.Os
31.Sh NAME
32.Nm bhyvectl
33.Nd control utility for bhyve instances
34.Sh SYNOPSIS
35.Nm
36.Fl -vm= Ns Ar <vmname>
37.Op Fl -create
38.Op Fl -destroy
39.Op Fl -get-stats
40.Op Fl -inject-nmi
41.Op Fl -force-reset
42.Op Fl -force-poweroff
43.Op Fl -checkpoint= Ns Ar <file>
44.Op Fl -suspend= Ns Ar <file>
45.Sh DESCRIPTION
46The
47.Nm
48command is a control utility for active
49.Xr bhyve 8
50virtual machine instances.
51.Pp
52The user-facing options are as follows:
53.Bl -tag -width "--checkpoint=<file>"
54.It Fl -vm= Ns Ar <vmname>
55Operate on the virtual machine
56.Ar <vmname> .
57.It Fl -create
58Create the specified VM.
59.It Fl -destroy
60Destroy the specified VM.
61.It Fl -get-stats
62Retrieve statistics for the specified VM.
63.It Fl -inject-nmi
64Inject a non-maskable interrupt (NMI) into the VM.
65.It Fl -force-reset
66Force the VM to reset.
67.It Fl -force-poweroff
68Force the VM to power off.
69.It Fl -checkpoint= Ns Ar <file>
70Save a snapshot of a virtual machine.
71The guest memory contents are saved in the file given in
72.Ar <file> .
73The guest device and vCPU state are saved in the file
74.Ar <file>.kern .
75.It Fl -suspend= Ns Ar <file>
76Save a snapshot of a virtual machine similar to
77.Fl -checkpoint .
78The virtual machine will terminate after the snapshot has been
79saved.
80.El
81.Pp
82.Em Note :
83Most
84.Nm
85flags are intended for querying and setting
86the state of an active instance.
87These commands are intended for development purposes,
88and are not documented here.
89A complete list can be obtained by executing
90.Nm
91without any arguments.
92.Sh EXIT STATUS
93.Ex -std
94.Sh EXAMPLES
95Destroy the VM called fbsd10:
96.Pp
97.Dl bhyvectl --vm=fbsd10 --destroy
98.Pp
99Running VMs will be visible in
100.Pa /dev/vmm/ .
101.Sh COMPATIBILITY
102The snapshot file format is not yet stable and is subject to future changes.
103Backwards compatibility support for the current snapshot file format is not
104guaranteed when future changes are made.
105.Sh SEE ALSO
106.Xr bhyve 8 ,
107.Xr bhyveload 8
108.Sh HISTORY
109The
110.Nm
111command first appeared in
112.Fx 10.1 .
113.Sh AUTHORS
114.An -nosplit
115The
116.Nm
117utility was written by
118.An Peter Grehan
119and
120.An Neel Natu .
121