Add host to cluster in SDDC Manager with cluster expansion workflow from the API
search cancel

Add host to cluster in SDDC Manager with cluster expansion workflow from the API

book

Article ID: 376808

calendar_today

Updated On:

Products

VMware SDDC Manager VMware Cloud Foundation 5.x

Issue/Introduction

  • Add host to cluster in SDDC Manager with cluster expansion workflow from the API
  • Unable to add host to Cluster in SDDC Manager as UI has an error 
    No unassigned hosts available with storage type FC. Commission hosts with physical NICs 0 &1 to Add Host from UI.

 

Environment

VMware Cloud Foundation 5.x

Resolution

  1. Take a snapshot of the SDDC Manager VM through vCenter UI.
  2. SSH to SDDC Manager with vcf and su to root.
  3. Generate the token using Token API.
    curl -X POST -H "Content-Type: application/json" -d '{"username": "<SSO_USERNAME>","password": "<SSO_PASSWORD>"}' https://<sddcmanagerIp>/v1/tokens | json_pp

    Sample

    curl -X POST -H "Content-Type: application/json" -d '{"username": "[email protected]","password": "****"}' https://198.51.100.1/v1/tokens | json_pp
  4. Login to SDDC Manager and execute the cluster expansion *Validation* API.
    curl 'https://<SDDC_MANAGER_FQDN>/v1/clusters/<CLUSTER_ID>/validations' -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer <BEARER_TOKEN from above command>' -d @clusterExpansionSpec.json
  5. Once the Add Host validation API succeeds, the actual cluster expansion (or add host) API can be triggered.