saltext.vmware.modules.vm#
- saltext.vmware.modules.vm.list_(service_instance=None)[source]#
Returns virtual machines.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.list
- saltext.vmware.modules.vm.list_templates(service_instance=None)[source]#
Returns virtual machines tempates.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.list_templates
- saltext.vmware.modules.vm.path(vm_name, service_instance=None)[source]#
Returns specified virtual machine path.
- vm_name
The name of the virtual machine.
- service_instance
The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.path vm_name=vm01
- saltext.vmware.modules.vm.deploy_ovf(vm_name, host_name, ovf_path, service_instance=None)[source]#
Deploy a virtual machine from an OVF
- vm_name
The name of the virtual machine to be created.
- host_name
The name of the esxi host to create the vitual machine on.
- ovf_path
The path to the Open Virtualization Format that contains a configuration of a virtual machine.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.deploy_ovf vm_name=vm01 host_name=host1 ovf_path=/tmp/appliance.ovf
- saltext.vmware.modules.vm.deploy_ova(vm_name, host_name, ova_path, service_instance=None)[source]#
Deploy a virtual machine from an OVA
- vm_name
The name of the virtual machine to be created.
- host_name
The name of the esxi host to create the vitual machine on.
- ova_path
The path to the Open Virtualization Appliance that contains a compressed configuration of a virtual machine.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.deploy_ova vm_name=vm01 host_name=host1 ova_path=/tmp/appliance.ova
- saltext.vmware.modules.vm.deploy_template(vm_name, template_name, host_name, service_instance=None)[source]#
Deploy a virtual machine from a template virtual machine.
- vm_name
The name of the virtual machine to be created.
- template_name
The name of the template to clone from.
- host_name
The name of the esxi host to create the vitual machine on.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.deploy_template vm_name=vm01 template_name=template1 host_name=host1
- saltext.vmware.modules.vm.info(vm_name=None, service_instance=None)[source]#
Return basic info about a vSphere VM guest
- vm_name
(optional) The name of the virtual machine to get info on.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.info vm_name=vm01
- saltext.vmware.modules.vm.power_state(vm_name, state, datacenter_name=None, service_instance=None)[source]#
Manages the power state of a virtual machine.
- vm_name
The name of the virtual machine.
- state
The state you want the specified virtual machine in (powered-on,powered-off,suspend,reset).
- datacenter_name
(optional) The name of the datacenter containing the virtual machine you want to manage.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.power_state vm_name=vm01 state=powered-on datacenter_name=dc1
- saltext.vmware.modules.vm.boot_manager(vm_name, order=['cdrom', 'disk', 'ethernet', 'floppy'], delay=0, enter_bios_setup=False, retry_delay=0, efi_secure_boot_enabled=False, service_instance=None)[source]#
Manage boot option for a virtual machine
- vm_name
The name of the virtual machine.
- order
(List of strings) Boot order of devices. Acceptable strings: cdrom, disk, ethernet, floppy
- delay
(integer, optional) Boot delay. When powering on or resetting, delay boot order by given milliseconds. Defaults to 0.
- enter_bios_setup
(boolean, optional) During the next boot, force entry into the BIOS setup screen. Defaults to False.
- retry_delay
(integer, optional) If the VM fails to find boot device, automatically retry after given milliseconds. Defaults to 0 (do not retry).
- efi_secure_boot_enabled
(boolean, optional) Defaults to False.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.boot_manager vm_name=vm01 order='["cdrom", "disk", "ethernet"]' delay=5000 enter_bios_setup=False retry_delay=5000 efi_secure_boot_enabled=False
- saltext.vmware.modules.vm.create_snapshot(vm_name, snapshot_name, description='', include_memory=False, quiesce=False, datacenter_name=None, service_instance=None)[source]#
Create snapshot of given vm.
- vm_name
The name of the virtual machine.
- snapshot_name
The name for the snapshot being created. Not unique
- description
Description for the snapshot.
- include_memory
(boolean, optional) If TRUE, a dump of the internal state of the virtual machine (basically a memory dump) is included in the snapshot.
- quiesce
(boolean, optional) If TRUE and the virtual machine is powered on when the snapshot is taken, VMware Tools is used to quiesce the file system in the virtual machine.
- datacenter_name
(optional) The name of the datacenter containing the virtual machine.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.create_snapshot vm_name=vm01 snapshot_name=backup_snapshot_1 description="This snapshot is a backup of vm01" include_memory=False quiesce=True datacenter_name=dc1
- saltext.vmware.modules.vm.destroy_snapshot(vm_name, snapshot_name, snapshot_id=None, remove_children=False, datacenter_name=None, service_instance=None)[source]#
Destroy snapshot of given vm.
- vm_name
The name of the virtual machine.
- snapshot_name
The name for the snapshot being destroyed. Not unique
- snapshot_id
(optional) ID of snapshot to be destroyed.
- remove_children
(optional, Bool) Remove snapshots below snapshot being removed in tree.
- datacenter_name
(optional) The name of the datacenter containing the virtual machine.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.destroy_snapshot vm_name=vm01 snapshot_name=backup_snapshot_1 snapshot_id=1 remove_children=False datacenter_name=dc1
- saltext.vmware.modules.vm.snapshot(vm_name, datacenter_name=None, service_instance=None)[source]#
Return info about a virtual machine snapshots
- vm_name
(optional) The name of the virtual machine to get info on.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.snapshot vm_name=vm01 datacenter_name=dc1
- saltext.vmware.modules.vm.relocate(vm_name, new_host_name, datastore_name, service_instance=None)[source]#
Relocates a virtual machine to the location specified.
- vm_name
The name of the virtual machine to relocate.
- new_host_name
The name of the host you want to move the virtual machine to.
- datastore_name
The name of the datastore you want to move the virtual machine to.
- service_instance
(optional) The Service Instance from which to obtain managed object references.
CLI Example:
salt '*' vmware_vm.relocate vm_name=vm01 new_host_name=host1 datastore_name=ds01