Note
Deprecated since version Carbon: The vsphere
cloud driver has been
deprecated in favor of the vmware
cloud driver and will be removed in Salt Carbon. Please refer to
Getting started with VMware to get started
and convert your vsphere provider configurations to use the vmware driver.
The vSphere cloud module is used to control access to VMWare vSphere.
depends: |
|
---|
Note: Ensure python pysphere module is installed by running following one-liner check. The output should be 0.
python -c "import pysphere" ; echo $?
# if this fails install using
pip install https://pysphere.googlecode.com/files/pysphere-0.1.8.zip
Use of this module only requires a URL, username and password. Set up the cloud configuration at:
/etc/salt/cloud.providers
or /etc/salt/cloud.providers.d/vsphere.conf
:
my-vsphere-config:
provider: vsphere
user: myuser
password: verybadpass
template_user: root
template_password: mybadVMpassword
url: 'https://10.1.1.1:443'
Note: Your URL may or may not look like any of the following, depending on how your VMWare installation is configured:
10.1.1.1
10.1.1.1:443
https://10.1.1.1:443
https://10.1.1.1:443/sdk
10.1.1.1:443/sdk
MOR of the host where the virtual machine should be registered.
The user to access the VM with sudo privileges.
New in version 2015.5.2.
The password corresponding to the sudo user to access the VM with sudo privileges.
New in version 2015.5.2.
salt.cloud.clouds.vsphere.
avail_images
()¶Return a dict of all available VM images on the cloud provider.
salt.cloud.clouds.vsphere.
avail_locations
()¶Return a dict of all available VM locations on the cloud provider with relevant data
salt.cloud.clouds.vsphere.
create
(vm_)¶Create a single VM from a data dict
salt.cloud.clouds.vsphere.
destroy
(name, call=None)¶Destroy a node.
CLI Example:
salt-cloud --destroy mymachine
salt.cloud.clouds.vsphere.
get_configured_provider
()¶Return the first configured instance.
salt.cloud.clouds.vsphere.
get_conn
()¶Return a conn object for the passed VM data
salt.cloud.clouds.vsphere.
list_clusters
(kwargs=None, call=None)¶List the clusters for this VMware environment
salt.cloud.clouds.vsphere.
list_datacenters
(kwargs=None, call=None)¶List the data centers for this VMware environment
salt.cloud.clouds.vsphere.
list_datastores
(kwargs=None, call=None)¶List the datastores for this VMware environment
salt.cloud.clouds.vsphere.
list_folders
(kwargs=None, call=None)¶List the folders for this VMWare environment
salt.cloud.clouds.vsphere.
list_hosts
(kwargs=None, call=None)¶List the hosts for this VMware environment
salt.cloud.clouds.vsphere.
list_nodes
(kwargs=None, call=None)¶Return a list of the VMs that are on the provider, with basic fields
salt.cloud.clouds.vsphere.
list_nodes_full
(kwargs=None, call=None)¶Return a list of the VMs that are on the provider with full details
salt.cloud.clouds.vsphere.
list_nodes_min
(kwargs=None, call=None)¶Return a list of the nodes in the provider, with no details
salt.cloud.clouds.vsphere.
list_nodes_select
()¶Return a list of the VMs that are on the provider, with select fields
salt.cloud.clouds.vsphere.
list_resourcepools
(kwargs=None, call=None)¶List the hosts for this VMware environment
salt.cloud.clouds.vsphere.
script
(vm_)¶Return the script deployment object
salt.cloud.clouds.vsphere.
show_instance
(name, call=None)¶Show the details from vSphere concerning a guest
salt.cloud.clouds.vsphere.
wait_for_ip
(vm_)¶