Hopefully by now you’ve seen my earlier posts about the new PowerShell module for the VMware Cloud Foundation API. If not i’d suggest reviewing these before reading on
With the release of VMware Cloud Foundation 3.9.1 it is now supported, via the API only, to use more than 2 physical NICs (pNICs) per host. In fact the API now supports up to three vSphere Distributed switches and six physical NICs, providing more flexibility to support high performance use cases and physical traffic separation.
There is a tech note that goes into more detail on the use cases for more than 2 pNICs and it also shows how this works using PostMan but we can also achieve this using PowerVCF.
The workflow using PowerVCF is the same as my earlier example for creating a workload domain. The only difference is the content in the JSON file.
Note: There is a validation API to validate the JSON you are passing before making the submission. PowerVCF dynamically formats the validation JSON as the formatting is slightly different to what you submit to create the workload domain.
To get you started there is a sample JSON file with the required formatting. Here is a snapshot of what it looks like
{
"domainName": "PowerVCF",
"vcenterSpec": {
"name": "sfo01w01vc01",
"networkDetailsSpec": {
"ipAddress": "172.16.225.64",
"dnsName": "sfo01w01vc01.sfo01.rainpole.local",
"gateway": "172.16.225.1",
"subnetMask": "255.255.255.0"
},
"rootPassword": "VMw@re1!",
"datacenterName": "PowerVCF-DC"
},
"computeSpec": {
"clusterSpecs": [ {
"name": "Cluster1",
"hostSpecs": [ {
"id": "d0693b58-4012-4387-92ed-721cfa709e44",
"license":"AAAAA-AAAAA-AAAAA-AAAAA-AAAAA",
"hostNetworkSpec": {
"vmNics": [ {
"id": "vmnic0",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic1",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic2",
"vdsName": "SDDC-Dswitch-Private2"
}, {
"id": "vmnic3",
"vdsName": "SDDC-Dswitch-Private2"
} ]
}
}, {
"id": "7006bec4-fccb-49a0-bff6-fd56c807d26a",
"license":"AAAAA-AAAAA-AAAAA-AAAAA-AAAAA",
"hostNetworkSpec": {
"vmNics": [ {
"id": "vmnic0",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic1",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic2",
"vdsName": "SDDC-Dswitch-Private2"
}, {
"id": "vmnic3",
"vdsName": "SDDC-Dswitch-Private2"
} ]
}
}, {
"id": "cc257a80-e179-4297-bf7e-179a0944bbab",
"license":"AAAAA-AAAAA-AAAAA-AAAAA-AAAAA",
"hostNetworkSpec": {
"vmNics": [ {
"id": "vmnic0",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic1",
"vdsName": "SDDC-Dswitch-Private1"
}, {
"id": "vmnic2",
"vdsName": "SDDC-Dswitch-Private2"
}, {
"id": "vmnic3",
"vdsName": "SDDC-Dswitch-Private2"
} ]
}
} ],
"datastoreSpec": {
"vsanDatastoreSpec": {
"failuresToTolerate": 1,
"licenseKey": "BBBBB-BBBBB-BBBBB-BBBBB-BBBBB",
"datastoreName": "vSanDatastore"
}
},
"networkSpec": {
"vdsSpecs": [ {
"name": "SDDC-Dswitch-Private1",
"portGroupSpecs": [ {
"name": "SDDC-DPortGroup-Mgmt",
"transportType": "MANAGEMENT"
}, {
"name": "SDDC-DPortGroup-VSAN",
"transportType": "VSAN"
}, {
"name": "SDDC-DPortGroup-vMotion",
"transportType": "VMOTION"
} ]
},
{
"name": "SDDC-Dswitch-Private2",
"portGroupSpecs": [ {
"name": "SDDC-DPortGroup-Public",
"transportType": "PUBLIC" } ]
}
],
"nsxClusterSpec": {
"nsxVClusterSpec": {
"vlanId": 2237,
"vdsNameForVxlanConfig": "SDDC-Dswitch-Private1"
}
}
}
} ]
},
"nsxVSpec" : {
"nsxManagerSpec" : {
"name" : "sfo01w01nsx01",
"networkDetailsSpec" : {
"ipAddress" : "172.16.225.66",
"dnsName" : "sfo01w01nsx01.sfo01.rainpole.local",
"gateway" : "172.16.225.1",
"subnetMask" : "255.255.255.0"
}
},
"nsxVControllerSpec" : {
"nsxControllerIps" : [ "172.16.225.121", "172.16.225.122", "172.16.225.123" ],
"nsxControllerPassword" : "VMw@re123456!",
"nsxControllerGateway" : "172.16.225.1",
"nsxControllerSubnetMask" : "255.255.255.0"
},
"licenseKey" : "CCCCC-CCCCC-CCCCC-CCCCC-CCCCC",
"nsxManagerAdminPassword" : "VMw@re1!",
"nsxManagerEnablePassword" : "VMw@re1!"
}
}
You can see that the magic happens in the hostNetworkSpec section where you map each vmnic to a vdsName
<p>"hostNetworkSpec": { "vmNics": [ { "id": "vmnic0", "vdsName": "SDDC-Dswitch-Private1" }, { "id": "vmnic1", "vdsName": "SDDC-Dswitch-Private1" }, { "id": "vmnic2", "vdsName": "SDDC-Dswitch-Private2" }, { "id": "vmnic3", "vdsName": "SDDC-Dswitch-Private2" } ] }</p>
So please try it out and let us know how it goes!