I have a VCF with 4 hosts using nic4, 5 for vDS. When adding an additional host, I got a failure as I am not using standard nic configuration which is nic0,1. I have never used API and it is difficult for me to find a good documentation with video that shows how to do that.
This official documentation should be handy but seems for people that understand how to use API calls (https://kb.vmware.com/s/article/83789).
I don't know if someone can point me to a detailed video on how to do that. It's been more than 1 month now the host is waiting to be added.
Try this and update with your HostID, LicenseKey and correct VDS name. Validate using POST /v1/clusters{id}/validations API.
{
"clusterExpansionSpec": {
"interRackExpansion": false,
"hostSpecs": [{
"id": "<enter_host_id_here",
"licensekey": "XXXXX-XXXXX-XXXXX-XXXXXX-XXXXX",
"username": "root",
"hostNetworkSpec": {
"vmNics": [{
"id": "vmnic4",
"vdsName": "vds01"
}, {
"id": "vmnic5",
"vdsName": "vds01"
}]
}
}]
}
}
Hi,
I've created a 2 part blog serie on how to do it. Perhaps it would be useful to you.
Both articles give you step by step instructions on how to use API in VCF.
Hope this helps.
I now see where to start. I used the developer center api on vcenter instead of SDDC manager.
Here is the error message i get now. I don't know what i am missing. I am following this kb (https://kb.vmware.com/s/article/83789)
What is the Error under Response? If you click on it, it should expand and give you more info what is going on.
Additionally, verify your input first using POST /v1/clusters{id}/validations API before you use the PATCH API. The validation API will verify the input for you.
Here is the error i get:
{
"errorCode": "MISSING_INTER_RACK_EXPANSION_DATA",
"arguments": [
"5f8fb894-d13a-4e33-9fa4-e7781fd9a198"
],
"message": "Missing inter rack cluster expansion input data - 'interRackExpansion' for cluster 5f8fb894-d13a-4e33-9fa4-e7781fd9a198",
"referenceToken": "FK1BJO"
}
Additionally, verify your input first using POST /v1/clusters{id}/validations API before you use the PATCH API
When I enter this:
{
"clusterExpansionSpec": {
"hostSpecs": [ {
"id": "254e6786-33a7-45b3-8575-3a2153062e9a",
"hostNetworkSpec": {
"vmNics": [ {
"id": "vmnic4",
"vdsName": "ravc-vds"
},{
"id": "vmnic5",
"vdsName": "ravc-vds"
} ]
}
} ]
}
}
Here is the error i get
"status": 403, "message": "The attempted functionality CREATE_CLUSTER_VALIDATION is not supported in the current system state. {1}"
Try this and update with your HostID, LicenseKey and correct VDS name. Validate using POST /v1/clusters{id}/validations API.
{
"clusterExpansionSpec": {
"interRackExpansion": false,
"hostSpecs": [{
"id": "<enter_host_id_here",
"licensekey": "XXXXX-XXXXX-XXXXX-XXXXXX-XXXXX",
"username": "root",
"hostNetworkSpec": {
"vmNics": [{
"id": "vmnic4",
"vdsName": "vds01"
}, {
"id": "vmnic5",
"vdsName": "vds01"
}]
}
}]
}
}
Great. It works.
I run the api in your last post but I get the same result. But I insert this line in mine ("interRackExpansion": false,) and it works like a charm.
Here is the exact api that works for me:
{
"clusterExpansionSpec": {
"interRackExpansion": false,
"hostSpecs": [ {
"id": "254e6786-33a7-45b3-8575-3a2153062e9a",
"hostNetworkSpec": {
"vmNics": [ {
"id": "vmnic4",
"vdsName": "ravc-vds"
},{
"id": "vmnic5",
"vdsName": "ravc-vds"
} ]
}
} ]
}
}
During the execution, It failed due to licensing. I entered it directly to the host and restart the tast that runs perfectly. Thank you very much for your support. It tooks me two months before adding this host to my VCF cluster.