NSX CLI Guide

Associated Commands:

CLI Description Command

Clear Cluster Virtual IPv4 address


Clear Cluster Virtual IPv4 address.
clear cluster vip

Clears both cluster Virtual IPv4 & IPv6 addresses


Clears both cluster Virtual IPv4 & IPv6 addresses.
clear cluster vip all

Clear Cluster Virtual IPv6 address


Clear Cluster Virtual IPv6 address.
clear cluster vip ipv6

Clear all configured logging-servers


Clear all logging server configuration.
clear logging-servers

Remove all other management nodes from the cluster


Remove all other management nodes from the cluster. This will effectively convert a multi-node management cluster into a single node setup. The system will prompt for confirmation for this operation. It is recommended to use GSS guidance before using this command.
deactivate cluster

Delete logging-server


Delete the specified logging server configuration. You can use the get logging-servers command to display the current logging server configuration.
del logging-server <hostname-or-ip-address[:port]> proto <proto> level <level> [facility <facility>] [messageid <messageid>] [structured-data <structured-data>]

Delete NSX config


Delete NSX config on this node without removing it as transport node from management plane.
del nsx

Delete NSX from host


Destroy NSX environment on this host without removing its transport node from management plane. If there are no resources used by the NSX host switches, this command will delete the host switches and all NSX packages. If there are any resources on the host switches, the resources will first be migrated out of the NSX host switches and then the host switches and all NSX packages will be deleted.
del nsx

Delete NSX config, management IP, logs and filestore


Delete NSX config on this node without removing it as transport node from management plane. Additionally clear logs, filestore and management IP from the node.
del nsx all

Delete NSX from host


Destroy NSX environment on this host without removing its transport node from management plane. If there are no resources used by the NSX host switches, this command will delete the host switches and all NSX packages. If there are any resources on the host switches, the resources will first be migrated out of the NSX host switches and then the host switches and all NSX packages will be deleted. Skips the pre-checks.
del nsx force

Deregister Edge from management plane


Detach this Edge from the management plane.
detach management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]

Detach host from management plane


Detach this hypervisor host from the management plane. You can specify any NSX Manager in the management cluster in this command.

Use the API username and password for the specified NSX Manager. If you do not provide a password on the command line, you will be prompted to enter one.

Get the NSX Manager thumbprint by running the get certificate api thumbprint command on the specified NSX Manager.

detach management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]

Detach specified node from the cluster


Detach the specified node from the cluster.
detach node <node-id-arg>

Detach specified node from the cluster without checking repository-ip modification errors


Detach specified node from the cluster without checking repository-ip modification errors.
detach node <node-id-arg> ignore-repository-ip-check

Display API server certificate


Display the API server's certificate.
get certificate api

Display API server certificate text


Display the API server's certificate text.
get certificate api text

Display API server certificate thumbprint


Display the API server's certificate thumbprint.
get certificate api thumbprint

Display cluster certificate


Display the clsuter certificate.
get certificate cluster

Display cluster certificate text


Display the cluster certificate text.
get certificate cluster text

Display cluster certificate thumbprint


Display the cluster certificate thumbprint.
get certificate cluster thumbprint

Show the cgroup translation


Display the translations for the specified container group. Optionally specify a translation type to display translations of that type.
get cgroup <uuid> [<translation-type>]

Show all existing cgroups


Display all container groups.
get cgroups (Deprecated)

Lookup cgroups for the IP address


Display container groups with the specified IP address.
get cgroups with ip <ip46-address> (Deprecated)

Lookup cgroups for the hardware address


Display container groups with the specified MAC address.
get cgroups with mac <hardware-address> (Deprecated)

Lookup cgroups for the network interface


Display container groups with the specified network interface.
get cgroups with vif <vif-id-arg> (Deprecated)

Get Cluster Config


Get Cluster Config.
get cluster config

Get Cluster Status


Get status of all the groups.
get cluster status

Get Cluster Status


Get status of all the groups. Show leadership if there is any.
get cluster status verbose

Get Cluster Virtual IP


Get Cluster Virtual IP.
get cluster vip

Show the group translation


Display the translations for the specified container group. Optionally specify a translation type to display translations of that type.
get group <uuid> [<translation-type>]

Show all existing groups


Display all groups.
get groups

Lookup groups for the IP address


