saltext.vmware.states.vm#

saltext.vmware.states.vm.set_boot_manager(name, boot_order=['cdrom', 'disk', 'ethernet', 'floppy'], delay=0, enter_bios_setup=False, retry_enabled=False, retry_delay=10000, efi_secure_boot_enabled=False, service_instance=None)[source]#

Manage boot option for a virtual machine

name

The name of the virtual machine.

boot_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_enabled

(boolean, optional) If the VM fails to find boot device retry. Defaults to False.

retry_delay

(integer, optional) If the VM fails to find boot device, automatically retry after given milliseconds. Defaults to 10000.

efi_secure_boot_enabled

(boolean, optional) Defaults to False.

service_instance

(optional) The Service Instance from which to obtain managed object references.

Set Boot Manager:
  vmware_vm.set_boot_manager:
    - name: vm01
    - boot_order:
        - cdrom
        - disk
        - ethernet
    - delay: 5000
    - enter_bios_setup: False
    - retry_enabled: True
    - retry_delay: 5000
    - efi_secure_boot_enabled: False
saltext.vmware.states.vm.snapshot_present(name, snapshot_name, description='', include_memory=False, quiesce=False, datacenter_name=None, service_instance=None)[source]#

Create virtual machine snapshot.

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.

Create Snapshot:
  vmware_vm.snapshot_present:
    - 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.states.vm.snapshot_absent(name, snapshot_name, snapshot_id=None, remove_children=False, datacenter_name=None, service_instance=None)[source]#

Create virtual machine snapshot.

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.

Remove Snapshot:
  vmware_vm.snapshot_present:
    - name: vm01
    - snapshot_name: backup_snapshot_1
    - snapshot_id: 1
    - remove_children: False
    - datacenter_name: dc1
saltext.vmware.states.vm.relocate(name, new_host_name, datastore_name, service_instance=None)[source]#

Relocates a virtual machine to the location specified.

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.

Relocate Virtual Machine:
  vmware_vm.relocate:
    - name: vm01
    - new_host_name: host1
    - datastore_name: ds01