If you want to add a vSphere cluster with more than one vSphere Distributed Switch (vDS) or use ESXi hosts with more than two pNICs, you must use the VMware Cloud Foundation API.
For the management domain, all vSphere clusters must use vSAN for principal storage. For VI workload domains, vSphere clusters can use vSAN, NFS, VMFS on FC, or vVols for principal storage. If a VI workload domain has multiple clusters, each cluster can use a different type of principal storage, as long as all hosts within a vSphere cluster use the same type.
You can run multiple add cluster tasks at the same time.
This procedure uses the clusterCreationSpec to add a vSphere cluster to a workload domain using the VMware Cloud Foundation API. It focuses on two specific sections of the clusterCreationSpec that allow you to add a vSphere cluster with more than one vDS or use ESXi hosts with more than two pNICS; hostSpecs and networkSpec.
You will need to modify these sections and complete the other sections of the clusterCreationSpec that are required for your environment. See the VMware Cloud Foundation API Reference Guide for details on all the sections of the clusterCreationSpec. See an example of a complete clusterCreationSpec at the end of this procedure.
Two vSphere Distributed Switches |
|
Four pNICs |
|
pNIC to vDS mapping |
|
vDS to traffic type mapping |
|
Prerequisites
- Verify that there are at least three hosts available in the SDDC Manager inventory. For information on commissioning hosts, see Commission Hosts.
Note: If the vSphere cluster is using NFS, VMFS on FC, or vVols as principal storage, and the VI workload domain is using vSphere Lifecycle Manager images as the update method, then only two hosts are required. Workload Management requires a vSphere cluster with a minimum of three ESXi hosts.
- Ensure that the hosts you want to add to the vSphere cluster are in an active state.
- You must have a valid vSphere and vSAN (if using vSAN storage) license specified in the Licensing tab of the SDDC Manager UI with adequate sockets available for the host to be added. For more information, see Add a License Key.
- If you are using DHCP for the NSX Host Overlay Network, a DHCP server must be configured on the NSX Host Overlay VLAN of the management domain. When NSX-T Data Center creates TEPs for the VI workload domain, they are assigned IP addresses from the DHCP server.
Procedure
Example
{ "domainId" : "7d7cf328-5e79-45f5-9b1c-3973f951a910", "computeSpec" : { "clusterSpecs" : [ { "name" : "sfo-w01-cl02", "hostSpecs" : [ { "id" : "e0579270-7a67-4af6-9f5b-99905160c953", "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "username" : "root", "hostNetworkSpec" : { "vmNics" : [ { "id" : "vmnic0", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic1", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic2", "vdsName" : "sfo-w01-cl02-vds02" }, { "id" : "vmnic3", "vdsName" : "sfo-w01-cl02-vds02" } ] } }, { "id" : "d9db5f30-72a0-4829-8882-17fe5610a03b", "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "username" : "root", "hostNetworkSpec" : { "vmNics" : [ { "id" : "vmnic0", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic1", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic2", "vdsName" : "sfo-w01-cl02-vds02" }, { "id" : "vmnic3", "vdsName" : "sfo-w01-cl02-vds02" } ] } }, { "id" : "13148430-f151-4fdc-b5f3-083590674e12", "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "username" : "root", "hostNetworkSpec" : { "vmNics" : [ { "id" : "vmnic0", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic1", "vdsName" : "sfo-w01-cl02-vds01" }, { "id" : "vmnic2", "vdsName" : "sfo-w01-cl02-vds02" }, { "id" : "vmnic3", "vdsName" : "sfo-w01-cl02-vds02" } ] } } ], "datastoreSpec" : { "vsanDatastoreSpec" : { "failuresToTolerate" : 1, "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "datastoreName" : "sfo-w01-cl02-ds-vsan01" } }, "networkSpec" : { "vdsSpecs" : [ { "name" : "sfo-w01-cl02-vds01", "isUsedByNsxt" : false, "portGroupSpecs" : [ { "name" : "sfo-w01-cl02-vds01-pg-mgmt", "transportType" : "MANAGEMENT" }, { "name" : "sfo-w01-cl02-vds01-pg-vmotion", "transportType" : "VMOTION" } ] }, { "name" : "sfo-w01-cl02-vds02", "isUsedByNsxt" : true, "portGroupSpecs" : [ { "name" : "sfo-w01-cl02-vds02-pg-vsan", "transportType" : "VSAN" } ] } ], "nsxClusterSpec" : { "nsxTClusterSpec" : { "geneveVlanId" : 12 } } }, "advancedOptions" : { "evcMode" : "", "highAvailability" : { "enabled" : true } } } ], "skipFailedHosts" : false } }