Getting started with the HCX Central CLI (CCLI)

The CCLI is an essential troubleshooting tool for HCX operators. Here I will cover a some commands to get you going 🙌🏼.

How to access the CCLI

The CCLI service runs on the HCX Managers. Open your SSH client of choice and make a connection to the HCX Manager with the admin user.

If the SSH service is disabled, skip to the Enabling the HCX Manager SSH service section below. Come back here once the Manager is reachable over SSH/TCP-22

grosas-a01:~ grosas$ ssh admin@hcx-ip-or-fqdn

Immediately after logging in HCX, the Central CLI can be launched with the ccli command. The CCLI prompt drops the tilde and dollar sign.

[admin@onpremhcxmgr1 ~]$
[admin@onpremhcxmgr1 ~]$ ccli
Welcome to HCX Central CLI

Use exit to leave CCLI mode:

[admin@onpremhcxmgr1] exit 
[admin@onpremhcxmgr1 ~]$

Every example command that follows is in CCLI modethe changed prompt is used in the examples

Listing and Selecting HCX Appliances

The list command displays HCX Network Extension and Migration appliances:

[admin@onpremhcxmgr1] list

There’s a desktop capture of the output below. There is a few details to note:

  • The Node Id in the first column is used when selecting an appliance. Some CCLI commands are run in the context of a selected component. The Selected column will have an asterik on a selected appliance.
  • The Address column will display the Management IP address (Assigned from the Management Network Profile).
  • If the IX/NE is appliance Management IP is not reachable from the HCX Manager via TCP-9443, the appliance will be shown Disconnected in the State column.

Use the go command to select an appliance (the prompt will adjust to reflect the appliance context):

[admin@onpremhcxmgr1] go 0
 Switched to node 0. 
[admin@onpremhcxmgr1:Legacy-to-SDDC-IX-I1]   

Screen recording to recap what we’ve covered so far:

Launching the CCLI. Listing HCX appliances. Selecting an appliance.

Healthcheck Commands

The health check commands execute a series of checks against the Manager system

[admin@onpremhcxmgr1] hc probe -d

General Healthcheck

Select an appliance and run a unit health check to check the state of resources, services and tunnels.

[admin@onpremhcxmgr1] go 2
[admin@onpremhcxmgr1:Legacy-to-SDDC-NE-I2] hc unit all -d

per appliance healthcheck

Performance Diagnostics

The perftest commands can be used for reachability and to get rough throughput baselines. The test are performed with a single core and may under represent what can actually be achieved on the appliances.

perftest uplink is what I tend to start with; the other varieties can be used depending on the need. Use the -T flag to constrain the length of the test, by default each test will last a minute (in each direction, for each tunnel)

[admin@onpremhcxmgr1] go 2
[admin@onpremhcxmgr1:Legacy-to-SDDC-NE-I2] perftest uplink -T 1

Connect to the HCX IX/NE (without SSH)

To perform additional diagnostics securely you can use the SSH command within the CCLI (the connection will piggyback on the management channel) and access the IX/NE components.

[admin@onpremhcxmgr1] go 2
[admin@onpremhcxmgr1:Legacy-to-SDDC-NE-I2] ssh

Listing all available CCLI commands

There are more commands there.

Use the help to display available commands with a short description. Type the individual command for usage examples.

Enabling the HCX Manager SSH service

Browse to the HCX MGR appliance management interface https://hcx-ip-or-fqdn:9443
In the Appliance Summary tab > System Level Services section,

More Information

There is a new CCLI Reference document under construction; that will be available docs.vmware.com in the very near future.

There is also a very outdated version that was previously hosted in the hcx.vmware.com documents area that is no longer available there. I’m filing it in here for historical reference:


Gabe 🖖🏼

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s