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