By using the VMware Cloud Foundation API, you can add an example host that has four physical NICs. You can distribute the NICs to multiple vSphere Distributed Switch instances.

For traffic separation, two vSphere Distributed Switches handle the traffic in and out of the example host - one for system traffic and overlay traffic and one for external traffic. You assign a pair of physical NICs to each switch.

Table 1. Example Workload Domain Host Specification

Component

Value

SDDC Manager URL

sddc-manager.vrack.vsphere.local

Number of physical NICs per host

4

vSphere Distributed Switch instances

  • SDDC2-Dswitch-Private1

  • SDDC2-Dswitch-Private2

vmnic per vSphere Distributed Switch configuration

  • vmnic0, vmnic 1 - SDDC2-Dswitch-Private1

  • vmnic2, vmnic 3 - SDDC2-Dswitch-Private2

Procedure

  1. Send a query for unassigned hosts to SDDC Manager by using this request.
    GET https://sddc-manager.vrack.vsphere.local/v1/hosts?status=UNASSIGNED_USEABLE HTTP/1.1
    Authorization:Basic admin REST API admin password
  2. In the response, locate the fqdn parameter for the target hosts.
  3. Write down the GUID of the host object for the cluster from the id field.
  4. Send a query for clusters to SDDC Manager by sending this request.
    GET https://sddc-manager.vrack.vsphere.local/v1/clusters HTTP/1.1
    Authorization:Basic admin REST API admin password
  5. In the response, locate the name parameter for the target cluster.
  6. Write down the GUID from the id parameter.
  7. Prepare a host specification in JSON format according to the requirements of your environment and send it for validation to SDDC Manager.

    The URL contains the cluster GUID from 4.

    Most of the parameters are self-explanatory.

    Parameter

    Value

    clusterExpansionSpec.hostSpecs.id

    GUIDs from Step 3.

    clusterExpansionSpec.hostSpecs.license

    ESXi license key

    clusterExpansionSpec.hostSpecs.hostNetworkSpec.vmNics.id

    Physical NIC to use, for example, vmnic0.

    clusterExpansionSpec.hostSpecs.hostNetworkSpec.vmNics.vdsName

    Name of the vSphere Distributed Switch to connect a physical NIC to.

    POST https://sddc-manager.vrack.vsphere.local/v1/clusters/cluster_id1/validations/updates HTTP/1.1
    Authorization: Basic admin REST API admin password
    Content-Type: application/json
    
    {
      "clusterExpansionSpec" : {
        "hostSpecs" : [ {
          "id" : "1d539f62-d85a-48a3-b5db-a165e06ae6ba",
          "license": "AAAAA-AAAAA-AAAAA-AAAAA-AAAAA",
          "hostNetworkSpec" : {
            "vmNics" : [ {
              "id" : "vmnic0",
              "vdsName" : "SDDC2-Dswitch-Private1" 
            }, {
              "id" : "vmnic1",
              "vdsName" : "SDDC2-Dswitch-Private1" 
            }, {
              "id" : "vmnic2",
              "vdsName" : "SDDC2-Dswitch-Private2" 
            }, {
              "id" : "vmnic3",
              "vdsName" : "SDDC2-Dswitch-Private2" 
            } ] 
          } 
        } ] 
      }
    }
  8. By using the JSON specification, add the host to the cluster by sending this request.
    PATCH https://sddc-manager.vrack.vsphere.local/v1/clusters/cluster_id HTTP/1.1
    Authorization: Basic admin REST API admin password
    Content-Type: application/json
  9. If the task fails, retry running it from the user interface of SDDC Manager.