Stretch a Cluster in VMware
Cloud Foundation
VMware
Cloud Foundation
Stretch a cluster in the management
domain or VI workload domain using a JSON specification.
- Verify that vCenter Server is operational.
- Verify that you have completed the Planning and Preparation Workbook with the management domain or VI workload domain deployment option included.
- Verify that your environment meets the requirements listed in the Prerequisite Checklist sheet in the Planning and Preparation Workbook.
- Create a network pool for availability zone 2.
- Commission hosts for availability zone 2. See Commission Hosts.
- Ensure that you have enough hosts such that there is an equal number of hosts on each availability zone. This is to ensure that there are sufficient resources in case an availability zone goes down completely.
- Deploy and configure a vSAN witness host. See Deploy and Configure vSAN Witness Host.
- If you are stretching a cluster in a VI workload domain, the default management vSphere cluster must have been stretched.
You cannot stretch a cluster in the
following cases:
- The cluster uses static IP addresses for theNSXHost Overlay Network TEPs.
- The cluster has a vSAN remote datastore mounted on it.
- The cluster uses vSphere Lifecycle Manager images.
- The cluster shares a vSAN Storage Policy with any other clusters.
- The cluster is enabled for Workload Management (vSphere with Tanzu).
- Create a JSON specification with the following content in a text editor.The following example is for an environment with two vSphere Distributed Switches and two vmnics per host. See the VMware Cloud Foundation API Reference Guide for details about creating a JSON specification for other use cases.The ESXi hosts that you are adding to availability zone 2 must use the same vmnic to vSphere Distributed Switch mapping as the existing hosts in availability zone 1. For example: If the host in availability zone 1 map vmnic0 and vmnic1 to vSphere Dstributed Switch 1 and vmnic2 and vmnic3 to vSphere Distributed Switch 2, then the hosts you are adding to availability zone 2 must map the same vmincs to the same vSphere Distributed Switches.{ "clusterStretchSpec": { "hostSpecs": [{ "id": "<ESXi host 1 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 2 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 3 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 4 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }], "witnessSpec": { "vsanIp": "<IP address of vSAN witness host>", "fqdn": "<fqdn of vSAN witness host>", "vsanCidr": "<cidr of vSAN witness host>" }, "witnessTrafficSharedWithVsanTraffic": false, "secondaryAzOverlayVlanId": <availability Zone 2 Overlay VLAN ID>, "isEdgeClusterConfiguredForMultiAZ": true } }vsanCIDRandvsanIPvalues are for the witness appliance on which vSAN is enabled.
- In the navigation pane, click.
- Retrieve and replace the unique IDs for each ESXi host in the JSON specification.
- Expand theAPIs for managing hostssection, and expandGET /v1/hosts.
- In theStatustext box, enterUNASSIGNED_USEABLEand clickExecute.
- In theResponsesection, clickPageOfHost, copy theidelement of each host, and replace the respective value in the JSON specification.ESXi HostValueESXi Host 1ESXi host 1 IDESXi Host 2ESXi host 2 IDESXi Host 3ESXi host 3 IDESXi Host 4ESXi host 4 ID
- Replace the license key value in JSON specification with valid keys.
- Retrieve the unique ID for the cluster you are stretching.
- Expand theAPIs for managing clusterssection, and expandGET /v1/cluster.
- ClickExecute.
- In theResponsesection, clickPageOfCluster, copy theidelement of the cluster you are stretching.
- Validate the JSON specification file.
- Expand theAPIs for managing clusterssection and expandPOST /v1/clusters/{id}/validations.
- In theValuetext box, enter the unique ID for the cluster you are stretching.
- In theclusterUpdateSpectext box, type{ "clusterUpdateSpec": }
- Paste the JSON specification.For example:{ "clusterUpdateSpec": { "clusterStretchSpec": { "hostSpecs": [{ "id": "<ESXi host 1 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 2 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 3 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 4 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }], "witnessSpec": { "vsanIp": "<IP address of vSAN witness host>", "fqdn": "<fqdn of vSAN witness host>", "vsanCidr": "<cidr of vSAN witness host>" }, "witnessTrafficSharedWithVsanTraffic": false, "secondaryAzOverlayVlanId": <availability Zone 2 Overlay VLAN ID>, "isEdgeClusterConfiguredForMultiAZ": true } } }
- ClickExecute.
- In the confirmation dialog box, clickContinue.
- In theResponsesection, expand theresultsection and verify that the response isSUCCEEDED.
- Stretch the cluster with the JSON specification.
- Expand theAPIs for managing clusterssection and expandPATCH /v1/clusters/{id}.
- Paste the uniqueIDof the management cluster in theValuetext-box.
- clusterUpdateSpectext box, paste the JSON specification.For example:{ "clusterStretchSpec": { "hostSpecs": [{ "id": "<ESXi host 1 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 2 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 3 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }, { "id": "<ESXi host 4 ID>", "licenseKey": "XX0XX-XX0XX-XX0XX-XX0XX-XX0XX", "hostNetworkSpec": { "vmNics": [{ "id": "vmnic0", "vdsName": "<vSphere Distributed Switch 1>" }, { "id": "vmnic1", "vdsName": "<vSphere Distributed Switch 2>" } ] } }], "witnessSpec": { "vsanIp": "<IP address of vSAN witness host>", "fqdn": "<fqdn of vSAN witness host>", "vsanCidr": "<cidr of vSAN witness host>" }, "witnessTrafficSharedWithVsanTraffic": false, "secondaryAzOverlayVlanId": <availability Zone 2 Overlay VLAN ID>, "isEdgeClusterConfiguredForMultiAZ": true } }
- ClickExecute.
- On the confirmation dialog box, clickContinue.
Configure
NSX
for availability zone
2.