NAME
vmctl
—
control the virtual machine
daemon
SYNOPSIS
vmctl |
command [arg ...] |
DESCRIPTION
The vmctl
utility is used to control the
virtual machine monitor (VMM) subsystem. A VMM manages virtual machines
(VMs) on a host. The VMM subsystem is responsible for
creating, destroying, and executing VMs.
Within the commands, the size argument can be specified with a human-readable scale, using the format described in scan_scaled(3). The id argument can be either a numeric, non-zero identifier or alternatively the name of a virtual machine.
VM COMMANDS
The options are as follows:
console
id- Using cu(1) connect to the console of the VM with the specified id.
create
path-s
size- Creates a VM disk image file with the specified path and size, rounded to megabytes.
load
[filename]- Load the configuration from the specified file.
reload
[filename]- Reload the configuration from the default configuration file.
start
[name] [-c
]-k
path-m
size [-d
path] [-i
count]- Starts a VM defined by the specified name and parameters:
-c
- Automatically connect to the VM console.
-d
path- Disk image file (may be specified multiple times to add multiple disk images).
-i
count- Number of network interfaces to add to the VM.
-k
path- Kernel to load when booting the VM.
-m
size- Memory size of the VM, rounded to megabytes.
status
[id]- Lists VMs running on the host, optionally listing just the selected VM id.
stop
id- Stops (terminates) a VM defined by the specified VM id.
FILES
- /etc/vm.conf
- Default configuration file.
- /var/run/vmd.sock
- UNIX-domain socket used for communication with vmd(8).
EXIT STATUS
The vmctl
utility exits 0 on
success, and >0 if an error occurs. vmctl
may fail due to one of the following reasons:
- The VMM subsystem could not be enabled or disabled as requested.
- A requested VM-based operation could not be completed.
EXAMPLES
Create a 4.5 Gigabyte disk image, disk.img:
$ vmctl create disk.img -s
4.5G
Create a new VM with 512MB memory, one network interface, one disk image ('disk.img') and boot from kernel '/bsd':
$ vmctl start "myvm" -m 512M -i 1 -d disk.img -k /bsd
Terminate VM number 1:
$ vmctl stop 1
SEE ALSO
HISTORY
The vmctl
command first appeared in
OpenBSD 5.9.
AUTHORS
Mike Larkin <mlarkin@openbsd.org> and Reyk Floeter <reyk@openbsd.org>.