You can expand a stretched cluster by adding hosts. It is recommended that you add the same number of hosts to both availability zones for symmetry and cluster balance.
Procedure
- Commission the additional hosts to VMware Cloud Foundation.
See Commission Hosts.
- Get the UIDs of the hosts you commissioned.
- In the navigation pane, click Developer Center > API Explorer.
- Under APIs for managing hosts, click GET /v1/hosts.
- Click Execute.
- Click Download to download the JSON file.
- Open the JSON file and copy the the UIDs of the hosts.
- Get the ID of the cluster you are expanding.
- In the API Explorer, navigate to APIs for managing clusters and click GET /v1/clusters.
- Click Execute.
- Click Download to download the JSON file.
- Open the JSON file and copy the the cluster ID for the cluster you are expanding.
- Get the primary and secondary availability zone names from vCenter Server.
- In a web browser, log in to the vCenter Server at https://vcenter_server_fqdn/ui.
- Select Menu > Hosts and Clusters.
- In the inventory panel, expand vCenter Server > Datacenter.
- Select Cluster and then click the Configure tab.
- Under vSAN, select Fault Domains.
- Note the primary and secondary availability zone names.
- Prepare the JSON request body.
- Click Patch /v1/clusters/id.
- Under ClusterUpdateSpec field, click Cluster Update Data ClusterUpdateSpec{ ... }.
- Click Download to download the JSON file.
- Edit the downloaded JSON file so that it contains only the expand section similar to the example below. In the azName field, type the primary and secondary names you had retrieved in step 4.
Note: The ESXi hosts that you are adding must use the same vmnic to vSphere Distributed Switch mapping as the existing hosts in the stretched cluster. For example: If existing hosts map vmnic0 and vmnic1 to vSphere Dstributed Switch 1 and vmnic2 and vmnic3 to vSphere Distributed Switch 2, then the hosts you are adding must map the same vmincs to the same vSphere Distributed Switches.
{ "clusterExpansionSpec": { "hostSpecs": [ { "id": "ESXi host 1 ID", "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "azName":"primary/secondary", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "ESXi host 2 ID", "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "azName":"primary/secondary", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "ESXi host 3 ID", "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "azName":"primary/secondary". "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "ESXi host 4 ID", "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "azName":"primary/secondary", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } } ] } }
- Run the expand cluster API.
- For the ClusterUpdateSpec field, update the cluster ID (you retrieved this in step 3) and JSON file with the payload you prepared in step 5.
- Click Execute.
- Monitor the task until it is completed.
- If required, SSH in to each newly added host and add a static route to the vSAN network of the witness host. Also add static routes in the witness if it could not reach the vSAN network of the newly added hosts.
- Update the value of Host failure cluster tolerates to the number of hosts in AZ1 after cluster expansion.
- Log in to the management vCenter Server.
- Select Cluster and click the Configure tab.
- Under Services, click vSphere Availability and then click Edit.
- On the Admission Control page of the Edit Cluster Settings dialog box, set host failures cluster tolerates to the number of hosts in availability zone 1 and click OK.