saltext.vmware.modules.esxi#

saltext.vmware.modules.esxi.get_lun_ids(service_instance=None)[source]#

Return a list of LUN (Logical Unit Number) NAA (Network Addressing Authority) IDs.

saltext.vmware.modules.esxi.get_capabilities(service_instance=None)[source]#

Return ESXi host’s capability information.

saltext.vmware.modules.esxi.power_state(datacenter_name=None, cluster_name=None, host_name=None, state=None, timeout=600, force=True)[source]#

Manage the power state of the ESXi host.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname whose power state needs to be managed (optional).

state

Sets the ESXi host to this power state. Valid values: “reboot”, “standby”, “poweron”, “shutdown”.

timeout

Timeout when transitioning power state to standby / poweron. Default: 600 seconds

force

Force power state transition. Default: True

salt '*' vmware_esxi.power_state datacenter_name=dc1 cluster_name=cl1 host_name=host1 state=shutdown
saltext.vmware.modules.esxi.manage_service(service_name, datacenter_name=None, cluster_name=None, host_name=None, state=None, startup_policy=None, service_instance=None)[source]#

Manage the state of the service running on the EXSI host.

service_name

Service that needs to be managed.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname whose power state needs to be managed (optional)

state

Sets the service running on the ESXi host to this state. Valid values: “start”, “stop”, “restart”.

startup_policy

Sets the service startup policy. If unspecified, no changes are made. Valid values “on”, “off”, “automatic”. - on: Start and stop with host - off: Start and stop manually - automatic: Start automatically if any ports are open, and stop when all ports are closed

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional)

salt '*' vmware_esxi.manage_service sshd datacenter_name=dc1 cluster_name=cl1 host_name=host1 state=restart startup_policy=on
saltext.vmware.modules.esxi.list_services(service_name=None, datacenter_name=None, cluster_name=None, host_name=None, state=None, startup_policy=None, service_instance=None)[source]#

List the state of services running on matching EXSI hosts.

service_name

Filter by this service name. (optional)

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

state

Filter by this service state. Valid values: “running”, “stopped”

startup_policy

Filter by this service startup policy. Valid values “on”, “off”, “automatic”.

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.list_services
saltext.vmware.modules.esxi.get_acceptance_level(datacenter_name=None, cluster_name=None, host_name=None, acceptance_level=None, service_instance=None)[source]#

Get acceptance level on matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

acceptance_level

