VMware NSX CLI Cheatsheet
#
VMware NSX CLI provides commands to manage and configure the NSX network virtualization and security platform. These commands help administrators manage logical switches, routers, firewalls, and other NSX components directly from the command line.
NSX System Management
#
Command/Option | Example | Description |
---|
show system status | show system status | Display the system status of NSX components |
show version | show version | Display the NSX software version |
show log | show log | Display the system logs |
show tech-support | show tech-support | Generate a tech support bundle for troubleshooting |
Logical Switch Management
#
Command/Option | Example | Description |
---|
show logical-switch | show logical-switch | List all logical switches |
create logical-switch | create logical-switch name <switch_name> | Create a new logical switch |
delete logical-switch | delete logical-switch name <switch_name> | Delete a logical switch |
show logical-switch port | show logical-switch port <switch_name> | List all ports on a logical switch |
Logical Router Management
#
Command/Option | Example | Description |
---|
show logical-router | show logical-router | List all logical routers |
create logical-router | create logical-router name <router_name> | Create a new logical router |
delete logical-router | delete logical-router name <router_name> | Delete a logical router |
show logical-router interface | show logical-router interface <router_name> | List all interfaces on a logical router |
Edge Services Management
#
Command/Option | Example | Description |
---|
show edge | show edge | List all NSX Edge instances |
create edge | create edge name <edge_name> | Create a new NSX Edge instance |
delete edge | delete edge name <edge_name> | Delete an NSX Edge instance |
show edge interface | show edge interface <edge_name> | List all interfaces on an NSX Edge instance |
Firewall Management
#
Command/Option | Example | Description |
---|
show firewall rules | show firewall rules | List all firewall rules |
create firewall rule | create firewall rule name <rule_name> | Create a new firewall rule |
delete firewall rule | delete firewall rule name <rule_name> | Delete a firewall rule |
show firewall rule details | show firewall rule details <rule_name> | Display details of a firewall rule |
Load Balancer Management
#
Command/Option | Example | Description |
---|
show load-balancer | show load-balancer | List all load balancers |
create load-balancer | create load-balancer name <lb_name> | Create a new load balancer |
delete load-balancer | delete load-balancer name <lb_name> | Delete a load balancer |
show load-balancer pool | show load-balancer pool <lb_name> | List all pools in a load balancer |
create load-balancer pool | create load-balancer pool name <pool_name> | Create a new pool in a load balancer |
delete load-balancer pool | delete load-balancer pool name <pool_name> | Delete a pool from a load balancer |
VPN Management
#
Command/Option | Example | Description |
---|
show vpn | show vpn | List all VPN configurations |
create vpn | create vpn name <vpn_name> | Create a new VPN configuration |
delete vpn | delete vpn name <vpn_name> | Delete a VPN configuration |
show vpn status | show vpn status <vpn_name> | Display the status of a VPN configuration |
Miscellaneous
#
Command/Option | Example | Description |
---|
show running-config | show running-config | Display the current running configuration |
show startup-config | show startup-config | Display the startup configuration |
copy running-config startup-config | copy running-config startup-config | Save the running configuration to startup configuration |
reload | reload | Reboot the NSX device |
show clock | show clock | Display the current system time |
configure terminal | configure terminal | Enter global configuration mode |
This cheatsheet covers the most commonly used VMware NSX CLI commands and options, helping you to manage logical switches, routers, edge services, firewalls, load balancers, VPNs, and perform system management and troubleshooting effectively.