VMware Cloud Foundation Hyperconverged Infrastructure

Deployment of Workload Domains on VMware Cloud Foundation 4.0 on Dell EMC VxRail using Public API – Part 1


  • Madhav Achari (Systems Test)
  • Amitrajit Chatterjee (Staff II Solutions Architect)

VMware Cloud Foundation 4.0 on Dell EMC VxRail introduces support of workload domain deployment and operations utilizing the public API interface. In this multi-part blog series, we will provide guidance on how to use these new APIs to perform common deployments and operations. In Part 1 of the blog series, we will walk you through the steps to deploy a new workload domain while Part 2 will cover various workload domain related operations.

Detailed API documentation is located at VMware {code} site. This can also be accessed from inside the SDDC Manager from the Developer Center.


Please complete VCF on VxRail management domain bring up following the standard process. Once the SDDC Manager is up and running the Workload Domain operations can be done via public api as detailed below.

Obtain Access token

The SDDC Manager APIs are secured using token-based authentication. As a first step before invocation of any API, an access token must be obtained. Invoking the Token API returns a token pair – access token and refresh token. To invoke an API, the access token must be passed in the Authorization header as a Bearer token.

SSH to the SDDC Manager vm or a Linux jump vm and execute the relevant curl command to generate the <long token>. It will need to be passed to all commands executed after this.


Refresh Access token

If the Access token expires, a Refresh token will need to be obtained. A refresh token can be used any number of times to obtain an access token until it has not expired or been revoked. To check if any API call is failing due to expired token, review the log file /var/log/vmware/vcf/domainmanager/domainmanager.log. Sample error message is given below.  Follow the API guidance to obtain the Refresh token.

Prepare Workload Domain json

The VCF-VxRail Workload domain deploys an additional vCenter Server Appliance for the new domain within the management domain. By leveraging a separate vCenter Server instance per domain, software updates can be applied without impacting other domains. It also allows for each domain to have additional isolation as needed.

The json file needs to be of the following format.

Workload Domain Validation

The next step is to validate the json file which was created above.

Workload Domain Validation Status

To get the validation status, the following command needs to be executed.

Workload Domain Creation Task

To kick off the workload domain deployment task, the following command needs to be executed.

Validate the task is running from the SDDC Manager GUI

You can also validate the new vcenter appliance is being deployed from the Management Domain vcenter

Workload Domain Creation Status

To get the validation status of the workload domain creation task, the following command needs to be executed.

The full API Output will look similar to this

Validate the task has completed from the SDDC Manager GUI

Once the vCenter appliance has been deployed, the next task would be to create a local user in the vCenter server. Once the workload domain nodes have been imaged, perform the VxRail first run of the workload domain nodes using the external vCenter Server. More detailed steps are available here.

Prepare json file for importing cluster

Now the VxRail cluster will need to be imported into the Workload Domain via the SDDC Manager

Create json file for import cluster in the following format

Get the domain id. The cluster needs to be added to a specific domain for which you need to gather the id first

Perform cluster validation

To perform the cluster input validation, the following command needs to be executed.

Cluster Validation Status

To get the validation status, the following command needs to be executed.

Import Cluster into SDDC Manager

Now to finally import the cluster into the SDDC Manager, the following command needs to be executed.

The task status can be monitored from the SDDC Manager as well as from the following command


Cluster Import Success Validation

Execute the following curl command to validate the successful import of the cluster.

A succesful response will look similar to this

You can also validate from the SDDC Manager GUI.


  • If there are any API related errors around input json passed with invalid input, review the log file at /var/log/vmware/vcf/domainmanager/domainmanager.log. Below is a sample error message for invalid input json. Once the input json file has been fixed, execute the same API call to revalidate the json file.


  • If there are any workflow related errors, review the log file at /var/log/vmware/vcf/domainmanager/domainmanager.log to determine the issue. Once the issue has been fixed, retry the task from API following this guidance.

This concludes all the steps required to deploy a new workload domain with the public api. In future posts we will look into additional domain operations around add/remove host and other items.



Leave a Reply

Your email address will not be published.