VMware NSX CLI

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/OptionExampleDescription
show system statusshow system statusDisplay the system status of NSX components
show versionshow versionDisplay the NSX software version
show logshow logDisplay the system logs
show tech-supportshow tech-supportGenerate a tech support bundle for troubleshooting

Logical Switch Management #

Command/OptionExampleDescription
show logical-switchshow logical-switchList all logical switches
create logical-switchcreate logical-switch name <switch_name>Create a new logical switch
delete logical-switchdelete logical-switch name <switch_name>Delete a logical switch
show logical-switch portshow logical-switch port <switch_name>List all ports on a logical switch

Logical Router Management #

Command/OptionExampleDescription
show logical-routershow logical-routerList all logical routers
create logical-routercreate logical-router name <router_name>Create a new logical router
delete logical-routerdelete logical-router name <router_name>Delete a logical router
show logical-router interfaceshow logical-router interface <router_name>List all interfaces on a logical router

Edge Services Management #

Command/OptionExampleDescription
show edgeshow edgeList all NSX Edge instances
create edgecreate edge name <edge_name>Create a new NSX Edge instance
delete edgedelete edge name <edge_name>Delete an NSX Edge instance
show edge interfaceshow edge interface <edge_name>List all interfaces on an NSX Edge instance

Firewall Management #

Command/OptionExampleDescription
show firewall rulesshow firewall rulesList all firewall rules
create firewall rulecreate firewall rule name <rule_name>Create a new firewall rule
delete firewall ruledelete firewall rule name <rule_name>Delete a firewall rule
show firewall rule detailsshow firewall rule details <rule_name>Display details of a firewall rule

Load Balancer Management #

Command/OptionExampleDescription
show load-balancershow load-balancerList all load balancers
create load-balancercreate load-balancer name <lb_name>Create a new load balancer
delete load-balancerdelete load-balancer name <lb_name>Delete a load balancer
show load-balancer poolshow load-balancer pool <lb_name>List all pools in a load balancer
create load-balancer poolcreate load-balancer pool name <pool_name>Create a new pool in a load balancer
delete load-balancer pooldelete load-balancer pool name <pool_name>Delete a pool from a load balancer

VPN Management #

Command/OptionExampleDescription
show vpnshow vpnList all VPN configurations
create vpncreate vpn name <vpn_name>Create a new VPN configuration
delete vpndelete vpn name <vpn_name>Delete a VPN configuration
show vpn statusshow vpn status <vpn_name>Display the status of a VPN configuration

Miscellaneous #

Command/OptionExampleDescription
show running-configshow running-configDisplay the current running configuration
show startup-configshow startup-configDisplay the startup configuration
copy running-config startup-configcopy running-config startup-configSave the running configuration to startup configuration
reloadreloadReboot the NSX device
show clockshow clockDisplay the current system time
configure terminalconfigure terminalEnter 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.

VMware NSX CLI

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.