Filter by this acceptance level. Valid values: “community”, “partner”, “vmware_accepted”, “vmware_certified”. (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_acceptance_level

Returns:

{
    "host1": "partner",
    "host2": "partner"
}
saltext.vmware.modules.esxi.set_acceptance_level(acceptance_level, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Set acceptance level on matching EXSI hosts.

acceptance_level

Set to this acceptance level. Valid values: “community”, “partner”, “vmware_accepted”, “vmware_certified”.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.set_acceptance_level

Returns:

{
    "host1": "partner",
    "host2": "partner"
}
saltext.vmware.modules.esxi.get_advanced_config(datacenter_name=None, cluster_name=None, host_name=None, config_name=None, service_instance=None)[source]#

Get advanced config on matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

config_name

Filter by this config_name. (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_advanced_config
saltext.vmware.modules.esxi.set_advanced_configs(config_dict, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Set multiple advanced configurations on matching EXSI hosts.

config_dict

Set the configuration key to the configuration value. Eg: {“Annotations.WelcomeMessage”: “Hello”}

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.set_advanced_config config_name=Annotations.WelcomeMessage config_value=Hello

Returns:

{
    "host1": {
        "Annotations.WelcomeMessage": "HelloDemo"
    },
}
saltext.vmware.modules.esxi.set_advanced_config(config_name, config_value, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Set a single advanced configuration on matching EXSI hosts.

config_name

Name of the advanced configuration to be set.

config_value

Set the advanced configuration to this value.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.set_advanced_config config_name=Annotations.WelcomeMessage config_value=Hello

Returns:

{
    "host1": {
        "Annotations.WelcomeMessage": "HelloDemo"
    },
}
saltext.vmware.modules.esxi.get_firewall_config(datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Get Firewall configuration on matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_firewall_config
saltext.vmware.modules.esxi.backup_config(push_file_to_master=False, http_opts=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Backup configuration for matching EXSI hosts.

push_file_to_master

Push the downloaded configuration file to the salt master. (optional) Refer: https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.cp.html#salt.modules.cp.push

http_opts

Extra HTTP options to be passed to download from the URL. (optional) Refer: https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.http.html#salt.modules.http.query

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt * vmware_esxi.backup_config host_name=10.225.0.53 http_opts='{"verify_ssl": False}'
saltext.vmware.modules.esxi.restore_config(source_file, saltenv=None, http_opts=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Restore configuration for matching EXSI hosts.

source_file

Specify the source file from which the configuration is to be restored. The file can be either on the master, locally on the minion or url. E.g.: salt://vmware_config.tgz, /tmp/minion1/vmware_config.tgz or 10.225.0.53/downloads/5220da48-552e-5779-703e-5705367bd6d6/configBundle-ESXi-190313806785.eng.vmware.com.tgz

saltenv

Specify the saltenv when the source file needs to be retireved from the master. (optional)

http_opts

Extra HTTP options to be passed to download from the URL. (optional). Refer: https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.http.html#salt.modules.http.query

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.backup_config datacenter_name=dc1 host_name=host1
saltext.vmware.modules.esxi.reset_config(datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Reset configuration for matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.reset_config
saltext.vmware.modules.esxi.get_dns_config(datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Get DNS configuration on matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_dns_config
saltext.vmware.modules.esxi.get_ntp_config(datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Get NTP configuration on matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_ntp_config
saltext.vmware.modules.esxi.list_hosts(datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

List ESXi hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.list_hosts
saltext.vmware.modules.esxi.add_user(user_name, password, description=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Add local user on matching ESXi hosts.

user_name

User to create on matching ESXi hosts. (required).

password

Password for the new user. (required).

description

Description for the new user. (optional).

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.add_user user_name=foo password=bar@123 descripton="new user"
saltext.vmware.modules.esxi.update_user(user_name, password, description=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Update local user on matching ESXi hosts.

user_name

Existing user to update on matching ESXi hosts. (required).

password

New Password for the existing user. (required).

description

New description for the existing user. (optional).

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.update_user user_name=foo password=bar@123 descripton="existing user"
saltext.vmware.modules.esxi.remove_user(user_name, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Remove local user on matching ESXi hosts.

user_name

User to delete on matching ESXi hosts. (required).

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.remove_user user_name=foo
saltext.vmware.modules.esxi.create_vmkernel_adapter(port_group_name, dvswitch_name=None, vswitch_name=None, enable_fault_tolerance=None, enable_management_traffic=None, enable_provisioning=None, enable_replication=None, enable_replication_nfc=None, enable_vmotion=None, enable_vsan=None, mtu=1500, network_default_gateway=None, network_ip_address=None, network_subnet_mask=None, network_tcp_ip_stack='default', network_type='static', datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Create VMKernel Adapter on matching ESXi hosts.

port_group_name

The name of the port group for the VMKernel interface. (required).

dvswitch_name

The name of the vSphere Distributed Switch (vDS) where to add the VMKernel interface. One of dvswitch_name or vswitch_name is required.

vswitch_name

The name of the vSwitch where to add the VMKernel interface. One of dvswitch_name or vswitch_name is required.

enable_fault_tolerance

Enable Fault Tolerance traffic on the VMKernel adapter. Valid values: True, False.

enable_management_traffic

Enable Management traffic on the VMKernel adapter. Valid values: True, False.

enable_provisioning

Enable Provisioning traffic on the VMKernel adapter. Valid values: True, False.

enable_replication

Enable vSphere Replication traffic on the VMKernel adapter. Valid values: True, False.

enable_replication_nfc

Enable vSphere Replication NFC traffic on the VMKernel adapter. Valid values: True, False.

enable_vmotion

Enable vMotion traffic on the VMKernel adapter. Valid values: True, False.

enable_vsan

Enable VSAN traffic on the VMKernel adapter. Valid values: True, False.

mtu

The MTU for the VMKernel interface.

network_default_gateway

Default gateway (Override default gateway for this adapter).

network_type

Type of IP assignment. Valid values: “static”, “dhcp”.

network_ip_address

Static IP address. Required if type = ‘static’.

network_subnet_mask

Static netmask required. Required if type = ‘static’.

network_tcpip_stack

The TCP/IP stack for the VMKernel interface. Valid values: “default”, “provisioning”, “vmotion”, “vxlan”.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.create_vmkernel_adapter port_group_name=portgroup1 dvswitch_name=dvs1
saltext.vmware.modules.esxi.get_vmkernel_adapters(adapter_name=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Update VMKernel Adapter on matching ESXi hosts.

adapter_name

Filter by this vmkernel adapter name.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_vmkernel_adapter port_group_name=portgroup1
saltext.vmware.modules.esxi.update_vmkernel_adapter(adapter_name, port_group_name, dvswitch_name=None, vswitch_name=None, enable_fault_tolerance=None, enable_management_traffic=None, enable_provisioning=None, enable_replication=None, enable_replication_nfc=None, enable_vmotion=None, enable_vsan=None, mtu=1500, network_default_gateway=None, network_ip_address=None, network_subnet_mask=None, network_tcp_ip_stack='default', network_type='static', datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Update VMKernel Adapter on matching ESXi hosts.

adapter_name

The name of the VMKernel interface to update. (required).

port_group_name

The name of the port group for the VMKernel interface. (required).

dvswitch_name

The name of the vSphere Distributed Switch (vDS) where to update the VMKernel interface.

vswitch_name

The name of the vSwitch where to update the VMKernel interface.

enable_fault_tolerance

Enable Fault Tolerance traffic on the VMKernel adapter. Valid values: True, False.

enable_management_traffic

Enable Management traffic on the VMKernel adapter. Valid values: True, False.

enable_provisioning

Enable Provisioning traffic on the VMKernel adapter. Valid values: True, False.

enable_replication

Enable vSphere Replication traffic on the VMKernel adapter. Valid values: True, False.

enable_replication_nfc

Enable vSphere Replication NFC traffic on the VMKernel adapter. Valid values: True, False.

enable_vmotion

Enable vMotion traffic on the VMKernel adapter. Valid values: True, False.

enable_vsan

Enable VSAN traffic on the VMKernel adapter. Valid values: True, False.

mtu

The MTU for the VMKernel interface.

network_default_gateway

Default gateway (Override default gateway for this adapter).

network_type

Type of IP assignment. Valid values: “static”, “dhcp”.

network_ip_address

Static IP address. Required if type = ‘static’.

network_subnet_mask

Static netmask required. Required if type = ‘static’.

network_tcpip_stack

The TCP/IP stack for the VMKernel interface. Valid values: “default”, “provisioning”, “vmotion”, “vxlan”.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.update_vmkernel_adapter dvswitch_name=dvs1 mtu=2000
saltext.vmware.modules.esxi.delete_vmkernel_adapter(adapter_name, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Delete VMKernel Adapter on matching ESXi hosts.

adapter_name

The name of the VMKernel Adapter to delete (required).

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.delete_vmkernel_adapter name=vmk1
saltext.vmware.modules.esxi.get_user(user_name, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

Get local user on matching ESXi hosts.

user_name

Filter by this user name (required).

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_user user_name=foo
saltext.vmware.modules.esxi.add_role(role_name, privilege_ids, esxi_host_name=None, service_instance=None)[source]#

Add local role to service instance, which may be an ESXi host or vCenter instance.

role_name

Role to create on service instance. (required).

privilege_ids

List of privileges for the role. (required). Refer: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html Example: [‘Folder.Create’, ‘Folder.Delete’].

esxi_host_name

Connect to this ESXi host using your pillar’s service_instance credentials. (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.add_role role_name=foo privileges=['Folder.Create']
saltext.vmware.modules.esxi.update_role(role_name, privilege_ids, esxi_host_name=None, service_instance=None)[source]#

Update local role on service instance, which may be an ESXi host or vCenter instance.

role_name

Role to update on service instance. (required).

privilege_ids

List of privileges for the role. (required). Refer: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html Example: [‘Folder.Create’, ‘Folder.Delete’].

esxi_host_name

Connect to this ESXi host using your pillar’s service_instance credentials. (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.update_role role_name=foo privileges=['Folder.Create']
saltext.vmware.modules.esxi.remove_role(role_name, force=False, esxi_host_name=None, service_instance=None)[source]#

Remove local role on service instance, which may be an ESXi host or vCenter instance.

role_name

Role to update on service instance. (required).

force

Forcefully remove a role even when in use. Default False. (optional).

esxi_host_name

Connect to this ESXi host using your pillar’s service_instance credentials. (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.remove_role role_name=foo
saltext.vmware.modules.esxi.get_role(role_name, esxi_host_name=None, service_instance=None)[source]#

Get local role on service instance, which may be an ESXi host or vCenter instance.

role_name

Retrieve this role on service instance. (required).

esxi_host_name

Connect to this ESXi host using your pillar’s service_instance credentials. (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get_role role_name=foo
saltext.vmware.modules.esxi.connect(host, service_instance=None)[source]#

Connect an ESXi instance to a vCenter instance.

host

Name of ESXi instance in vCenter.

service_instance

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

salt '*' vmware_esxi.connect host=host01
saltext.vmware.modules.esxi.disconnect(host, service_instance=None)[source]#

Disconnect an ESXi instance.

host

Name of ESXi instance in vCenter.

service_instance

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

salt '*' vmware_esxi.disconnect host=host01
saltext.vmware.modules.esxi.remove(host, service_instance=None)[source]#

Remove an ESXi instance from a vCenter instance.

host

Name of ESXi instance in vCenter.

service_instance

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

salt '*' vmware_esxi.remove host=host01
saltext.vmware.modules.esxi.move(host, cluster_name, service_instance=None)[source]#

Move an ESXi instance to a different cluster.

host

Name of ESXi instance in vCenter.

cluster_name

Name of cluster to move host to.

service_instance

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

salt '*' vmware_esxi.move host=host01 cluster=cl1
saltext.vmware.modules.esxi.add(host, root_user, password, cluster_name, datacenter_name, verify_host_cert=True, connect=True, service_instance=None)[source]#

Add an ESXi instance to a vCenter instance.

host

IP address or hostname of ESXi instance.

root_user

Username with root privilege to ESXi instance.

password

Password to root user.

cluster_name

Name of cluster ESXi host is being added to.

datacenter_name

Datacenter that contains cluster that ESXi instance is being added to.

verify_host_cert

Validates the host’s SSL certificate is signed by a CA, and that the hostname in the certificate matches the host. Defaults to True.

connect

Specifies whether host should be connected after being added. Defaults to True.

service_instance

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

salt '*' vmware_esxi.add host=host01 root_user=root password=CorrectHorseBatteryStaple cluster_name=cl1 datacenter_name=dc1 verify_host_cert=False connect=True
saltext.vmware.modules.esxi.list_pkgs(pkg_name=None, datacenter_name=None, cluster_name=None, host_name=None, service_instance=None)[source]#

List the packages installed on matching EXSi hosts. Note: Appropriate filters are recommended for large installations.

pkg_name

Filter by this package name. (optional)

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.list_pkgs
saltext.vmware.modules.esxi.get(datacenter_name=None, cluster_name=None, host_name=None, key=None, default='', delimiter=salt.defaults.DEFAULT_TARGET_DELIM, service_instance=None)[source]#

Get configuration information for matching EXSI hosts.

datacenter_name

Filter by this datacenter name (required when cluster is specified)

cluster_name

Filter by this cluster name (optional)

host_name

Filter by this ESXi hostname (optional)

key

Attempt to retrieve the named value from ESXi host configuration data, if the named value is not available return the passed default. The default return is an empty string. Follows the grains.get filter semantics. (optional)

The value can also represent a value in a nested dict using a “:” delimiter for the dict. This means that if a dict in ESXi host configuration looks like this:

{‘vsan’: {‘health’: ‘good’}}

To retrieve the value associated with the apache key in the pkg dict this key can be passed:

vsan:health

delimiter

Specify an alternate delimiter to use when traversing a nested dict. This is useful for when the desired key contains a colon. (optional)

service_instance

Use this vCenter service connection instance instead of creating a new one. (optional).

salt '*' vmware_esxi.get dc1 cl1
saltext.vmware.modules.esxi.in_maintenance_mode(host, service_instance=None)[source]#

Check if host is in maintenance mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.in_maintenance_mode '192.0.2.117'
saltext.vmware.modules.esxi.maintenance_mode(host, timeout=0, evacuate_powered_off_vms=False, maintenance_spec=None, catch_task_error=True, service_instance=None)[source]#

Put host into maintenance mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

timeout

If value is greater than 0 then task will timeout if not completed with in window (optional).

evacuate_powered_off_vms
Only supported by VirtualCenter (optional).

If True, for DRS will fail unless all powered-off VMs have been manually registered. If False, task will successed with powered-off VMs.

maintenance_spec

HostMaintenanceSpec (optional).

catch_task_error

If False and task failed then a salt exception will be thrown (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.maintenance_mode '192.0.2.117'
saltext.vmware.modules.esxi.exit_maintenance_mode(host, timeout=0, catch_task_error=True, service_instance=None)[source]#

Put host out of maintenance mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

timeout

If value is greater than 0 then task will timeout if not completed with in window (optional).

catch_task_error

If False and task failed then a salt exception will be thrown (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.exit_maintenance_mode '192.0.2.117'
saltext.vmware.modules.esxi.in_lockdown_mode(host, service_instance=None)[source]#

Check if host is in lockdown mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.in_lockdown_mode '192.0.2.117'
saltext.vmware.modules.esxi.lockdown_mode(host, catch_task_error=True, service_instance=None)[source]#

Put host into lockdown mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

catch_task_error

If False and task failed then a salt exception will be thrown (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.lockdown_mode '192.0.2.117'
saltext.vmware.modules.esxi.exit_lockdown_mode(host, catch_task_error=True, service_instance=None)[source]#

Put host out of lockdown mode.

host

Host IP or HostSystem/ManagedObjectReference (required).

catch_task_error

If False and task failed then a salt exception will be thrown (optional).

service_instance

Use this vCenter service connection instance instead of creating a new one (optional).

salt '*' vmware_esxi.exit_lockdown_mode '192.0.2.117'