By using the VMware Cloud Foundation API, you can create an example cluster of hosts, each having four physical NICs, and assign these NICs to a vSphere Distributed and an N-VDS.

In this cluster example, for traffic separation, in a second cluster of the example workload domain, one vSphere Distributed Switch handles the system traffic for vSphere management, vSphere vMotion, and vSAN and one N-VDS handles the workload traffic, for example, NSX-T overlay. You assign a pair of physical NICs to each switch.

Table 1. Example Workload Domain Cluster Specification

Component

Value

SDDC Manager FQDN

sfo01m01sddc01.sfo01.rainpole.local

Number of hosts

4

Number of physical NICs per host

4

Workload domain name sfo01-w01

vSphere Distributed Switch configuration

vSphere Distributed Switch instances

sfo01-w01-c02-vds01

vmnic configuration for vSphere Distributed Switch sfo01-w01-c02-vds02

vmnic0, vmnic1

NIC teaming policy for vSphere Distributed Switch sfo01-w01-c02-vds02

Route based on physical NIC load (default)

Distributed port groups for vSphere Distributed Switch sfo01-w01-c02-vds02

  • sfo01-w01-c02-vds01-mgmt

  • sfo01-w01-c02-vds01-vsan

  • sfo01-w01-c02-vds01-vmotion

N-VDS configuration

N-VDS instance

Auto-generated name

vmnic configuration for N-VDS

vmnic2, vmnic3

Uplink Profile Teaming Policy

Load Balance Source

that is, load balancing between uplink-1 and uplink-2 based on the source port ID

Traffic Segments

Overlay

Storage type

vSAN

Procedure

  1. Send a query for unassigned hosts to SDDC Manager by using this request.
    GET https://sfo01m01sddc01.sfo01.rainpole.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 each host object for the cluster from the id field.
  4. Send a query for workload domains to SDDC Manager by using this request.
    GET https://sfo01m01sddc01.sfo01.rainpole.local/inventory/domains HTTP/1.1
    Authorization: Basic admin rest_api_admin_password
  5. In the response, locate the name parameter for the target workload domain.
  6. Write down the GUID of the workload domain from the id property.
  7. Prepare a cluster specification in JSON format according to the requirements of your environment and send it for validation to SDDC Manager.

    Most of the parameters are self-explanatory.

    Parameter

    Value

    domainId

    GUID from 5.

    computeSpec.clusterSpecs.hostSpecs.id

    GUIDs from 3.

    computeSpec.clusterSpecs.hostSpecs.hostNetworkSpec.vmNics.id

    Physical NIC to use, for example, vmnic0.

    POST https://sfo01m01sddc01.sfo01.rainpole.local/v1/domains/validations/creations HTTP/1.1
    Authorization:Basic admin rest_api_admin_password
    Content-Type:application/json
    
    {
      "computeSpec": {
        "clusterSpecs": [
          {
            "advancedOptions": {
              "evcMode": "",
              "highAvailability": {
                "enabled": true
              }
            },
            "datastoreSpec": {
              "vsanDatastoreSpec": {
                "datastoreName": "sfo01-w01-c02-vsan01",
                "dedupAndCompressionEnabled": false,
                "failuresToTolerate": 1,
                "licenseKey": "CCCCC-CCCCC-CCCCC-CCCCC-CCCCC"
              }
            },
            "hostSpecs": [
              {
                "id": "45f035db-03ab-4b86-9406-545dda930541",
                "licenseKey": "BBBBB-BBBBB-BBBBB-BBBBB-BBBBB",
                "hostNetworkSpec": {
                  "vmNics": [
                    {
                      "id": "vmnic0",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic1",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic2",
                      "moveToNvds": true
                    },
                    {
                      "id": "vmnic3",
                      "moveToNvds": true
                    }
                  ]
                }
              },
              {
                "id": "d2da8319-b222-43c0-8eb0-bb30c163e1e6",
                "licenseKey": "BBBBB-BBBBB-BBBBB-BBBBB-BBBBB",
                "hostNetworkSpec": {
                  "vmNics": [
                    {
                      "id": "vmnic0",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic1",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic2",
                      "moveToNvds": true
                    },
                    {
                      "id": "vmnic3",
                      "moveToNvds": true
                    }
                  ]
                }
              },
              {
                "id": "0db2cbd1-679c-47e0-9759-b2651d1c370f",
                "licenseKey": "BBBBB-BBBBB-BBBBB-BBBBB-BBBBB",
                "hostNetworkSpec": {
                  "vmNics": [
                    {
                      "id": "vmnic0",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic1",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic2",
                      "moveToNvds": true
                    },
                    {
                      "id": "vmnic3",
                      "moveToNvds": true
                    }
                  ]
                }
              },
              {
                "id": "5d643de7-57d5-4a21-ac34-31f0537fba3d",
                "licenseKey": "BBBBB-BBBBB-BBBBB-BBBBB-BBBBB",
                "hostNetworkSpec": {
                  "vmNics": [
                    {
                      "id": "vmnic0",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic1",
                      "vdsName": "sfo01-w01-c02-vds01"
                    },
                    {
                      "id": "vmnic2",
                      "moveToNvds": true
                    },
                    {
                      "id": "vmnic3",
                      "moveToNvds": true
                    }
                  ]
                }
              }
            ],
            "name": "sfo01-w01-c02",
            "networkSpec": {
              "nsxClusterSpec": {
                "nsxTClusterSpec": {
                  "geneveVlanId": 1644
                }
              },
              "vdsSpecs": [
                {
                  "name": "sfo01-w01-c02-vds01",
                  "portGroupSpecs": [
                    {
                      "name": "sfo01-w01-c02-vds01-mgmt",
                      "transportType": "MANAGEMENT"
                    },
                    {
                      "name": "sfo01-w01-c02-vds01-vsan",
                      "transportType": "VSAN"
                    },
                    {
                      "name": "sfo01-w01-c02-vds01-vmotion",
                      "transportType": "VMOTION"
                    }
                  ]
                }
              ]
            }
          }
        ]
      },
      "domainId": "sfo01-w01"
    }
  8. By using the JSON specification, add the cluster to the workload domain in VMware Cloud Foundation by sending this request.
    POST https://sfo01m01sddc01.sfo01.rainpole.local/v1/clusters 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.