Display groups with the specified IP address.
get groups with ip <ip46-address>

Lookup groups for the hardware address


Display groups with the specified MAC address.
get groups with mac <hardware-address>

Lookup group for the network interface


Display groups with the specified network interface.
get groups with vif <vif-id-arg>

Show log file contents


Display the contents of the specified log file.
get log-file <log-file-arg>

Show log file contents


Display the last 10 lines of the specified log file and all new messages that are written to the log file.
get log-file <log-file-arg> follow

Display the list of logs files


Display the list of logs files
get log-file list

Display all configured logging servers


Display logging server configuration.
get logging-servers

Get the realization status for the specified transport node


Get the realization status for the specified transport node.
get realization-status <uuid-arg>

Get all connected receivers


Display all connected receivers.
get receivers

Show the stretched cgroup translation on both local and remote sites


Display both local and remote translations for the specified stretched container group. Optionally specify a translation type to display translations of that type.
get stretched cgroup <container-id> <translation-type> (Deprecated)

Show the stretched group translation on both local and remote sites


Display both local and remote translations for the specified stretched group. Optionally specify a translation type to display translations of that type.
get stretched group <group-id> <translation-type>

Display VIF info


Display information about the sepcified VIF. You can find VIF IDs with the get transport-node <uuid> vif command or the get logical-switch <uuid> ports command (see Child-UUID where Child-EntityType is VIF).
get vif <vif-id-arg>

Join this node to a NSX Cluster


Join this node to a management cluster. You must provide the API username and password of a node that is already in the cluster. On that node, you can run the get cluster config command to get the cluster ID, and run the get certificate api thumbprint command to get the thumbprint. If you do not provide a password on the command line, you will be prompted to enter one.
join <ip-address[:port]> cluster-id <cluster-id> thumbprint <thumbprint> [token <api-token>] [username <username> [password <password>]] [force]

Join node to the management plane


Join this node to the management plane.
join management-plane <hostname-or-ip-address[:port]> thumbprint <thumbprint> token <token> [node-uuid <uuid>] [replace]

Join host with management plane


Join this hypervisor host with the management plane. You can specify any NSX Manager in the management cluster in this command.

Use the API username and password for the specified NSX Manager. If you do not provide a password on the command line, you will be prompted to enter one.

Get the NSX Manager thumbprint by running the get certificate api thumbprint command on the specified NSX Manager.

join management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]

Join node to the management plane


Join this node to the management plane.
join management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>] [node-uuid <uuid>] [replace]

Push certificate to management plane


Pushes host certificate to management plane.

Use the API username and password for the specified NSX Manager. If you do not provide a password on the command line, you will be prompted to enter one.

Get the NSX Manager thumbprint by running the get certificate api thumbprint command on the specified NSX Manager.

push host-certificate <manager-hostname-or-ip-address-and-optional-port-arg> username <api-username> thumbprint <api-thumbprint>

Recover management plane account on the host


Recover management plane account on the host. You can specify any NSX Manager in the management cluster in this command.

Use the API username and password for the specified NSX Manager. If you do not provide a password on the command line, you will be prompted to enter one.

Get the NSX Manager thumbprint by running the get certificate api thumbprint command on the specified NSX Manager.

reset management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]

Set Cluster Virtual IP


Set Cluster Virtual IP.
set cluster vip <ip46-address>

Set logging-server


Configure a logging server. The logging system uses the facility codes defined in RFC 5424. Facility local7 is used for audit messages, and local6 is used for non-audit messages.
set logging-server <hostname-or-ip-address[:port]> proto <proto> level <level> [facility <facility>] [messageid <messageid>] [serverca <filename>] [clientca <filename>] [certificate <filename>] [key <filename>] [structured-data <structured-data>]

Set kubeconfig file of the NAPP Kubernetes cluster


Set kubeconfig file of the NAPP Kubernetes cluster. This operation overrides any existing NAPP kubeconfig file.
set napp kubeconfig

Sync APH certificates from management plane


Syncs APH certificates from management plane to host. If you do not provide a password on the command line, you will be prompted to enter one.

Get the NSX Manager thumbprint by running the get certificate api thumbprint command on the specified NSX Manager.

sync-aph-certificates <manager-hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]

Verify all configured logging servers


Verify iptables rules for all logging servers and update if needed
verify logging-servers

Total commands: 54