Manage vms running on the OpenBSD VMM hypervisor using vmctl(8).
New in version 2019.2.0.
codeauthor: | Jasper Lievisse Adriaanse <jasper@openbsd.org> |
---|
Note
This module requires the vmd service to be running on the OpenBSD target machine.
salt.modules.vmctl.
create_disk
(name, size)¶Create a VMM disk with the specified name and size.
CLI Example:
salt '*' vmctl.create_disk /path/to/disk.img size=10G
salt.modules.vmctl.
load
(path)¶Load additional configuration from the specified file.
CLI Example:
salt '*' vmctl.load path=/etc/vm.switches.conf
salt.modules.vmctl.
reload
()¶Remove all stopped VMs and reload configuration from the default configuration file.
CLI Example:
salt '*' vmctl.reload
salt.modules.vmctl.
reset
(all=False, vms=False, switches=False)¶Reset the running state of VMM or a subsystem.
CLI Example:
salt '*' vmctl.reset all=True
salt.modules.vmctl.
start
(name=None, id=None, bootpath=None, disk=None, disks=None, local_iface=False, memory=None, nics=0, switch=None)¶Starts a VM defined by the specified parameters. When both a name and id are provided, the id is ignored.
CLI Example:
salt '*' vmctl.start 2 # start VM with id 2
salt '*' vmctl.start name=web1 bootpath='/bsd.rd' nics=2 memory=512M disk='/disk.img'
salt.modules.vmctl.
status
(name=None, id=None)¶List VMs running on the host, or only the VM specified by id
. When
both a name and id are provided, the id is ignored.
CLI Example:
salt '*' vmctl.status # to list all VMs
salt '*' vmctl.status name=web1 # to get a single VM
salt.modules.vmctl.
stop
(name=None, id=None)¶Stop (terminate) the VM identified by the given id or name. When both a name and id are provided, the id is ignored.
CLI Example:
salt '*' vmctl.stop name=alpine
Docs for previous releases are available on readthedocs.org.
Latest Salt release: latest_release