NSX CLI Guide
Associated Commands:
CLI Description | Command |
---|---|
Clear Cluster Virtual IPv4 addressClear Cluster Virtual IPv4 address. |
clear cluster vip
|
Clears both cluster Virtual IPv4 & IPv6 addressesClears both cluster Virtual IPv4 & IPv6 addresses. |
clear cluster vip all
|
Clear Cluster Virtual IPv6 addressClear Cluster Virtual IPv6 address. |
clear cluster vip ipv6
|
Clear all configured logging-serversClear all logging server configuration. |
clear logging-servers
|
Remove all other management nodes from the clusterRemove 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-serverDelete 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 configDelete NSX config on this node without removing it as transport node from management plane. |
del nsx
|
Delete NSX from hostDestroy 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 filestoreDelete 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 hostDestroy 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 planeDetach this Edge from the management plane. |
detach management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]
|
Detach host from management planeDetach 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 |
detach management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]
|
Detach specified node from the clusterDetach the specified node from the cluster. |
detach node <node-id-arg>
|
Detach specified node from the cluster without checking repository-ip modification errorsDetach specified node from the cluster without checking repository-ip modification errors. |
detach node <node-id-arg> ignore-repository-ip-check
|
Display API server certificateDisplay the API server's certificate. |
get certificate api
|
Display API server certificate textDisplay the API server's certificate text. |
get certificate api text
|
Display API server certificate thumbprintDisplay the API server's certificate thumbprint. |
get certificate api thumbprint
|
Display cluster certificateDisplay the clsuter certificate. |
get certificate cluster
|
Display cluster certificate textDisplay the cluster certificate text. |
get certificate cluster text
|
Display cluster certificate thumbprintDisplay the cluster certificate thumbprint. |
get certificate cluster thumbprint
|
Show the cgroup translationDisplay 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 cgroupsDisplay all container groups. |
get cgroups
(Deprecated)
|
Lookup cgroups for the IP addressDisplay container groups with the specified IP address. |
get cgroups with ip <ip46-address>
(Deprecated)
|
Lookup cgroups for the hardware addressDisplay container groups with the specified MAC address. |
get cgroups with mac <hardware-address>
(Deprecated)
|
Lookup cgroups for the network interfaceDisplay container groups with the specified network interface. |
get cgroups with vif <vif-id-arg>
(Deprecated)
|
Get Cluster ConfigGet Cluster Config. |
get cluster config
|
Get Cluster StatusGet status of all the groups. |
get cluster status
|
Get Cluster StatusGet status of all the groups. Show leadership if there is any. |
get cluster status verbose
|
Get Cluster Virtual IPGet Cluster Virtual IP. |
get cluster vip
|
Show the group translationDisplay 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 groupsDisplay all groups. |
get groups
|
Lookup groups for the IP addressDisplay groups with the specified IP address. |
get groups with ip <ip46-address>
|
Lookup groups for the hardware addressDisplay groups with the specified MAC address. |
get groups with mac <hardware-address>
|
Lookup group for the network interfaceDisplay groups with the specified network interface. |
get groups with vif <vif-id-arg>
|
Show log file contentsDisplay the contents of the specified log file. |
get log-file <log-file-arg>
|
Show log file contentsDisplay 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 filesDisplay the list of logs files |
get log-file list
|
Display all configured logging serversDisplay logging server configuration. |
get logging-servers
|
Get the realization status for the specified transport nodeGet the realization status for the specified transport node. |
get realization-status <uuid-arg>
|
Get all connected receiversDisplay all connected receivers. |
get receivers
|
Show the stretched cgroup translation on both local and remote sitesDisplay 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 sitesDisplay 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 infoDisplay 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 ClusterJoin 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 planeJoin 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 planeJoin 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
|
join management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]
|
Join node to the management planeJoin 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 planePushes 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 |
push host-certificate <manager-hostname-or-ip-address-and-optional-port-arg> username <api-username> thumbprint <api-thumbprint>
|
Recover management plane account on the hostRecover 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 |
reset management-plane <hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]
|
Set Cluster Virtual IPSet Cluster Virtual IP. |
set cluster vip <ip46-address>
|
Set logging-serverConfigure 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 clusterSet kubeconfig file of the NAPP Kubernetes cluster. This operation overrides any existing NAPP kubeconfig file. |
set napp kubeconfig
|
Sync APH certificates from management planeSyncs 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 |
sync-aph-certificates <manager-hostname-or-ip-address[:port]> username <username> thumbprint <thumbprint> [password <password>]
|
Verify all configured logging serversVerify iptables rules for all logging servers and update if needed |
verify logging-servers
|