If you want to create a VI workload domain 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.
This procedure uses the domainCreationSpec to create a new VI workload domain using the VMware Cloud Foundation API. It focuses on two specific sections of the domainCreationSpec that allow you to create a VI workload domain with more than one vDS or use ESXi hosts with more than two pNICS; hostSpecs and vdsSpecs.
You will need to modify these sections and complete the other sections of the domainCreationSpec that are required for your environment. See the VMware Cloud Foundation API Reference Guide for details on all the sections of the domainCreationSpec. See an example of a complete domainCreationSpec at the end of this procedure.
Two vSphere Distributed Switches |
|
Four pNICs |
|
pNIC to vDS mapping |
|
vDS to traffic type mapping |
|
Prerequisites
Procedure
Example
{ "domainName" : "sfo-w01", "vcenterSpec" : { "name" : "sfo-w01-vc01", "networkDetailsSpec" : { "ipAddress" : "10.0.0.43", "dnsName" : "sfo-w01-vc01.vrack.vsphere.local", "gateway" : "10.0.0.250", "subnetMask" : "255.255.255.0" }, "rootPassword" : "<password>", "datacenterName" : "sfo-w01-dc01", "vmSize" : "medium", "storageSize" : "lstorage" }, "computeSpec" : { "clusterSpecs" : [ { "name" : "sfo-w01-cl01", "hostSpecs" : [ { "id" : "0ac30e66-7f65-4477-8331-80c3777c153c", "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" } ] } }, { "id" : "05d1a8df-773a-46bb-8838-dcb5bb3358ea", "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" } ] } }, { "id" : "2b8b770f-265d-4a63-b830-9c98038c81b2", "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" } ] } } ], "datastoreSpec" : { "vsanDatastoreSpec" : { "failuresToTolerate" : 1, "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "datastoreName" : "sfo-w01-cl01-ds-vsan01" } }, "networkSpec" : { "vdsSpecs" : [ { "name" : "sfo-w01-cl01-vds01", "portGroupSpecs" : [ { "name" : "sfo-w01-cl01-vds01-pg-mgmt", "transportType" : "MANAGEMENT" }, { "name" : "sfo-w01-cl01-vds01-pg-vmotion", "transportType" : "VMOTION" }] }, { "name" : "sfo-w01-cl01-vds02", "portGroupSpecs" : [ { "name" : "sfo-w01-cl01-vds02-pg-vsan", "transportType" : "VSAN" } ], "isUsedByNsxt" : true } ], "nsxClusterSpec" : { "nsxTClusterSpec" : { "geneveVlanId" : 2, "ipAddressPoolSpec" : { "name" : "static-ip-pool-01", "subnets" : [ { "ipAddressPoolRanges" : [ { "start" : "10.0.11.50", "end" : "10.0.11.70" }, { "start" : "10.0.11.80", "end" : "10.0.11.150" } ], "cidr" : "10.0.11.0/24", "gateway" : "10.0.11.250" } ] } } } } } ] }, "nsxTSpec" : { "nsxManagerSpecs" : [ { "name" : "sfo-w01-nsx01a", "networkDetailsSpec" : { "ipAddress" : "10.0.0.44", "dnsName" : "sfo-w01-nsx01a.vrack.vsphere.local", "gateway" : "10.0.0.250", "subnetMask" : "255.255.255.0" } }, { "name" : "sfo-w01-nsx01b", "networkDetailsSpec" : { "ipAddress" : "10.0.0.45", "dnsName" : "sfo-w01-nsx01b.vrack.vsphere.local", "gateway" : "10.0.0.250", "subnetMask" : "255.255.255.0" } }, { "name" : "sfo-w01-nsx01c", "networkDetailsSpec" : { "ipAddress" : "10.0.0.46", "dnsName" : "sfo-w01-nsx01c.vrack.vsphere.local", "gateway" : "10.0.0.250", "subnetMask" : "255.255.255.0" } } ], "vip" : "10.0.0.166", "vipFqdn" : "sfo-w01-nsx01.vrack.vsphere.local", "licenseKey" : "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", "nsxManagerAdminPassword" : "<password>", "formFactor" : "large" } }