VMware Cloud Community
spierrelouis55
Contributor
Contributor
Jump to solution

utilize API calls to expand a cluster with non-standard VMNIC configurations.

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.

Reply
0 Kudos
1 Solution

Accepted Solutions
MarekZdrojewski
Jump to solution

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"
               }]
           }
       }]
   }
}

 

| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |

View solution in original post

Reply
0 Kudos
7 Replies
MarekZdrojewski
Jump to solution

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.

| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |
Reply
0 Kudos
spierrelouis55
Contributor
Contributor
Jump to solution

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)

spierrelouis55_0-1677276503241.png

 

Reply
0 Kudos
MarekZdrojewski
Jump to solution

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.

| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |
Reply
0 Kudos
spierrelouis55
Contributor
Contributor
Jump to solution

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"
}

Reply
0 Kudos
spierrelouis55
Contributor
Contributor
Jump to solution

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}"

Reply
0 Kudos
MarekZdrojewski
Jump to solution

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"
               }]
           }
       }]
   }
}

 

| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |
Reply
0 Kudos
spierrelouis55
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos