6.5
Table Of Contents
- Getting Started with vSphere Command-Line Interfaces
- Contents
- About This Book
- Managing vSphere with Command-Line Interfaces
- Installing vCLI
- Running Host Management Commands in the ESXi Shell
- Running vCLI Host Management Commands
- Overview of Running vCLI Host Management Commands
- Protecting Passwords
- Authenticating Through vCenter Server and vCenter Single Sign-On
- Authenticating Directly to the Host
- Trust Relationship Requirement for ESXCLI Commands
- Common Options for vCLI Host Management Command Execution
- Using vCLI Commands in Scripts
- Run Host Management Commands from a Windows System
- Run Host Management Commands from a Linux System
- Running DCLI Commands
- Index
n
Target a vCenter Server system and authenticate to vCenter Single Sign-On. You can save the
corresponding session and use it for subsequent connections. See “Authenticating Through vCenter
Server and vCenter Single Sign-On,” on page 34.
n
Use variables or conguration les.
n
If you are running vCLI on a Windows system, you can use the --passthroughauth option. If the user
who runs the command with that option is a known Active Directory user, no password is required.
If you are running vMA, you can set up target servers and run most vCLI commands against target servers
without additional authentication. See the vSphere Management Assistant Guide.
With vCLI you can run scripts against multiple target servers from the same administration server. You
must have the correct privileges to perform the actions on each target, and you must authenticate to the
target.
I Administrators can place ESXi hosts in lockdown mode for enhanced security. By default, even
the root user cannot run vCLI commands directly against ESXi hosts in lockdown mode. See “vCLI and
Lockdown Mode,” on page 38 and the vSphere Security documentation.
Order of Precedence for vCLI Host Management Commands
When you run a vCLI host management command, authentication happens in order of precedence.
The order of precedence is described in the following table. This order of precedence always applies. That
means, for example, that you cannot override an environment variable seing in a conguration le.
N Available options and order of precedence are dierent for DCLI. See “Order of Precedence for DCLI
Authentication,” on page 49.
If you are authenticating through vCenter Single Sign-On, the order of precedence is preserved. For
example, information you specify on the command line overrides information in an environment variable.
Authentication Description See
Command line
Password (--password), session le
(--sessionfile), or conguration
le (--config) specied on the
command line.
“Create and Use a Session File,” on
page 34
Environment variable Password specied in an
environment variable.
“Using Environment Variables,” on
page 35
Conguration le Password specied in a conguration
le.
“Using a Conguration File,” on
page 36
Current account (Active Directory) Current account information used to
establish an SSPI connection.
Available only on Windows.
“Using the Microsoft Windows
Security Support Provider Interface,”
on page 37
Credential store Password retrieved from the
credential store.
vSphere Web Services SDK Programming
Guide and vSphere SDK for Perl
Programming Guide
Prompt the user for a password Password is not echoed to screen.
Chapter 4 Running vCLI Host Management Commands
VMware, Inc. 33