Manage VMware ESXi Clusters.
pyVmomi Python Module
PyVmomi can be installed via pip:
pip install pyVmomi
Version 6.0 of pyVmomi has some problems with SSL error handling on certain versions of Python. If using version 6.0 of pyVmomi, Python 2.7.9, or newer must be present. This is due to an upstream dependency in pyVmomi 6.0 that is not supported in Python versions 2.7 to 2.7.8. If the version of Python is not in the supported range, you will need to install an earlier version of pyVmomi. See Issue #29537 for more information.
Based on the note above, to install an earlier version of pyVmomi than the version currently listed in PyPi, run the following:
pip install pyVmomi==22.214.171.1244.1.1
The 126.96.36.1994.1.1 is a known stable version that this original ESXi State Module was developed against.
Configures a cluster. Creates a new cluster, if it doesn't exist on the vCenter or reconfigures it if configured differently
Supported proxies: esxdatacenter, esxcluster
Name of the state. If the state is run in by an
proxy, it will be the name of the cluster.
Configuration applied to the cluster. Complex datastructure following the ESXClusterConfigSchema. Valid example is:
Configures licenses on the cluster entity
if it doesn't, it creates it
assign it to the cluster if there is space
error if there's no space
if it's assigned to the cluster nothing needs to be done
Configures the cluster's VSAN datastore
WARNING: The VSAN datastore is created automatically after the first ESXi host is added to the cluster; the state assumes that the datastore exists and errors if it doesn't.