salt.modules.vboxmanage
Support for VirtualBox using the VBoxManage command
New in version 2016.3.0.
If the vboxdrv
kernel module is not loaded, this module can automatically load it by configuring autoload_vboxdrv
in /etc/salt/minion
:
autoload_vboxdrv: True
The default for this setting is False
.
- depends
-
virtualbox
-
Clone a new VM from an existing VM
CLI Example:
salt 'hypervisor' vboxmanage.clonemedium <name> <new_name>
salt.modules.vboxmanage.clonemedium(medium, uuid_in=None, file_in=None, uuid_out=None, file_out=None, mformat=None, variant=None, existing=False, **kwargs)
-
Clone a new VM from an existing VM
CLI Example:
salt 'hypervisor' vboxmanage.clonevm <name> <new_name>
salt.modules.vboxmanage.clonevm(name=None, uuid=None, new_name=None, snapshot_uuid=None, snapshot_name=None, mode='machine', options=None, basefolder=None, new_uuid=None, register=False, groups=None, **kwargs)
-
Create a new VM
CLI Example:
salt 'hypervisor' vboxmanage.create <name>
salt.modules.vboxmanage.create(name, groups=None, ostype=None, register=True, basefolder=None, new_uuid=None, **kwargs)
-
Unregister and destroy a VM
CLI Example:
salt '*' vboxmanage.destroy my_vm
salt.modules.vboxmanage.destroy(name)
-
Return a list of a specific type of item. The following items are available:
vms runningvms ostypes hostdvds hostfloppies intnets bridgedifs hostonlyifs natnets dhcpservers hostinfo hostcpuids hddbackends hdds dvds floppies usbhost usbfilters systemproperties extpacks groups webcams screenshotformats
CLI Example:
salt 'hypervisor' vboxmanage.items <item> salt 'hypervisor' vboxmanage.items <item> details=True salt 'hypervisor' vboxmanage.items <item> details=True group_by=Name
Some items do not display well, or at all, unless
details
is set toTrue
. By default, items are grouped by theUUID
field, but not all items contain that field. In those cases, another field must be specified.
salt.modules.vboxmanage.list_items(item, details=False, group_by='UUID')
-
Return a list of registered VMs
CLI Example:
salt '*' vboxmanage.list_nodes
salt.modules.vboxmanage.list_nodes()
-
Return a list of registered VMs, with detailed information
CLI Example:
salt '*' vboxmanage.list_nodes_full
salt.modules.vboxmanage.list_nodes_full()
-
Return a list of registered VMs, with minimal information
CLI Example:
salt '*' vboxmanage.list_nodes_min
salt.modules.vboxmanage.list_nodes_min()
-
List the available OS Types
CLI Example:
salt '*' vboxmanage.list_ostypes
salt.modules.vboxmanage.list_ostypes()
-
Register a VM
CLI Example:
salt '*' vboxmanage.register my_vm_filename
salt.modules.vboxmanage.register(filename)
-
Start a VM
CLI Example:
salt '*' vboxmanage.start my_vm
salt.modules.vboxmanage.start(name)
-
Stop a VM
CLI Example:
salt '*' vboxmanage.stop my_vm
salt.modules.vboxmanage.stop(name)
-
Unregister a VM
CLI Example:
salt '*' vboxmanage.unregister my_vm_filename
salt.modules.vboxmanage.unregister(name, delete=False)
-
Return the location of the VBoxManage command
CLI Example:
salt '*' vboxmanage.vboxcmd
salt.modules.vboxmanage.vboxcmd()
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.vboxmanage.html