Manage and report on an NSX Infrastructure using NSX Manager, NSX Controller, and ESXi CLI commands


NSX Manager CLI

To get a full list of commands on the NSX Manager type list then hit Enter

  configure terminal
  copy running-config startup-config
  ping WORD
  ping ipv6 WORD
  set clock HH:MM:SS MM DD YYYY
  show ip route
  show ip route A.B.C.D/M
  show ipv6 route
  show running-config
  show startup-config
  terminal length <0-512>
  terminal no length
  traceroute WORD
  traceroute ipv6 WORD
  write memory
  show system uptime
  show clock
  show tech-support
  export tech-support scp URL
  show version
  show process (list|monitor)
  show arp
  show system memory
  show log
  show log last NUM
  show log (follow|reverse)
  write erase
  show filesystems
  show ethernet
  database erase
  show manager log
  show manager log (follow|reverse|size)
  show manager log last NUM
  show appmgmt log
  show appmgmt log (follow|reverse|size)
  show appmgmt log last NUM
  ssh (start|stop)
  show interface mgmt
  show slots
  show system log size
  purge log (manager|system)
  debug connection WORD
  debug show files
  debug export scp URL (FILENAME|all)
  debug remove (FILENAME|all)
  debug packet capture interface (mgmt|s0)
  no debug packet capture interface (mgmt|s0)
  debug packet display interface (mgmt|s0) EXPRESSION
  debug packet display interface (mgmt|s0)
  show interface

Again, I will go through the commands I feel are most useful.
Command: show manager log
Functionality: Display the NSX Manager log
Example output

2015-04-28 01:20:00.160 GMT  INFO pool-8-thread-1 ScheduleSynchronizer:48 - Start executing task: task-698 and running executor threads 2
2015-04-28 01:20:00.226 GMT  INFO TaskFrameworkExecutor-25 JobWorker:243 - Updating the status for jobinstance-9399 to COMPLETED
2015-04-28 01:20:00.234 GMT  INFO TaskFrameworkExecutor-25 JobWorker:129 - TF:All tasks in the job completed for jobdata-304
2015-04-28 01:20:00.242 GMT  INFO TaskFrameworkExecutor-25 ScheduleSynchronizer:60 - Releasing a thread to executor pool and executor pool active count 1
2015-04-28 01:20:00.289 GMT  INFO TaskFrameworkExecutor-27 TaskServiceImpl:101 - TF:Created Job with ID jobdata-2626
2015-04-28 01:20:00.296 GMT  INFO TaskFrameworkExecutor-27 TaskServiceImpl:399 - TF:Scheduling Job jobdata-2626

Command: show ip route
Functionality: show routes on NSX Manager
Example output

nsxmanager> show ip route
Codes: K - kernel route, C - connected, S - static,
       > - selected route, * - FIB route

S>* [1/0] via, mgmt
C>* is directly connected, mgmt

Command: show interface mgmt
Functionality: Display information about the management interface of NSX Manager
Example output

nsxmanager> show interface mgmt
Interface mgmt is up, line protocol is up
  index 3 metric 1 mtu 1500 
  HWaddr: 00:50:56:96:77:ae
  inet broadcast
  inet6 fe80::250:56ff:fe96:77ae/64
  Auto-duplex (Half), Auto-speed (-6593792Mb/s)
    input packets 755277, bytes 498764083, dropped 68, multicast packets 0
    input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
    output packets 821467, bytes 688404427, dropped 0
    output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
    collisions 0


NSX Controller CLI

Command: show control-cluster status
Functionality: Display status of NSX Controller
Example output

nsx-controller # show control-cluster status
Type                Status                                       Since
Join status:        Join complete                                04/23 06:48:04
Majority status:    Connected to cluster majority                04/30 05:31:09
Restart status:     This controller can be safely restarted      04/30 05:30:49
Cluster ID:         2f254b01-86f0-4f04-80b8-79a5ac5ac41f
Node UUID:          2f254b01-86f0-4f04-80b8-79a5ac5ac41f

Role                Configured status   Active status
api_provider        enabled             activated
persistence_server  enabled             activated
switch_manager      enabled             activated
logical_manager     enabled             activated
directory_server    enabled             activated

Command: show control-cluster history
Functionality: Display the history and logs of control cluster
Example output

 04/23 00:42:28: Role api_provider activated
  04/23 00:42:28: Role directory_server activated
  04/23 00:42:28: Role logical_manager activated
  04/23 00:42:28: Role switch_manager activated
  04/23 06:46:22: Node restarted
  04/23 06:46:52: Joining cluster via node
  04/23 06:46:52: Waiting to join cluster
  04/23 06:46:52: Role api_provider configured
  04/23 06:46:52: Role directory_server configured
  04/23 06:46:52: Role switch_manager configured
  04/23 06:46:52: Role logical_manager configured

Command: show control-cluster role
Functionality: Display role of controller
Example output

nsx-controller # show control-cluster role
                          Listen-IP  Master?    Last-Changed  Count
api_provider         Not configured      Yes  04/30 05:31:09      8
persistence_server              N/A      Yes  04/30 05:31:09      5
switch_manager        Yes  04/30 05:31:09      8
logical_manager                 N/A      Yes  04/30 05:31:09      8
directory_server                N/A      Yes  04/30 05:31:09      8



ESXi CLI commands were already referenced here.

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Back to Top