Automating HCX

This page contains an introduction to automation techniques & a collection of the best HCX automation resources out there.

Disclaimer: I do not make any claims of personal expertise in the automation domain. My objective hope is to track down the best resources, and build a good index here for everyone’s convenience.

Posts on hcx.design

Excellent Resources

Introduction to HCX APIs

There are two places to get HCX API information: HCX API Explorer & code.vmware.com.

At least of this writing (18 Nov 2022), the best version information is most accurate within the HCX API Explorer. Until content is squared away in the central VMware code portal, this is the best way to find information.

You can navigate to the API Explorer by browsing /hybridity/docs/ on your HCX Manager system.

  1. Open your favorite browser.
  2. Navigate to https://<hcxmgr-ip-or-fqdn>/hybridity/docs
  3. Choose the HCX system type (Connector/Cloud)

The HCX API Explorer uses swagger based interface for the OAS3 APIs. It allows HCX users to interact with current available APIs without requiring an external client.

Introduction to the PowerCLI Module for HCX

VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell, and provides more than 600 cmdlets for managing and automating vSphere and the
VMware family of products.

The PowerCLI module for VMware HCX adds the capability to automation HCX migrations, to create and modify migration schedules, query migration status, perform HCX Network Extension operations, perform HCX Disaster Recovery operations, and configuration of HCX Interconnect components and more.

We recommend using the latest PowerCLI module to get the latest available HCX functionality built in (today it is PowerCLI 12.7).

Terraform Provider for HCX

HCX Terraform Provider
This is the repository for the Terraform HCX Provider, which one can use with Terraform to work with VMware HCX by my friend Antoine Deleporte.

registry.terraform.io/providers/adeleporte/hcx/latest/docs

•HCX Terraform Provider: https://gitlab.com/adeleporte/terraform-provider-hcx

•HCX Node.JS code: https://gitlab.com/adeleporte/vcn-api/-/blob/master/hcx/index.js