ESXi 5.0 Command Cheat Sheet vSphere CLI vihostupdate.pl commands are no longer supported on ESXi 5.0 (vihostupdate <conn_options> --nosigcheck --install --bundle <offline-bundle>.zip) Esxupdate commands are no longer supported on ESXi 5.0 (esxupdate --bundle=<offline-bundle>.zip update) Qlogic Driver Installation/Removal Note: Putty SSH session logged into ESXi 5.0 host as root: # esxcli software vib install –v /tmp/net-qlge-1.0.0.471vmw.500.0.0.406165.x86_64.vib # esxcli software vib remove -n net-qlge --dry-run* Removal Result Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller] Reboot Required: true VIBs Installed: VIBs Removed: VMware_bootbank_net-qlge_1.0.0.47-1vmw.500.0.0.406165 *Do not use the –-dry-run if you intend to remove the driver. Driver Version Queries: # esxcli software vib get -n net-qlge VMware_bootbank_net-qlge_1.0.0.47-1vmw.500.0.0.406165 # esxcli software vib get –n scsi-qla2xxx VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512 # esxcli software vib get –n scsi-qla4xxx VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512 Firmware version Queries: # esxcli network nic get -n vmnic2 Driver: qlge Firmware Version: v1.35.11 Version: v1.00.00.47-051711 Software Queries: # esxcli software vib list | grep qla2xxx # esxcli software vib list | more # esxcli –-help Hardware Queries Note: Qlogic serial number is NOT listed in these commands # esxcli fcoe adapter list # esxcli fcoe nic list # esxcli hardware memory get # esxcli hardware pci list # esxcli hardware cpu list # esxcli hardware bootdevice list # esxcli hardware clock get # esxcli hardware platform get Network Queries # esxcli network ip connection list # esxcli network nic list # esxcli network nic get -n vmnic2 # esxcli network nic set –n vmnic2 # esxcli network vswitch standard list (or qla4xxx) # esxcli network vswitch standard portgroup list # esxcli network vswitch standard policy shaping get –v vSwitch0 # esxcli network vswitch standard policy security get -v vSwitch0 # esxcli network vswitch standard policy failover get -v vSwitch0 Network Commands Set MTU to 9000 for vSwitchx: # esxcli network vswitch standard set -m 9000 -v vSwitch0 Add a Standard vSwitch: # esxcli network vswitch standard add -v vSwitch1 Add an Uplink to a Standard vSwitch # esxcli network vswitch standard uplink add -u vmnic2 -v vSwitch1 Remove an Uplink from a Standard vSwitch # esxcli network vswitch standard uplink remove -u vmnic2 -v vSwitch1 Bring network NIC down/up # esxcli network nic down -n vmnic2 # esxcli network nic up -n vmnic2 Set NIC Speed and Duplex # esxcli network nic set -S 10000 -D full -n vmnic2 Set NIC speed and Duplex to Auto-negotiate # esxcli network nic set -a -n vmnic0 Storage Queries # esxcli storage core adapter list vmhba4 qla2xxx link-n/a fc.200000c0dd1077d9:210000c0dd1077d9 (0:2:0.2) QLogic Corp ISP81xxbased 10 GbE FCoE to PCI Express CAN vmhba5 qla2xxx link-n/a fc.200000c0dd1077db:210000c0dd1077db (0:2:0.3) QLogic Corp ISP81xxbased 10 GbE FCoE to PCI Express CNA # esxcli storage core adapter stats get -a vmhba4 # esxcli storage core device list # esxcli storage nmp device list # esxcli storage filesystem list # esxcli storage nfs list Storage Commands Rescan a specific adapter # esxcli storage core adapter rescan --adapter vmhba4 Rescan All adapters # esxcli storage core adapter rescan --all List all Scsi paths in the system # esxcli storage core path list Get scsi statistics for all scsi paths # esxcli storage core path stats get List SCSI device statistics # esxcli storage core device stats get System Queries # esxcli system version get Product: VMware ESXi Version: 5.0.0 Build: Releasebuild-469512 # esxcli system module list Name Is Loaded Is Enabled ------------------- --------- ---------- qla2xxx true true qlge true true # esxcli system hostname get # esxcli system settings advanced list |more System Commands Disable/Enable the Qlogic qlge driver # esxcli system module set -m qlge -e false # esxcli system module list Name Is Loaded Is Enabled ------------------- --------- ---------- qlge true false # esxcli system module set -m qlge -e true # esxcli system module list Name Is Loaded Is Enabled ------------------- --------- ---------- true true qlge Advanced Commands VM Queries List running virtual machines # esxcli vm process list General Help esxcli --help Usage: esxcli [options] {namespace}+ {cmd} [cmd options] Options: --formatter=FORMATTER Override the formatter to use for a given command. Available formatter: xml, csv, keyvalue --debug Enable debug or internal use options --version Display version information for the script -?, --help Display usage information for the script esxcli Commands that operate on the esxcli system itself allowing users to get additional information. fcoe hardware configuring hardware. iscsi VMware FCOE commands. VMKernel hardware properties and commands for VMware iSCSI commands. network Operations that pertain to the maintenance of networking on an ESX host. This includes a wide variety of commands to manipulate virtual networking components (vswitch, portgroup, etc) as well as local host IP, DNS and general host networking settings. software Manage the ESXi software image and packages storage VMware storage commands. system VMKernel system properties and commands for configuring properties of the kernel core system. vm A small number of operations that allow a user to Control Virtual Machine operations.