Stretch the cluster in the management domain or VI workload domain using a JSON specification.

Prerequisites

  • 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.
Important: You cannot deploy an NSX Edge cluster on a vSphere cluster that is stretched. If you plan to deploy an NSX Edge cluster, you must do so before you execute the stretch cluster workflow.
Note: You cannot stretch a cluster in the following cases:
  • The cluster uses static IP addresses for the NSX-T Data Center Host 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).

Procedure

  1. Create a JSON specification with the following content in a text editor.
    The following example is for an environment with a single vSphere Distributed Switch. If you have multiple vSphere Distributed Switches, see the VMware Cloud Foundation API Reference Guide for details about creating a JSON specification.
    {
       "clusterStretchSpec":{
          "hostSpecs":[
             {
                "id":"ESXi host 1 ID",
                "licenseKey":"BBBBB-BBBBB-BBBBB-BBBBB-BBBBB"
             },
             {
                "id":"ESXi host 2 ID",
                "licenseKey":"BBBBB-BBBBB-BBBBB-BBBBB-BBBBB"
             },
             {
                "id":"ESXi host 3 ID",
                "licenseKey":"BBBBB-BBBBB-BBBBB-BBBBB-BBBBB"
             },
             {
                "id":"ESXi host 4 ID",
                "licenseKey":"BBBBB-BBBBB-BBBBB-BBBBB-BBBBB"
             }
          ],
          "secondaryAzOverlayVlanId": availability Zone 2 Overlay VLAN ID,
          "isEdgeClusterConfiguredForMultiAZ": true,
          "witnessTrafficSharedWithVsanTraffic": false,
          "witnessSpec":{
             "fqdn":"fqdn of vSAN witness host",
             "vsanCidr":"vsanCidr of vSAN witness host",
             "vsanIp":"vsanIp of vSAN witness host"
          }
       }
    }
    Note:

    vsanCIDR and vsanIP values are for the witness appliance on which vSAN is enabled.

  2. In the navigation pane, click Developer Center > API Explorer.
  3. Retrieve and replace the unique IDs for each ESXi host in the JSON specification.
    1. Expand the APIs for managing hosts section, and expand GET /v1/hosts.
    2. In the Status text box, enter UNASSIGNED_USEABLE and click Execute.
    3. In the Response section, click PageOfHost, copy the id element of each host, and replace the respective value in the JSON specification.

      ESXi Host

      Value

      ESXi Host 1

      ESXi host 1 ID

      ESXi Host 2

      ESXi host 2 ID

      ESXi Host 3

      ESXi host 3 ID

      ESXi Host 4

      ESXi host 4 ID
  4. Replace the license key value in JSON specification with valid keys.
  5. Retrieve and replace the unique ID for the management cluster in the JSON specification.
    1. Expand the APIs for managing clusters section, and expand GET /v1/cluster.
    2. Click Execute.
    3. In the Response section, click PageOfCluster, copy the id element of the management cluster, and replace the ID value in the JSON specification.
  6. Validate the JSON specification file.
    1. Expand the APIs for managing clusters section and expand POST /v1/clusters/{id}/validations.
    2. In the Value text box, enter the unique ID for the management cluster.
    3. In the clusterUpdateSpec text box, type
      {
      "clusterUpdateSpec": {
      }
      }
    4. Paste the JSON specification within the paranthesis.
    5. Click Execute.
    6. In the confirmation dialog box, click Continue.
    7. In the Response section, expand the result section and verify that the response is SUCCEEDED.
  7. Stretch the cluster with the JSON specification.
    1. Expand the APIs for managing clusters section and expand PATCH /v1/clusters/{id}.
    2. Paste the unique ID of the management cluster in the Value text-box.
    3. clusterUpdateSpec text box, type
      {
      }
    4. Paste the JSON specification within the paranthesis.
    5. Click Execute.
    6. On the confirmation dialog box, click Continue.

What to do next

Configure NSX-T Data Center for availability zone 2.