xref: /openbsd-src/usr.sbin/vmd/vmd.8 (revision cc67ceff402c665a8dd21818cd8878058e410ed3)
1.\"	$OpenBSD: vmd.8,v 1.12 2024/09/24 20:02:39 jmc Exp $
2.\"
3.\" Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: September 24 2024 $
18.Dt VMD 8
19.Os
20.Sh NAME
21.Nm vmd
22.Nd virtual machine daemon
23.Sh SYNOPSIS
24.Nm vmd
25.Op Fl dnv
26.Op Fl D Ar macro Ns = Ns Ar value
27.Op Fl f Ar file
28.Sh DESCRIPTION
29.Nm
30is a daemon responsible for the execution of virtual machines (VMs) on a
31host.
32.Nm
33is typically started at boot time and is controlled via
34.Xr vmctl 8 .
35.Pp
36To have
37.Nm
38enabled at boot time, use
39.Dq rcctl enable vmd ,
40which sets
41.Pp
42.Dl vmd_flags=\(dq\(dq
43.Pp
44in
45.Xr rc.conf.local 8 .
46.Pp
47.Nm
48interfaces with the virtual machine monitor (VMM) built into the kernel.
49One instance of
50.Nm
51will be spawned for each VM running on the host, plus extra instances
52for control operations.
53Each child
54.Nm
55will in turn create one or more VCPU (virtual CPU) threads responsible for
56driving the VM's operations using
57.Xr vmm 4 .
58.Pp
59.Nm
60is also responsible for proxying various other commands/requests from
61.Xr vmctl 8 ,
62such as stopping VMs, and retrieving information from
63.Xr vmm 4
64about running VMs.
65.Pp
66When the host machine is shut down,
67.Nm
68sends each running VM a shutdown request via the
69.Xr vmmci 4
70device.
71If the VMs are vmmci-aware,
72this provides each VM the chance to shut down cleanly in anticipation
73of host shutdown.
74During shutdown,
75.Nm
76waits 30 seconds for the VMs to terminate cleanly before forcibly
77stopping them.
78This 30 second default can be changed by
79.Dq rcctl set vmd timeout n ,
80where 'n' is the desired timeout in seconds.
81.Pp
82The options are as follows:
83.Bl -tag -width Ds
84.It Fl D Ar macro Ns = Ns Ar value
85Define
86.Ar macro
87to be set to
88.Ar value
89on the command line.
90Overrides the definition of
91.Ar macro
92in the configuration file.
93.It Fl d
94Do not daemonize and log to
95.Em stderr .
96.It Fl f Ar file
97Specify an alternative configuration file.
98The default is
99.Pa /etc/vm.conf .
100.It Fl n
101Configtest mode.
102Only check the configuration file for validity.
103.It Fl v
104Verbose mode.
105Multiple
106.Fl v
107options increase the verbosity.
108.El
109.Sh FILES
110.Bl -tag -width "/etc/firmware/vmm-biosXX" -compact
111.It Pa /etc/firmware/vmm-bios
112Default BIOS boot image.
113The BIOS is an external firmware file that is distributed separately
114due to an incompatible license.
115A prepackaged version of the firmware can be installed using
116.Xr fw_update 8 .
117.It Pa /etc/vm.conf
118Default configuration file.
119This is optional.
120.It Pa /var/run/vmd.sock
121.Ux Ns -domain
122socket used for communication with
123.Xr vmctl 8 .
124.El
125.Sh SEE ALSO
126.Xr vmm 4 ,
127.Xr vmmci 4 ,
128.Xr vm.conf 5 ,
129.Xr rc.conf 8 ,
130.Xr vmctl 8
131.Sh HISTORY
132The
133.Nm
134command first appeared in
135.Ox 5.9 .
136.Sh AUTHORS
137.An -nosplit
138.An Mike Larkin Aq Mt mlarkin@openbsd.org
139and
140.An Reyk Floeter Aq Mt reyk@openbsd.org .
141