Reference

bhyvectl(8)

control utility for bhyve instances

NAME

bhyvectl – control utility for bhyve instances

SYNOPSIS

bhyvectl --vm=<vmname> [--create] [--destroy] [--get-stats] [--get-vm-pid] [--inject-nmi] [--force-reset] [--force-poweroff] [--checkpoint=<file>] [--rundir=<path>] [--suspend=<file>]

DESCRIPTION

The bhyvectl command is a control utility for active bhyve(8) virtual machine instances.

The user-facing options are as follows:

--vm=<vmname>

Operate on the virtual machine <vmname>.

--create

Create the specified VM.

--destroy

Destroy the specified VM.

--get-stats

Retrieve statistics for the specified VM.

--get-vm-pid

Print the process ID of the bhyve process running the specified VM. In monitor mode, this is the child process executing the VM.

--inject-nmi

Inject a non-maskable interrupt (NMI) into the VM.

--force-reset

Force the VM to reset.

--force-poweroff

Force the VM to power off.

--checkpoint=<file>

Save a snapshot of a virtual machine. The guest memory contents are saved in the file given in <file>. The guest device and vCPU state are saved in the file <file>.kern.

--suspend=<file>

Save a snapshot of a virtual machine similar to --checkpoint. The virtual machine will terminate after the snapshot has been saved.

--rundir=<path>

Specify path to the directory containing the bhyve IPC socket. If not specified, /var/run/bhyve is used.

Note: Most bhyvectl flags are intended for querying and setting the state of an active instance. These commands are intended for development purposes, and are not documented here. A complete list can be obtained by executing bhyvectl without any arguments.

EXIT STATUS

The bhyvectl utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Destroy the VM called fbsd10:

bhyvectl --vm=fbsd10 --destroy

Running VMs will be visible in /dev/vmm/.

COMPATIBILITY

The snapshot file format is not yet stable and is subject to future changes. Backwards compatibility support for the current snapshot file format is not guaranteed when future changes are made.

SEE ALSO

bhyve(8), bhyveload(8)

HISTORY

The bhyvectl command first appeared in FreeBSD 10.1.

AUTHORS

The bhyvectl utility was written by Peter Grehan and Neel Natu.

History

--checkpoint since FreeBSD 13.0-RELEASE; --get-stats since FreeBSD 11.1-RELEASE; --get-vm-pid since FreeBSD 16.0-CURRENT (2026-10-27); --rundir since FreeBSD 16.0-CURRENT (2026-10-27); --suspend since FreeBSD 13.0-RELEASE.

--get-state until FreeBSD 11.0-RELEASE.