VMware {code}

New Release – Datacenter CLI 3.0.0

We are happy to announce VMware Datacenter CLI (DCLI) 3.0.0 has been released!

DCLI was first released a little over 2 years ago, in technical preview form, as a standalone offering. Since that first release, there have been more than 5 releases with a ton of great new updates! We have added DCLI to the Python Package Index (PyPI) to streamline the installation process. DCLI has been updated to connect to VMware Cloud on AWS and an SDDC’s NSX-T instance. The credential store has been updated to support multiple refresh tokens and even new types of parameters. DCLI has also been updated with new color themes, filtering capabilities, and a verbose logging parameter. DCLI 3.0.0 will keep that trend going!

DCLI 3.0.0 introduces the following updates and improvements:

  • Added support for NSX-T 2.2 or later
  • Added the ability to generate empty JSON input structures
  • Added the ability to specify a file for verbose output
  • Updated the process of connecting to NSX-T services based in VMware Cloud on AWS
  • Updated the default formatter to YAML
  • Updated to be FIPS-compliant

Let’s check out a couple of these updates in more detail.

JSON Input Structures

DCLI 3.0.0 introduces some new options which allow us to work with JSON files. Under the covers, DCLI operates by connecting to REST based API services. Each of these services interact with JSON based input and responses. This new functionality adds consistency to the way we interact with these REST API services between the different SDKs and other automation tools.

The three new options that have been added to DCLI to interact with JSON files are:

  • generate-json-input
  • generate-required-json-input
  • json-input

An example of where this comes in quite handy, creating a new VM. VMs have many, many different configuration options available. Creating a new VM with DCLI gives us more than 30 different parameters. Creating a fully populated VM object starts with a JSON body structure of 160 lines, which is the output of the ‘generate-json-input’ option. However, thanks to the vSphere Automation API, we aren’t required to fill in all of those lines. The API service can fill in the parameters we don’t specify using some best practices. The JSON body structure shrinks from 160 lines down to just 5 lines, which is the output from the ‘generate-required-json-intput’ option.

An example comparing the output of the two files:

Sample: JSON Output from DCLI

One caveat to the VM creation process though, while some of the properties are not required, we will still need to specify some of the options in the “Placement” portion. These outline the locations where the VM will reside with regard to object (Folder), compute (Cluster, Host, Resource Pool), and data (Datastore, Datastore Cluster) levels.

Here’s an example of what the process would look like to create a new VM with only the required inputs and the name property:

Example: Creating a new VM with JSON input

Updated NSX-T Support

DCLI’s support for NSX-T has been greatly improved as well. DCLI 2.9.1 added support for NSX-T environments which were provisioned as part of a VMware Cloud on AWS SDDC. However, one of the issues with this support was that we had to find the NSX-T reverse proxy URL from within the output of our SDDC’s configuration. DCLI 3.0.0 has been updated so that if we specify our Org ID and SDDC ID, it will automatically connect to the SDDC’s instance of NSX-T!

An example:

Example: Easily connect to a VMware Cloud on AWS NSX-T instance

Another improvement for NSX-T usage with DCLI, we can now also connect to on-premises NSX-T environments! We can follow the same process as the other services and we can save our credentials to the builtin credential store as well!

An example of logging into an on-premises NSX-T environment:

Example: Logging in to an on-premises NSX-T instance


VMware Datacenter CLI (DCLI) 3.0.0 has been released and it comes with some great updates! DCLI can now create JSON files and even use them for input, which unifies the process between it and the other SDKs and automation tools. DCLI can simplify the process of connecting to your VMware Cloud on AWS SDDC’s instance of NSX-T, as well as being able to connect to your on-premises instance of NSX-T. DCLI is also FIPS compliant. There’s also a handful of other items which will make you upgrade today!

If you already updated to DCLI version 2.9.1 or newer, the upgrade process is extremely simple and follows the standard Python Package Index (PyPI) upgrade method:

Example: DCLI Update

For more information on changes made in VMware DCLI 3.0.0, including improvements, security enhancements, and more, see the VMware DCLI 3.0.0 Release Notes. For more information on specific product features, see the VMware DCLI 3.0.0 User’s Guide.

Let us know in the comments what you’d like to see released in the next version!


Leave a Reply

Your email address will not be published.