xref: /openbsd-src/usr.sbin/vmctl/vmctl.8 (revision 94f7e77381d8740eda105b9aeb4cd369aa14fbfe)
1*94f7e773Sjmc.\"	$OpenBSD: vmctl.8,v 1.78 2024/05/04 07:51:21 jmc Exp $
2eb8d1da1Sreyk.\"
33d08ede4Smlarkin.\" Copyright (c) 2015-2024 Mike Larkin <mlarkin@openbsd.org>
4eb8d1da1Sreyk.\"
5eb8d1da1Sreyk.\" Permission to use, copy, modify, and distribute this software for any
6eb8d1da1Sreyk.\" purpose with or without fee is hereby granted, provided that the above
7eb8d1da1Sreyk.\" copyright notice and this permission notice appear in all copies.
8eb8d1da1Sreyk.\"
9eb8d1da1Sreyk.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10eb8d1da1Sreyk.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11eb8d1da1Sreyk.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12eb8d1da1Sreyk.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13eb8d1da1Sreyk.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14eb8d1da1Sreyk.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15eb8d1da1Sreyk.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16eb8d1da1Sreyk.\"
17*94f7e773Sjmc.Dd $Mdocdate: May 4 2024 $
18eb8d1da1Sreyk.Dt VMCTL 8
19eb8d1da1Sreyk.Os
20eb8d1da1Sreyk.Sh NAME
21eb8d1da1Sreyk.Nm vmctl
22eb8d1da1Sreyk.Nd control the virtual machine daemon
23eb8d1da1Sreyk.Sh SYNOPSIS
24eb8d1da1Sreyk.Nm
254d2a1fb2Sreyk.Op Fl v
26eb8d1da1Sreyk.Ar command
27eb8d1da1Sreyk.Op Ar arg ...
28eb8d1da1Sreyk.Sh DESCRIPTION
29eb8d1da1SreykThe
30eb8d1da1Sreyk.Nm
31eb8d1da1Sreykutility is used to control the virtual machine monitor (VMM) subsystem.
32d1dfdf78SjmcA VMM manages virtual machines (VMs) on a host.
33eb8d1da1SreykThe VMM subsystem is responsible for creating, destroying, and executing
34eb8d1da1SreykVMs.
35eb8d1da1Sreyk.Pp
364d2a1fb2SreykThe
374d2a1fb2Sreyk.Fl v
384d2a1fb2Sreykoption enables verbose mode.
39eb8d1da1SreykWithin the commands,
40eb8d1da1Sreykthe
41549fc21aSsobrado.Ar size
42eb8d1da1Sreykargument can be specified with a human-readable scale,
43eb8d1da1Sreykusing the format described in
44eb8d1da1Sreyk.Xr scan_scaled 3 .
4559fb7762SreykThe
4659fb7762Sreyk.Ar id
4759fb7762Sreykargument can be either a numeric, non-zero identifier or alternatively
4859fb7762Sreykthe name of a virtual machine.
49ac17f33bSjmc.Pp
504d2a1fb2SreykThe
51f34f2a88Skn.Ar name
52f34f2a88Sknargument can only consist of alphanumeric characters, as well as '.', '-',
53f34f2a88Sknand '_',
54f34f2a88Sknand must start with a letter.
55f34f2a88Skn.Pp
56f34f2a88SknThe
574d2a1fb2Sreyk.Ar disk
584d2a1fb2Sreykargument is used by commands that take a path to a disk image file.
594d2a1fb2SreykIt may be prefixed with a format prefix
6024235575Sjmc.Pf ( raw : Ns Ar disk
614d2a1fb2Sreykor
6224235575Sjmc.Pf qcow2 : Ns Ar disk )
634d2a1fb2Sreyk.Sm on
644d2a1fb2Sreykin order to specify the disk image format.
654d2a1fb2SreykIf left unspecified, the format defaults to
664d2a1fb2Sreyk.Sq raw
674d2a1fb2Sreykif it cannot be derived automatically.
684d2a1fb2Sreyk.Pp
69ac17f33bSjmcThe commands are as follows:
70eb8d1da1Sreyk.Bl -tag -width Ds
7195009bb4Sreyk.It Cm console Ar id
723c1d2afeSmlarkinUsing
733c1d2afeSmlarkin.Xr cu 1
743c1d2afeSmlarkinconnect to the console of the VM with the specified
7595009bb4Sreyk.Ar id .
76bd4b76f8Sreyk.It Cm create Oo Fl b Ar base | Fl i Ar disk Oc Oo Fl s Ar size Oc Ar disk
7726212166SknCreate a VM disk image file with the specified
784d2a1fb2Sreyk.Ar disk
794d2a1fb2Sreykpath.
804d2a1fb2Sreyk.Bl -tag -width "-i input"
814d2a1fb2Sreyk.It Fl b Ar base
824d2a1fb2SreykFor
834d2a1fb2Sreyk.Sq qcow2 ,
844d2a1fb2Sreyka
8573613953Sreyk.Ar base
8673613953Sreykimage may be specified.
874d2a1fb2SreykThe base image is not modified and the derived image contains only the
884d2a1fb2Sreykchanges written by the VM.
894d2a1fb2Sreyk.It Fl i Ar disk
904d2a1fb2SreykCopy and convert the input
914d2a1fb2Sreyk.Ar disk
924d2a1fb2Sreykto the newly created disk.
934d2a1fb2SreykThis option conflicts with
944d2a1fb2Sreyk.Fl b Ar base .
954d2a1fb2Sreyk.It Fl s Ar size
964d2a1fb2SreykSpecify the
9773613953Sreyk.Ar size
984d2a1fb2Sreykof the new disk image, rounded to megabytes.
994d2a1fb2SreykIf the
1004d2a1fb2Sreyk.Fl b
1014d2a1fb2Sreykoption is specified, the size must match the size of the
1024d2a1fb2Sreyk.Ar base
1034d2a1fb2Sreykimage.
1044d2a1fb2SreykFor the
1054d2a1fb2Sreyk.Fl i
1064d2a1fb2Sreykoption, the size cannot be smaller than the input disk size.
107edd77514SfcambusThe size can be omitted with the
1084d2a1fb2Sreyk.Fl b
1094d2a1fb2Sreykand
1104d2a1fb2Sreyk.Fl i
1114d2a1fb2Sreykoptions and will be obtained from the base or input image respectively.
1124d2a1fb2Sreyk.El
1131f7fe034Sreyk.It Cm load Ar filename
11456502f88SeddLoad additional configuration from the specified file.
115aaf1d71dSjmc.It Cm log brief | verbose
116aaf1d71dSjmcDisable or enable verbose debug logging.
117eed20f3bSpd.It Cm pause Ar id
118eed20f3bSpdPause a VM with the specified
119eed20f3bSpd.Ar id .
120eed20f3bSpd.It Cm receive Ar name
121eed20f3bSpdReceive a VM from standard input and start it with the specified
122eed20f3bSpd.Ar name .
1231f7fe034Sreyk.It Cm reload
12456502f88SeddRemove all stopped VMs and reload the configuration from the default
1251a563a30Sjsgconfiguration file.
1261a563a30SjsgVMs that are currently running will not have their configuration reloaded.
1271a563a30SjsgTo reload configurations for currently running VMs, stop those VMs before
1281a563a30Sjsgissuing the reload command.
129aaf1d71dSjmc.It Cm reset Op Cm all | switches | vms
130aaf1d71dSjmcReset the running state,
131aaf1d71dSjmcreset
132aaf1d71dSjmc.Cm switches ,
133aaf1d71dSjmcor reset and terminate all
134aaf1d71dSjmc.Cm vms .
135eed20f3bSpd.It Cm send Ar id
136eed20f3bSpdSend a VM with the specified
137eed20f3bSpd.Ar id
138eed20f3bSpdto standard output and terminate it.
139f7995b2cSsoleneThe VM is paused during send processing.
140f7995b2cSsoleneData sent to standard output contains the VM parameters and its memory,
141f7995b2cSsolenenot the disk image.
142f7995b2cSsolene.Pp
143f7995b2cSsoleneIn order to move a VM from one host to another, disk files must be
144f7995b2cSsolenesynced between the send and the receive processes and must be located
145f7995b2cSsoleneunder the same path.
146*94f7e773Sjmc.It Cm show Oo Fl r Oc Op Ar id
14796f2cfcbSjmcAn alias for the
14896f2cfcbSjmc.Cm status
14996f2cfcbSjmccommand.
150bd4b76f8Sreyk.It Xo Cm start
151c8fb8957Sjmc.Op Fl cL
1523b3650f0Sjmc.Bk -words
153917458a3Sclaudio.Op Fl B Ar device
1543b3650f0Sjmc.Op Fl b Ar path
1554d2a1fb2Sreyk.Op Fl d Ar disk
156425270ecSjmc.Op Fl i Ar count
1575bf36b85Sprocter.Op Fl m Ar size
1583c32861bSjmc.Op Fl n Ar switch
159c8fb8957Sjmc.Op Fl r Ar path
1606429e633Sreyk.Op Fl t Ar name
161bd4b76f8Sreyk.Ar id | name
162c8fb8957Sjmc.Ek
163eb8d1da1Sreyk.Xc
164e6d0a5bdSknStart a new VM
165e6d0a5bdSkn.Ar name
166e6d0a5bdSknwith the specified parameters.
167e6d0a5bdSknAn existing VM may be started by referencing its
168e6d0a5bdSkn.Ar id .
1696429e633Sreyk.Bl -tag -width "-I parent"
170917458a3Sclaudio.It Fl B Ar device
171bdbc1844SclaudioForce system to boot from the specified device for this boot.
172917458a3Sclaudio.Ar device
173bdbc1844Sclaudiocan be set to:
174bdbc1844Sclaudio.Pp
175bdbc1844Sclaudio.Bl -tag -width "cdrom" -compact
176bdbc1844Sclaudio.It Ar cdrom
1773b3650f0SjmcBoot the CD-ROM image.
1783b3650f0Sjmc.It Ar disk
1793b3650f0SjmcBoot from disk.
180bdbc1844Sclaudio.It Ar net
1813b3650f0SjmcPerform a PXE boot using the first network interface.
182bdbc1844Sclaudio.El
1833b3650f0Sjmc.Pp
184bdbc1844SclaudioCurrently
185917458a3Sclaudio.Ar net
186bdbc1844Sclaudiois only supported when booting a kernel using the
187917458a3Sclaudio.Fl b
188bdbc1844Sclaudioflag while
189bdbc1844Sclaudio.Ar disk
190bdbc1844Sclaudioand
191bdbc1844Sclaudio.Ar cdrom
192e3c47f97Smlarkinonly work with VMs booted using BIOS.
1933b3650f0Sjmc.It Fl b Ar path
194e3c47f97SmlarkinBoot the VM with the specified
195e3c47f97Smlarkin.Ox
196e3c47f97Smlarkinkernel or custom BIOS image.
1973b3650f0SjmcIf not specified, the default is to boot using the BIOS image in
1983b3650f0Sjmc.Pa /etc/firmware/vmm-bios .
19924793040SdvIf the VM is an existing VM, use the provided image for only the next boot.
200fe102934Sreyk.It Fl c
201fe102934SreykAutomatically connect to the VM console.
2024d2a1fb2Sreyk.It Fl d Ar disk
2034d2a1fb2SreykUse a disk image at the specified
2044d2a1fb2Sreyk.Ar disk
2054d2a1fb2Sreykpath (may be specified multiple times to add multiple disk images).
206425270ecSjmc.It Fl i Ar count
207425270ecSjmcNumber of network interfaces to add to the VM.
208470adcf5Sreyk.It Fl L
209470adcf5SreykAdd a local network interface.
210470adcf5Sreyk.Xr vmd 8
2117e8e6f43Sknwill auto-generate an IPv4 subnet for the interface,
212470adcf5Sreykconfigure a gateway address on the VM host side,
213610f4e31Sreykand run a simple DHCP/BOOTP server for the VM.
2140f032bd5SmlarkinSee
2150f032bd5Smlarkin.Sx LOCAL INTERFACES
2160f032bd5Smlarkinbelow for more information on how addresses are calculated and assigned when
2170f032bd5Smlarkinusing the
2180f032bd5Smlarkin.Fl L
2190f032bd5Smlarkinoption.
220549fc21aSsobrado.It Fl m Ar size
221549fc21aSsobradoMemory
222549fc21aSsobrado.Ar size
223549fc21aSsobradoof the VM, rounded to megabytes.
2241a563a30SjsgThe default is 512M.
2251a563a30SjsgThe maximum amount of memory assignable to a VM is governed by the datasize
2261a563a30Sjsgparameter for the vmd user in
2271a563a30Sjsg.Pa /etc/login.conf .
228b657d36cSreyk.It Fl n Ar switch
229b657d36cSreykAdd a network interface that is attached to the specified virtual
230b657d36cSreyk.Ar switch .
23150ed37b0SschwarzeSee the SWITCH CONFIGURATION section in
232b657d36cSreyk.Xr vm.conf 5
233b657d36cSreykfor more information.
23495ab188fSccardenas.It Fl r Ar path
235c8fb8957SjmcISO image file for virtual CD-ROM.
236c8fb8957SjmcThis image file will be available in the
237c8fb8957Sjmcselected VM as a SCSI CD-ROM device attached to a virtio SCSI adapter
238c8fb8957Sjmc(e.g.\&
239c8fb8957Sjmc.Xr vioscsi 4 ) .
2406429e633Sreyk.It Fl t Ar name
2416429e633SreykUse an existing VM with the specified
2426429e633Sreyk.Ar name
2436429e633Sreykas a template to create a new VM instance.
2446429e633SreykThe instance will inherit settings from the parent VM,
245e3c47f97Smlarkinexcept for exclusive options such as disk, interface lladdr, and
2466429e633Sreykinterface names.
247eb8d1da1Sreyk.El
248986b002cSmlarkin.It Cm status Oo Fl r Oc Op Ar id
24926212166SknList VMs running on the host, optionally listing just the selected VM
250eb8d1da1Sreyk.Ar id .
251986b002cSmlarkinIf the
252986b002cSmlarkin.Fl r
253986b002cSmlarkinflag is present, the output will only contain running VMs.
254bd4b76f8Sreyk.It Cm stop Oo Fl fw Oc Oo Fl a | Ar id Oc
25526212166SknStop (terminate) a VM defined by the specified VM
256aaf1d71dSjmc.Ar id
257aaf1d71dSjmcor all running VMs
258aaf1d71dSjmc.Pq Fl a .
259f6e5c9ebSreykBy default,
260f6e5c9ebSreyka graceful shutdown will be attempted if the VM supports the
261be3ef846Sreyk.Xr vmmci 4
262be3ef846Sreykdevice.
2633be9785fSreyk.Pp
2643be9785fSreykThe following options can be specified when stopping a VM:
2653be9785fSreyk.Bl -tag -width "-w"
2663be9785fSreyk.It Fl f
2673be9785fSreykForcefully stop the VM without attempting a graceful shutdown.
2683be9785fSreyk.It Fl w
2693be9785fSreykWait until the VM has been terminated.
2703be9785fSreyk.El
271eed20f3bSpd.It Cm unpause Ar id
27269fe6239SjmcUnpause (resume from a paused state) a VM with the specified
273eed20f3bSpd.Ar id .
274583f6618Sclaudio.It Cm wait Ar id
275583f6618SclaudioWait until the specified VM has stopped.
276eb8d1da1Sreyk.El
277ac17f33bSjmc.Pp
278ac17f33bSjmcIf the
279e3c47f97Smlarkin.Fl i ,
280e3c47f97Smlarkin.Fl L ,
281e3c47f97Smlarkinor
282e3c47f97Smlarkin.Fl n
283e3c47f97Smlarkinoptions are specified during VM startup, a corresponding number
284ac17f33bSjmcof host-side
285ac17f33bSjmc.Xr tap 4
286ac17f33bSjmcinterfaces will be allocated and mapped to the
287ac17f33bSjmc.Xr vio 4
288ac17f33bSjmcinterfaces inside the guest VM.
289ac17f33bSjmcThis tap/vio interface mapping
290ac17f33bSjmcallows guest network traffic to be manipulated by the host.
291ac17f33bSjmcAny valid host-side interface configuration may be performed on these
292ac17f33bSjmctap interfaces, such as bridging (via
29393bce128Skn.Xr veb 4 ) ,
294ac17f33bSjmcor using
295ac17f33bSjmc.Xr pf 4
296ac17f33bSjmcnat-to rules to create private or host-side NATed networks, as desired.
297e3c47f97SmlarkinFor each
298e3c47f97Smlarkin.Xr tap 4
299e3c47f97Smlarkinnetwork interface on the host,
300e3c47f97Smlarkin.Xr vmd 8
301e3c47f97Smlarkinwill set the interface's description to allow easy identification of
302e3c47f97Smlarkinthe corresponding VM by ID, interface number, and name:
303e3c47f97Smlarkin.Bd -literal -offset indent
304e3c47f97Smlarkin# ifconfig tap0
305e3c47f97Smlarkintap0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
306e3c47f97Smlarkin	lladdr fe:e1:ba:d8:50:d1
307e3c47f97Smlarkin	description: vm1-if0-myvm
308e3c47f97Smlarkin	index 15 priority 0 llprio 3
309e3c47f97Smlarkin	groups: tap
310e3c47f97Smlarkin	status: active
311e3c47f97Smlarkin.Ed
3120f032bd5Smlarkin.Sh LOCAL INTERFACES
3130f032bd5SmlarkinLocal interfaces can be used to easily configure VM networking without
3140f032bd5Smlarkinneeding to manually assign network addresses.
3150f032bd5SmlarkinA local interface is added
3160f032bd5Smlarkinto a VM using the -L option to the 'vmctl start' command and results in the
3170f032bd5Smlarkinaddition of a
3180f032bd5Smlarkin.Xr vio 4
3190f032bd5Smlarkininterface inside the VM and a corresponding
3200f032bd5Smlarkin.Xr tap 4
3210f032bd5Smlarkininterface on the host.
3220f032bd5SmlarkinWhen using local interfaces,
3230f032bd5Smlarkin.Xr vmd 8
3240f032bd5Smlarkinwill provide DHCP services to the guest VM and offer addresses selected
3250f032bd5Smlarkinfrom the 100.64.0.0/10 IPv4 range.
3260f032bd5SmlarkinFrom within the 100.64.0.0/10
3270f032bd5Smlarkinrange,
3280f032bd5Smlarkin.Xr vmd 8
3290f032bd5Smlarkinallocates a pair of addresses for the guest-side
3300f032bd5Smlarkin.Xr vio 4
3310f032bd5Smlarkinand host-side
3320f032bd5Smlarkin.Xr tap 4
3330f032bd5Smlarkininterfaces as follows:
3340f032bd5Smlarkin.Pp
3350f032bd5SmlarkinFor the first local interface:
3360f032bd5Smlarkin.Bl -bullet -compact
3370f032bd5Smlarkin.It
3380f032bd5SmlarkinThe host (tapX) address is assigned 100.64.n.2,
3390f032bd5Smlarkinwhere 'n' is the numeric VM ID visible in the 'vmctl status' command
3400f032bd5Smlarkin.It
3410f032bd5SmlarkinThe guest (vio0) address is assigned 100.64.n.3
3420f032bd5Smlarkin.El
3430f032bd5Smlarkin.Pp
3440f032bd5SmlarkinFor the second and subsequent local interface(s):
3450f032bd5Smlarkin.Bl -bullet -compact
3460f032bd5Smlarkin.It
3470f032bd5SmlarkinThe second local interface uses 100.64.n.4 and 100.64.n.5 for the
3480f032bd5Smlarkinhost (tapX) and guest (vio1) interfaces, respectively.
3490f032bd5Smlarkin.It
3500f032bd5SmlarkinSubsequent local interfaces are numbered similarly, continuing with 100.64.n.6
3510f032bd5Smlarkinand 100.64.n.7, etc
3520f032bd5Smlarkin.El
3530f032bd5Smlarkin.Pp
3540f032bd5SmlarkinMultiple -L options can be provided to the 'vmctl start' command, if more than
3550f032bd5Smlarkinone interface is desired.
3560f032bd5SmlarkinLocal interfaces are assigned to the VM before
3570f032bd5Smlarkinany other interfaces specified with the -i option (thus, local interfaces,
3580f032bd5Smlarkinif requested, are numbered starting at vio0 inside the guest VM).
3590f032bd5Smlarkin.Pp
360e3c47f97SmlarkinIf NAT is desired, the
361e3c47f97Smlarkin.Va net.inet.ip.forwarding
362e3c47f97Smlarkin.Xr sysctl 8
363e3c47f97Smlarkinmust also be set to 1.
364e3c47f97Smlarkin.Pp
3650f032bd5SmlarkinWhen using local interfaces, the DHCP configuration offered to the guest VM
366db16494fSeddspecifies the address of the corresponding host
3670f032bd5Smlarkin.Xr tap 4
368db16494fSeddinterface as both the default route and the (sole) nameserver.
3690f032bd5SmlarkinGuest VM traffic can optionally be NATed through the host
3700f032bd5Smlarkinwith an entry in the host machine's
3710f032bd5Smlarkin.Pa /etc/pf.conf
3722fa5a6a3Santonsimilar to the following:
3730f032bd5Smlarkin.Bd -literal -offset indent
374b2b2ce5fSknpass out on egress from 100.64.0.0/10 to any nat-to (egress)
3750f032bd5Smlarkin.Ed
3760f032bd5Smlarkin.Pp
3772fa5a6a3SantonIf desired, DNS queries originating from guest VMs can be redirected to a
378db16494fSedddifferent DNS server with an entry in the host machine's
379db16494fSedd.Pa /etc/pf.conf
380db16494fSeddsimilar to the following:
381db16494fSedd.Bd -literal -offset indent
3824df30e3eSottopass in proto { udp tcp } from 100.64.0.0/10 to any port domain \e
383db16494fSedd      rdr-to $dns_server port domain
384db16494fSedd.Ed
385eb8d1da1Sreyk.Sh FILES
386eb8d1da1Sreyk.Bl -tag -width "/etc/var/run/vmd.sockXX" -compact
387eb8d1da1Sreyk.It Pa /etc/vm.conf
388eb8d1da1SreykDefault configuration file.
389eb8d1da1Sreyk.It Pa /var/run/vmd.sock
390eb8d1da1Sreyk.Ux Ns -domain
391eb8d1da1Sreyksocket used for communication with
392eb8d1da1Sreyk.Xr vmd 8 .
393eb8d1da1Sreyk.El
394eb8d1da1Sreyk.Sh EXIT STATUS
395eb8d1da1Sreyk.Ex -std vmctl
396eb8d1da1Sreyk.Nm
397eb8d1da1Sreykmay fail due to one of the following reasons:
398eb8d1da1Sreyk.Pp
399eb8d1da1Sreyk.Bl -bullet -compact
400eb8d1da1Sreyk.It
401eb8d1da1SreykThe VMM subsystem could not be enabled or disabled as requested.
402eb8d1da1Sreyk.It
403eb8d1da1SreykA requested VM-based operation could not be completed.
404eb8d1da1Sreyk.El
405eb8d1da1Sreyk.Sh EXAMPLES
406eb8d1da1SreykCreate a 4.5 Gigabyte disk image, disk.img:
40700b20ef6Sreyk.Bd -literal -offset indent
408bd4b76f8Sreyk$ vmctl create -s 4.5G disk.img
40900b20ef6Sreyk.Ed
410eb8d1da1Sreyk.Pp
4114d2a1fb2SreykConvert a disk image from the
4124d2a1fb2Sreyk.Sq raw
4134d2a1fb2Sreykformat to
4144d2a1fb2Sreyk.Sq qcow2 :
4154d2a1fb2Sreyk.Bd -literal -offset indent
416bd4b76f8Sreyk$ vmctl create -i disk.img disk.qcow2
4174d2a1fb2Sreyk.Ed
4184d2a1fb2Sreyk.Pp
41985b9df96SreykCreate a new VM with 1GB memory, one network interface, one disk image
420eb8d1da1Sreyk('disk.img') and boot from kernel '/bsd':
421eb8d1da1Sreyk.Bd -literal -offset indent
422bd4b76f8Sreyk# vmctl start -m 1G -i 1 -b /bsd -d disk.img "myvm"
42300b20ef6Sreyk.Ed
42400b20ef6Sreyk.Pp
4256429e633SreykStart a new VM instance with the name 'myvm' from a pre-configured
4266429e633SreykVM 'openbsd.4G':
4276429e633Sreyk.Bd -literal -offset indent
428bd4b76f8Sreyk# vmctl start -t "openbsd.4G" -d mydisk.img "myvm"
4296429e633Sreyk.Ed
4306429e633Sreyk.Pp
431eb8d1da1SreykTerminate VM number 1:
43200b20ef6Sreyk.Bd -literal -offset indent
43300b20ef6Sreyk# vmctl stop 1
43400b20ef6Sreyk.Ed
435eb8d1da1Sreyk.Sh SEE ALSO
4361c56e0dcSjmc.Xr pf 4 ,
4371c56e0dcSjmc.Xr tap 4 ,
43893bce128Skn.Xr veb 4 ,
4391c56e0dcSjmc.Xr vio 4 ,
440eb8d1da1Sreyk.Xr vmm 4 ,
441eb8d1da1Sreyk.Xr vm.conf 5 ,
442eb8d1da1Sreyk.Xr rc.conf 8 ,
4430f032bd5Smlarkin.Xr sysctl 8 ,
4441c56e0dcSjmc.Xr vmd 8
445eb8d1da1Sreyk.Sh HISTORY
446eb8d1da1SreykThe
447eb8d1da1Sreyk.Nm
448eb8d1da1Sreykcommand first appeared in
449eb8d1da1Sreyk.Ox 5.9 .
450eb8d1da1Sreyk.Sh AUTHORS
451eb8d1da1Sreyk.An -nosplit
452eb8d1da1Sreyk.An Mike Larkin Aq Mt mlarkin@openbsd.org
453eb8d1da1Sreykand
454eb8d1da1Sreyk.An Reyk Floeter Aq Mt reyk@openbsd.org .
455