summaryrefslogtreecommitdiff
path: root/usr.sbin/vmmctl/vmmctl.8
blob: 4d3242af17be2e8d8e6fd33f081a825687bcf197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.\"	$OpenBSD: vmmctl.8,v 1.7 2015/11/27 09:11:39 reyk Exp $
.\"
.\" Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 27 2015 $
.Dt VMMCTL 8
.Os
.Sh NAME
.Nm vmmctl
.Nd control VMM subsystem
.Sh SYNOPSIS
.Nm
.Op Fl s Ar socket
.Ar command
.Op Ar arg ...
.Sh DESCRIPTION
The
.Nm
utility is used to control the virtual machine monitor (VMM) subsystem.
A VMM manages virtual machines (VMs) on a
.Ar host .
The VMM subsystem is responsible for creating, destroying, and executing
VMs.
.Pp
Within the commands,
the
.Ar bytes
argument can be specified with a human-readable scale,
using the format described in
.Xr scan_scaled 3 .
.Sh VM COMMANDS
The options are as follows:
.Bl -tag -width Ds
.It Cm create Ar path Fl s Ar bytes
Creates a VM disk image file with the specified pathname and size,
rounded to megabytes.
.It Xo Cm start Ar name
.Fl k Ar path
.Fl m Ar bytes
.Op Fl d Ar path
.Op Fl i Ar count
.Xc
Starts a VM defined by the specified name and parameters:
.Bl -tag -width "memory size"
.It Fl d Ar path
Disk image file (may be specified multiple times to add multiple disk images).
.It Fl k Ar path
Kernel to load when booting the VM.
.It Fl m Ar bytes
Memory size of the VM, in bytes, rounded to megabytes.
.It Fl i Ar count
Number of network interfaces to add to the VM.
.El
.It Cm status Op Ar id
Lists VMs running on the host, optionally listing just the selected VM
.Ar id .
.It Cm stop Ar id
Stops (terminates) a VM defined by the specified VM
.Ar id .
.El
.Sh FILES
.Bl -tag -width "/etc/var/run/vmd.sockXX" -compact
.It Pa /etc/vmm.conf
Default configuration file.
.It Pa /var/run/vmd.sock
.Ux Ns -domain
socket used for communication with
.Xr vmd 8 .
.El
.Sh EXIT STATUS
.Ex -std vmmctl
.Nm
may fail due to one of the following reasons:
.Pp
.Bl -bullet -compact
.It
The VMM subsystem could not be enabled or disabled as requested.
.It
A requested VM-based operation could not be completed.
.El
.Sh EXAMPLES
Create a 4.5 Gigabyte disk image, disk.img:
.Dl $ vmmctl create disk.img -s 4.5G
.Pp
Create a new VM with 512MB memory, one network interface, one disk image
('disk.img') and boot from kernel '/bsd':
.Bd -literal -offset indent
$ vmmctl start "myvm" -m 512M -i 1 -d disk.img -k /bsd
.Ed
.Pp
Terminate VM number 1:
.Dl $ vmmctl stop 1
.Sh SEE ALSO
.Xr vmm 4 ,
.Xr vmm.conf 5 ,
.Xr rc.conf 8 ,
.Xr vmd 8
.Sh HISTORY
The
.Nm
command first appeared in
.Ox 5.9 .
.Sh AUTHORS
.An -nosplit
.An Mike Larkin Aq Mt mlarkin@openbsd.org
and
.An Reyk Floeter Aq Mt reyk@openbsd.org .