VMware Cloud Foundation 9.0
Procedure to add a host to a stretched cluster in VMware Cloud Foundation 9.0:
In the SDDC Manager UI, navigate to Developer Center > API Explorer > hosts and click on GET /v1/hosts.
fqdn section.Click EXECUTE and then download the JSON output, or click on COPY RESPONSE to copy the contents to the clipboard.
Open the JSON contents and copy the UID of the newly commissioned host.
{
"elements": [
{
"id": "########-####-####-####-############", <======= The ID of the host to be added in the stretched cluster
"serialNumber": null,
"esxiVersion": "9.0.0.0.XXXXXXXX",
"sshThumbprint": null,
"sslThumbprint": null,
"fqdn": "Host_FQDN",
"hardwareVendor": "VMware, Inc.",
"hardwareModel": "######",
"isPrimary": false,
"ipAddresses": [
{
"ipAddress": "IP_ADDRESS",
"type": "#####"
},
{
"ipAddress": "IP_ADDRESS",
"type": "######"
}
],
Navigate to Developer Center > API Explorer > hosts and click on GET /v1/clusters.
Click EXECUTE and then download the JSON output, or click on COPY RESPONSE to copy the contents to the clipboard.
Access the file contents and note down the cluster ID of the stretched cluster you want to expand.
Do note that the contents of the file would have information about both the workload and the management cluster. Note down the cluster ID of the cluster that is to be expanded.
{
"elements": [
{
"id": "########-####-####-####-############", <===Cluster id of the management cluster
"domain": {
"id": "########-####-####-####-############"
},
"name": "Management_cluster_name",
"status": "ACTIVE",
"primaryDatastoreName": "DATASTORE_NAME",
.
.
.
.
},
{
"id": "########-####-####-####-############", <==Cluster id of the workload cluster
"domain": {
"id": "########-####-####-####-############"
},
"name": "WORKLOAD_CLUSTER_NAME",
"status": "ACTIVE",
"primaryDatastoreName": "DATASTORE_NAME",
.
.
.
.
}
]
}
Log in to the vCenter Server for your management domain at https://<vcenter-fqdn>/ui.
Navigate to the stretched cluster (to be expanded) in the vCenter GUI and click on the Configure tab.
vCenter UI> stretched cluster (to be expanded) > Configure
Under vSAN > Fault Domains, note the availability zone name (primary or secondary) where this new host will be added.
Navigate to Developer Center > API Explorer > hosts and click on PATCH /v1/clusters/{id}.
Under ClusterUpdateSpec, click ClusterExpansionSpec{ ... } and download/copy to clipboard the example JSON.
Edit the JSON file so that it includes only the clusterExpansionSpec section for the host.
In the azName field, specify the availability zone name identified in Step 4.
Ensure that the new host uses the same vmnic-to-vSphere Distributed Switch mapping as the existing hosts in the stretched cluster.
vCenter UI -> Host -> Configure -> Virtual Switches.
Note down the uplinks assigned to the vSphere Distributed Switch
{
"clusterExpansionSpec": {
"deployWithoutLicenseKeys": true,
"hostSpecs": [
{
"id": "Enter the ESXi host id",
"azName": "Enter the primary/secondary fault domain name where the host will be added",
"hostNetworkSpec": {
"vmNics": [
{
"id": "vmnic#",
"vdsName": "Enter the vDS name"
},
{
"id": "vmnic#",
"vdsName": "Enter the vDS name"
}
]
}
}
]
}
}
}
Depending on the number of uplinks, modify the above snippet accordingly. The above snippet would be applicable for a host with two uplinks in the vDS.
PATCH /v1/clusters/{id}.Replace {id} with the cluster ID retrieved in Step 3.
Paste the modified JSON payload from Step 5 into the request body.
Click Execute to begin the cluster expansion.
Monitor the API response or SDDC Manager tasks until the operation completes successfully.