If you want to add an ESXi host with more than two pNICs, or add a host to a vSphere cluster with more than one vSphere Distributed Switch (vDS), you must use the VMware Cloud Foundation API.

This procedure uses the clusterUpdateSpec to add an ESXi host with more than two pNICs, or add a host to a vSphere cluster with more than one vSphere Distributed Switch (vDS) using the VMware Cloud Foundation API.

The examples in the following procedure are based on a scenario where the existing vSphere cluster and ESXi hosts have the following configuration:
Two vSphere Distributed Switches
  • sfo-w01-cl02-vds01
  • sfo-w01-cl02-vds02
Four pNICs
  • vmnic0
  • vmnic1
  • vmnic2
  • vmnic3
pNIC to vDS mapping
  • vmnic0 and vmnic1 to sfo-w01-cl02-vds01
  • vmnic2 and vmnic3 to sfo-w01-cl02-vds02
Modify the examples based on your environment. See Expand a Cluster in the VMware Cloud Foundation API Reference Guide for more information about clusterUpdateSpec, including optional parameters.
Note: You do not specify vDS to trafffic type mapping when adding an ESXi host to a vSphere cluster. For a new ESXi host, traffic is distributed in the same way as it is for the other ESXi hosts in the vSphere cluster.

You can add hosts to or remove hosts from multiple different vSphere clusters in parallel. For example, you add three hosts to Cluster A, and while that task is running, you can start a separate task to add (or remove) four hosts to Cluster B. See VMware Configuration Maximums for information about the maximum number of add/remove hosts tasks that you can run in parallel.

Prerequisites

  • Verify that a host is available in the SDDC Manager inventory. For information on commissioning hosts, see Commission Hosts.
  • Verify that the host you want to add is in an active state. See View Host Inventory.
  • Verify you have a valid vSphere license with adequate sockets available in the SDDC Manager inventory. See Add a License Key
  • Verify that the host to be added matches the configuration of the hosts already in the vSphere cluster. This allows the vSphere cluster configuration to remain balanced. If the host to be added does not match the pre-existing hosts in the vSphere cluster, the cluster will be unbalanced and a warning is displayed. The warning does not prevent the expansion and can be dismissed if needed.
  • Verify that the host you are adding has the same type of principal storage as the existing hosts in the vSphere cluster. For the management domain, the host must use vSAN for principal storage. For VI workload domains, the host can use vSAN, NFS, VMFS on FC, or vVols for principal storage. A host using NFS for principal storage will automatically use the same NFS configuration as the other hosts in the vSphere cluster. For a host using VMFS on FC, you must configure zoning, mount the associated volumes, and create the datastore on the host before adding the host to a vSphere cluster. A host using vVols for principal storage will automatically use the same vVols configuration as the other hosts in the vSphere cluster.
  • If the vSphere cluster hosts an NSX Edge cluster, you can only add new hosts with the same management, uplink, NSX Host Overlay, and NSX Edge Overlay networks (L2 uniform) as the existing hosts.
  • If the vSphere cluster to which you are adding hosts uses a static IP pool for the NSX Host Overlay Network TEPs, that pool must include enough IP addresses for the hosts you are adding.
  • To add an ESXi host with more than two pNICs, the vSphere cluster must already contain ESXi hosts with more than two pNICs.

Procedure

  1. Get the ID for the ESXi host that you want to add to a vSphere cluster.
    1. In the SDDC Manager UI, click Developer Center > API Explorer.
    2. Expand the APIs for managing Hosts section, and click GET /v1/hosts.
    3. Enter UNASSIGNED_USEABLE in the status text box and click Execute.
    4. In the response, locate and copy the ID of the host you want to add to the vSphere cluster.
  2. In a text editor, create a JSON specification for the clusterUpdateSpec. For example:
    {
        "clusterExpansionSpec": {
            "hostSpecs": [{
               "id": "d7c64c4f-6ca6-46f3-9527-b2c737cc4e92",
               "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
               "username": "root",
               "hostNetworkSpec": {
                   "vmNics": [{
                       "id": "vmnic0",
                       "vdsName": "sfo-w01-cl01-vds01"
                   }, {
                       "id": "vmnic1",
                       "vdsName": "sfo-w01-cl01-vds01"
                   }, {
                       "id": "vmnic2",
                       "vdsName": "sfo-w01-cl01-vds02"
                   }, {
                       "id": "vmnic3",
                       "vdsName": "sfo-w01-cl01-vds02"
                   }]
               }
           }]
       }
    }
    
  3. Get the ID for the vSphere cluster to which you want to add the ESXi host.
    1. In the SDDC Manager UI, click Developer Center > API Explorer.
    2. Expand the APIs for managing Clusters section, and click GET /v1/clusters.
    3. In the response, locate and copy the ID for the target vSphere cluster.
      In the response, locate and copy the ID for the target vSphere cluster.
  4. Validate the clusterUpdateSpec.
    1. Expand the APIs for managing Clusters section, and click POST /v1/clusters/{id}/validations.
    2. Paste the cluster ID from step 3, paste the clusterUpdateSpec from step 2, and click Execute.
      If validation succeeds, proceed to the next step. If validation fails, check the errors in the response, update the clusterUpdateSpec, and validate it again.
  5. Add the ESXi host to the vSphere cluster.
    1. Expand the APIs for managing Clusters section, and click PATCH /v1/clusters/{id}.
    2. Paste the cluster id from step 3, paste the validated clusterUpdateSpec, and click Execute.
      Paste the validated clusterUpdateSpec and click Execute
      Use the Tasks panel in the SDDC Manager UI to monitor adding the ESXi host to the vSphere cluster.