18.08.2013 Views

Command-line management in vsphere 5.0 for service console users

Command-line management in vsphere 5.0 for service console users

Command-line management in vsphere 5.0 for service console users

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Us<strong>in</strong>g the ESXi Shell<br />

<strong>Command</strong>-L<strong>in</strong>e Management <strong>in</strong> vSphere 5 <strong>for</strong> Service Console Users<br />

Each ESXi host <strong>in</strong>cludes an ESXi Shell, which is disabled by default. Adm<strong>in</strong>istrators can use that shell to<br />

per<strong>for</strong>m troubleshoot<strong>in</strong>g and advanced tasks such as test<strong>in</strong>g scripts <strong>in</strong> non production environments.<br />

You can access the shell as follows:<br />

Enable local access and use the local shell on the physical <strong>console</strong> or us<strong>in</strong>g a serial port. See “ESXi Shell<br />

Local Access” on page 5.<br />

Enable SSH access and use the shell over a <strong>management</strong> network with SSH. See “ESXi Shell Access” on<br />

page 5.<br />

IMPORTANT ESXi Shell is <strong>in</strong>tended <strong>for</strong> experienced CLI <strong>users</strong>. M<strong>in</strong>or errors <strong>in</strong> the shell can result <strong>in</strong> serious<br />

problems. Instead of runn<strong>in</strong>g commands directly <strong>in</strong> the ESXi Shell, use vCLI commands or PowerCLI cmdlets.<br />

The ESXi Shell <strong>in</strong>cludes the follow<strong>in</strong>g command sets.<br />

<strong>Command</strong> Set Description<br />

ESXCLI commands Extensible command framework <strong>for</strong> manag<strong>in</strong>g many aspects of vSphere.<br />

Run esxcli --help to see all top-level namespaces. You can run --help at any level of the<br />

hierarchy.<br />

The esxcli command set <strong>in</strong> the ESXi Shell and the esxcli vCLI command set support the same<br />

functionality. When runn<strong>in</strong>g vCLI commands, you must specify the target server and<br />

authentication options.<br />

esxcfg- commands<br />

(deprecated)<br />

ESXi Shell Access<br />

An ESXi system <strong>in</strong>cludes a direct <strong>console</strong> that allows you to start and stop the system and to per<strong>for</strong>m a limited<br />

set of ma<strong>in</strong>tenance and troubleshoot<strong>in</strong>g tasks. The direct <strong>console</strong> <strong>in</strong>cludes the ESXi Shell. The ESXi Shell<br />

<strong>in</strong>cludes a set of fully supported ESXCLI commands and a set of commands <strong>for</strong> troubleshoot<strong>in</strong>g and<br />

remediation. You must enable access to the ESXi Shell from the direct <strong>console</strong> of each system. You can enable<br />

access to the local ESXi Shell or access to the ESXi Shell with SSH.<br />

ESXi Shell Local Access<br />

Set of commands <strong>for</strong> manag<strong>in</strong>g many aspects of vSphere. Most esxcfg- commands available<br />

<strong>in</strong> the ESX 4.x <strong>service</strong> <strong>console</strong> are available <strong>in</strong> the ESXi Shell but are deprecated <strong>in</strong> ESXi <strong>5.0</strong> and<br />

will be removed <strong>in</strong> a future release.<br />

Use ESXCLI commands <strong>in</strong>stead of esxcfg- commands. If no ESXCLI command exists, use the<br />

vicfg- commands <strong>in</strong> the vCLI command set.<br />

Other commands A small set of POSIX-style commands is <strong>in</strong>cluded <strong>in</strong> the shell (see “Shell <strong>Command</strong>s” on<br />

page 10). These commands are not supported by VMware but are <strong>in</strong>cluded <strong>for</strong> use <strong>in</strong><br />

troubleshoot<strong>in</strong>g situations. Use the vSphere Client or VMware commands <strong>in</strong>stead where<br />

possible.<br />

localcli commands Set of troubleshoot<strong>in</strong>g commands <strong>for</strong> use with VMware Technical Support. localcli<br />

commands equivalent to ESXCLI commands but bypass the host daemon (hostd).<br />

Warn<strong>in</strong>g: localcli commands are only <strong>for</strong> situations when hostd is unavailable and cannot<br />

be restarted. After you run a localcli command, you must restart hostd. Us<strong>in</strong>g localcli<br />

commands <strong>in</strong> other situations is not supported. An <strong>in</strong>consistent system state and potential<br />

failure can result.<br />

NOTE For security reasons, you should enable ESXi Shell only when required.<br />

The ESXi Shell is disabled by default. You can enable the ESXi Shell <strong>for</strong> troubleshoot<strong>in</strong>g from the direct <strong>console</strong>.<br />

All ESXCLI commands that are available <strong>in</strong> the ESXi Shell are also <strong>in</strong>cluded <strong>in</strong> the vCLI package. Install the<br />

vCLI package or deploy the vMA virtual appliance, and run commands aga<strong>in</strong>st your ESXi hosts, <strong>in</strong>stead of<br />

runn<strong>in</strong>g commands <strong>in</strong> the ESXi Shell itself. See Gett<strong>in</strong>g Started with vSphere <strong>Command</strong>‐L<strong>in</strong>e Interfaces.<br />

VMware, Inc. 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!