List of supported clouds > VMware vSphere
This document describes details specific to using your existing VMware vSphere cloud with Juju.
See more: VMware vSphere
When using the VMware vSphere cloud with Juju, it is important to keep in mind that it is a (1) machine cloud and (2) not some other cloud.
See more: Cloud differences in Juju
As the differences related to (1) are already documented generically in our Tutorial, How-to guides, and Reference docs, here we record just those that follow from (2).
Juju points of variation | Notes for the VMware vSphere cloud |
---|---|
setup (chronological order): | |
CLOUD | |
supported versions: | |
requirements: | In order to add a vSphere cloud you will need to have an existing vSphere installation which supports, or has access to, the following: - VMware Hardware Version 8 (or greater) - ESXi 5.0 (or greater) - Internet access - DNS and DHCP Juju supports both high-availability vSAN deployments as well and standard deployments. |
definition: | |
- cloud name: | user-defined |
- type: | vsphere |
- endpoint | vSphere endpoint |
- region | Datacenter |
- authentication types: | [userpass] |
- cloud-specific model configuration keys: | datastore The datastore in which to create VMs. If this is not specified, the process will abort unless there is only one datastore available. - thin - Sparse provisioning, only written blocks will take up disk space on the datastore - thick - The entire size of the virtual disk will be deducted from the datastore, but unwritten blocks will not be zeroed out. This adds 2 potential pitfalls. See comments in provider/vsphere/internal/vsphereclient/client.go regarding DiskProvisioningType. - thickEagerZero (default) - The entire size of the virtual disk is deducted from the datastore, and unwritten blocks are zeroed out. Improves latency when committing to disk, as no extra step needs to be taken before writing data. |
CREDENTIAL | |
definition: | auth-type: userpass. You will have to provide your username, password and, optionally, the vmfolder. If your credential stops working: Credentials for the vSphere cloud have been reported to occasionally stop working over time. If this happens, try |
CONTROLLER | |
notes on bootstrap: | Recommended: Bootstrap with the following cloud-specific model-configuration keys: datastore and primary-network . See more below. Pro tip: When creating a controller with vSphere, a cloud image is downloaded to the client and then uploaded to the ESX host. This depends on your network connection and can take a while. Using templates can speed up bootstrap and machine deployment. |
other (alphabetical order:) | |
CONSTRAINT | |
conflicting: | |
supported? | |
- allocate-public-ip |
|
- arch |
Valid values: [amd64] . |
- container |
|
- cores |
|
- cpu-power |
|
- image-id |
|
- instance-role |
|
- instance-type |
|
- mem |
|
- root-disk |
|
- root-disk-source |
root-disk-source is the datastore for the root disk |
- spaces |
|
- tags |
|
- virt-type |
|
- zones |
Use to specify resurce pools within a host or cluster, e.g. |
PLACEMENT DIRECTIVE | |
<machine> |
|
subnet=... |
|
system-id=... |
|
zone=... |
Valid values: <cluster|host> . If your topology has a cluster without a host, Juju will see this as an availability zone and may fail silently. To solve this, either make sure the host is within the cluster, or use a placement directive: |
MACHINE | |
RESOURCE (cloud) Consistent naming, tagging, and the ability to add user-controlled tags to created instances. |
Other notes
Using templates
To speed up bootstrap and deploy, you can use VM templates, already created in your vSphere. Templates can be created by hand on your vSphere, or created from an existing VM.
Examples assume that the templates are in directory $DATA_STORE/templates.
Via simplestreams:
mkdir -p $HOME/simplestreams
juju-metadata generate-image -d $HOME/simplestreams/ -i "templates/juju-focal-template" --base ubuntu@22.04 -r $DATA_STORE -u $CLOUD_ENDPOINT
juju-metadata generate-image -d $HOME/simplestreams/ -i "templates/juju-noble-template" --base ubuntu@24.04 -r $DATA_STORE -u $CLOUD_ENDPOINT
juju bootstrap --metadata-source $HOME/image-streams vsphere
Bootstrap juju with the controller on a VM running focal:
juju bootstrap vsphere --bootstrap-image="templates/focal-test-template" --bootstrap-base ubuntu@22.04 --bootstrap-constraints "arch=amd64"
Using add-image:
juju metadata add-image templates/bionic-test-template --base ubuntu@22.04