VMWARE CLI Commands
VMWARE CLI Commands
Need to Know
ESXi Shell and ESXCLI
If it is not already, the first thing you need to do is enable shell on ESXi, something
that is generally disabled for security reasons. To enable Shell, follow the steps
provided in KB 2004746. Once you enable it, you can use a tool like putty to
access Shell via an SSH session. Alternatively, pressing ALT-F1 while in DCUIis one
other way of accessing Shell. To run commands in shell, log in as root or with an
account having similar privileges.
The esxcli command exposes a number of namespaces against which you can run
queries to retrieve information about ESXi as well as configure it. The following
table lists the available namespaces on ESXi 6.5 along with a description for
each (source: VMware). For earlier ESXi releases, consult the relevant online
documentation or run esxcli with no parameters to see which namespaces are
available.
Command Description
esxcli
Lists descriptions of device commands.
device
esxcli elxnet Lists descriptions for commands that manage Emulex elxnet drivers.
esxcli esxcli Lists descriptions of esxcli commands.
esxcli fcoe FCOE (Fibre Channel over Ethernet) commands
esxcli
Graphics commands
graphics
esxcli
Hardware namespace. Used primarily for extracting information about the current system setup.
hardware
esxcli iscsi iSCSI namespace for monitoring and managing hardware and software iSCSI.
esxcli Network namespace for managing virtual networking including virtual switches and VMkernel network
network interfaces.
esxcli nvme Commands for managing NVMe devices.
esxcli rdma Commands for monitoring RDMA devices.
esxcli sched Manage the shared system-wide swap space.
esxcli
Software namespace. Includes commands for managing and installing image profiles and VIBs.
software
esxcli
Includes core storage commands and other storage management commands.
storage
esxcli
System monitoring and management command.
system
esxcli vm Namespace for listing virtual machines and shutting them down forcefully.
esxcli vsan Namespace for Virtual SAN management commands. See the vSphere Storage publication for details.
#18: esxcli iscsi software set –enabled true && esxcli iscsi software get
Description: The above command actually consists of two concatenated
commands, which is what && does. The first command enables the iSCSI software
adapter and the second verifies that the iSCSI adapter is enabled.