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
Option and Environment Variable Description
--password <passwd>
VI_PASSWORD=<passwd>
Uses the specied password (used with --username) to log in to the server.
n
If --server species a vCenter Server system, the user name and
password apply to that server. If you can log in to the vCenter Server
system, you need no additional authentication to run commands on the
ESXi hosts that server manages.
n
If --server species an ESXi host, the user name and password apply to
that server.
Use the empty string (' ' on Linux and " " on Windows) to indicate no
password.
If you do not specify a user name and password on the command line, the
system prompts you and does not echo your input to the screen.
--portnumber <number>
VI_PORTNUMBER=<number>
Uses the specied port to connect to the system specied by --server. Default
is 443.
--protocol <HTTP|HTTPS>
VI_PROTOCOL=<HTTP|HTTPS>
Uses the specied protocol to connect to the system specied by --server.
Default is HTTPS.
--psc <hostname_or_IP>
VI_PSC=<hostname_or_IP>
Host name or IP address of the Platform Services Controller instance that is
associated with the vCenter Server system that manages the host. In many
cases, the Platform Services Controller is embedded in the vCenter Server
system, but external Platform Services Controller instances are supported as
well. For those cases, use the --server option to specify the vCenter Server
system that manages the host.
This option implies user authentication with vCenter Single Sign-On. The user
you specify must be able to authenticate to vCenter Single Sign-On.
--savesessionfile <file>
VI_SAVESESSIONFILE=<file>
Saves a session to the specied le. The session expires if it is idle for 30
minutes.
--server <server>
VI_SERVER=<server>
Uses the specied ESXi or vCenter Server system. Default is localhost.
If - -server points to a vCenter Server system, you can also specify the --psc
option to log in to the vCenter Server system with vCenter Single Sign-On.
Use the --vihost option to specify the ESXi host that you want to run the
command against. See “Authenticating Through vCenter Server and vCenter
Single Sign-On,” on page 34.
--servicepath <path>
VI_SERVICEPATH=<path>
Uses the specied service path to connect to the ESXi host. Default
is /sdk/webService.
--sessionfile <file>
VI_SESSIONFILE=<file>
Uses the specied session le to load a previously saved session. The session
must be unexpired.
--thumbprint <thumbprint>
VI_THUMBPRINT=<thumbprint>
Expected SHA-1 host certicate thumbprint if no CA certicates le is
provided in the --cacertsfile argument. The thumbprint is returned by the
server in the error message if you aempt to run a command without
specifying a thumbprint or certicate le.
--url <url>
VI_URL=<url>
Connects to the specied vSphere Web Services SDK URL.
Chapter 4 Running vCLI Host Management Commands
VMware, Inc. 41