An ESXi system includes a direct console that allows you to start and stop the system and to perform a limited set of maintenance and troubleshooting tasks. The direct console includes the ESXi Shell. The ESXi Shell includes a set of fully supported ESXCLI commands and a set of commands for troubleshooting and remediation. You must enable access to the ESXi Shell from the direct console of each system. You can enable access to the local ESXi Shell or access to the ESXi Shell with SSH.
The ESXi Shell is disabled by default. You can enable the ESXi Shell for troubleshooting from the direct console. All ESXCLI commands that are available in the ESXi Shell are also included in the vCLI package. Install the vCLI package or deploy the vMA virtual appliance, and run commands against your ESXi hosts, instead of running commands in the ESXi Shell itself. See Getting Started with vSphere Command-Line Interfaces.
You can enable the ESXi Shell from the direct console and from the vSphere Client. Enabling the ESXi Shell means making it accessible as a local console available directly or over an out-of-band network.
You can enable the ESXi Shell from the vSphere Client.
After you have enabled the ESXi Shell, you can use it from that monitor or through an out-of-band network connection.
After you enable ESXi Shell access, you can access the local shell.
exitin the shell.
The ESXi Shell timeout setting specifies how long you can leave an unused session open. By default, the timeout for the ESXi Shell is 0, which means the session remains open even if it is unused. If you change the timeout, for example, to 30 minutes, you have to log in again after the timeout period has elapsed. The unit of measurement for the timeout is seconds in the ESXi Shell and minutes in the vSphere Client.
Note: If you are logged in when the timeout period elapses, your session will persist. However, the ESXi Shell will be disabled, preventing other users from logging in.
You can modify the timeout from the Direct Console (in seconds) or from the vSphere Client (in minutes).
If Secure Shell is enabled for the ESXi Shell, you can run shell commands by using a Secure Shell client such as SSH or PuTTY.
By default, you cannot access the ESXi Shell using a Secure Shell client. You can enable SSH access from the direct console.
You can enable remote command execution from the vSphere Client.
After you have enabled SSH, you can use an SSH client to log in to the ESXi Shell and run ESXi Shell commands.
If SSH is enabled on your ESXi host, you can use an SSH client to run commands on that shell.
The ESXi Shell includes several sets of commands.
|ESXCLI commands||A large set of new ESXCLI commands supports many administrative tasks. The commands are fully supported and tested by VMware and include command-line help. See Getting Started with vSphere Command-Line Interfaces.|
|POSIX-like commands||See Shell Commands.|
|Set of troubleshooting commands for use with VMware Technical Support.
The ESXi Shell in ESXi 5.0 includes a large set of new ESXCLI namespaces and commands. The complete ESXCLI command set is also part of the vCLI package. The ESXCLI command syntax in ESXi 5.0 is more flexible than the syntax in ESXi 4.x and supports multiple namespaces.
esxcli [dispatch_option] <namespace> [namespace, ...] <cmd> [cmd_options]
Each command can use an arbitrary number of namespaces, and different commands have a different number of elements. All commands have also been reviewed for consistency and most commands have been renamed. For example:
esxcli hardware memory get
esxcli hardware cpu list
Many commands have options. Use an equal sign or a space between the option and the option value.
esxcli filesystem nfs add –host=<host_name> –share=<share_name> –volume=<volume_name>
esxcli filesystem nfs add –host <host_name> –share <share_name> –volume <volume_name>
Important For a complete list of ESXCLI commands, see the vSphere Command-Line Interface Reference. The vSphere Command-Line Interface Concepts and Examples document illustrates how to perform common tasks with ESXCLI or
In contrast to VMware ESX, VMware ESXi does not include a console OS with a large set of shell commands and other software. However, a small set of shell commands is available in the ESXi Shell.
Important The commands are not tested or supported by VMware. Use VMware commands such as ESXCLI,
vicfg- commands, and so on, instead.
You can see a list of commands in
/usr/bin. When you list the commands with
ls -al, notice that several of the utilities are redirected to commands appropriate in the vSphere environment. The following commands produce different results than typical shell commands.
* Several commands are redirected to vmkvsitools.
vmkvsitools is intended for use with VMware Technical Support. Do not use vmkvsitools to manage your system.
* Ping commands are redirected to ''vmkping''. * Some additional commands are available in the ESXi Shell for certain troubleshooting tasks. Use these commands when instructed by a VMware Knowledge Base article or VMware Technical Support staff. * User management commands are deprecated.
/usr/bin and run
ls -al to see a complete list.