6.0
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
- Running Host Management Commands from a Windows System
- Running Host Management Commands from a Linux System
- Running DCLI Commands
- Index
VMware, Inc. 35
Chapter 4 Running vCLI Host Management Commands
--passthroughauth
VI_PASSTHROUGHAUTH
Ifyouspecifythisoption,thesystemusestheMicrosoftWindowsSecurity
SupportProviderInterface(SSPI)forauthentication.Trustedusersarenot
promptedforausernameandpassword.SeetheMicrosoftWebsitefora
detaileddiscussionofSSPI.
Thisoptionissupportedonlyifyouareconnectingto
avCenterServersystem.
--passthroughauthpackage
<package>
VI_PASSTHROUGHAUTHPACKAGE=
<package>
Usethisoptionwith--passthroughauthtospecifyadomain‐level
authenticationprotocoltobeusedbyWindows.Bydefault,SSPIusesthe
Negotiateprotocol,whichmeansthatclientandservertrytonegotiatea
protocolthatbothsupport.
IfthevCenterServersystemtowhich
youareconnectingisconfiguredtouse
aspecificprotocol,youcanspecifythatprotocolusingthisoption.
ThisoptionissupportedonlyifyouarerunningvCLIonaWindowssystem
andconnectingtoavCenterServersystem.
--password <passwd>
VI_PASSWORD=<passwd>
Usesthespecifiedpassword(usedwith--username)tologin
totheserver.
If--serverspecifiesavCenterServersystem,theusernameandpassword
applytothatserver.IfyoucanlogintothevCenterServersystem,you
neednoadditionalauthenticationtoruncommandsontheESXihoststhat
servermanages.
If--serverspecifiesanESXihost,theusernameandpasswordapplyto
thatserver.
Usetheemptystring(' 'onLinuxand“ “onWindows)toindicateno
password.
Ifyoudonotspecifyausernameandpasswordonthecommandline,the
systempromptsyouanddoes
notechoyourinputtothescreen.
--portnumber <number>
VI_PORTNUMBER=<number>
Usesthespecifiedporttoconnecttothesystemspecifiedby--server.Default
is443.
--protocol <HTTP|HTTPS>
VI_PROTOCOL=<HTTP|HTTPS>
Usesthespecifiedprotocoltoconnecttothesystemspecifiedby--server.
DefaultisHTTPS.
--psc <hostname_or_IP>
VI_PSC=<hostname_or_IP>
HostnameorIPaddressofthePlatformServicesController
instancethatis
associatedwiththevCenterServersystemthatmanagesthehost.Inmany
cases,thePlatformServicesControllerisembeddedinthevCenterServer
system,butexternalPlatformServicesControllerinstancesaresupportedas
well.Forthosecases,usethe--serveroptiontospecifythevCenterServer
systemthat
managesthehost.
Thisoptionimpliesus erauthenticationwithvCenterSingleSign‐On.Theuser
youspecifymustbeabletoauthenticatetovCenterSingleSign‐On.
--savesessionfile <file>
VI_SAVESESSIONFILE=<file>
Savesasessiontothespecifiedfile.Thesessionexpiresifithasbeenunused
for30minutes.
--server <server>
VI_SERVER=<server>
Usesthespecified
ESXiorvCenterServersystem.Defaultislocalhost.
If--serverpointstoavCen terServersystem,youcanalsospecifythe--psc
optiontologintothevCenterServersystemwithvCenterSingleSign‐On.
Usethe--vihostoptiontospecifytheESXihostthatyouwanttorun
the
commandagainst.See“AuthenticatingThroughvCenterServerandvCenter
SingleSign‐On”onpage 29.
--servicepath <path>
VI_SERVICEPATH=<path>
UsesthespecifiedservicepathtoconnecttotheESXihost.Defaultis
/sdk/webService.
--sessionfile <file>
VI_SESSIONFILE=<file>
Usesthespecifiedsessionfiletoloadapreviouslysavedsession.Thesession
mustbeunexpired.
--thumbprint <thumbprint>
VI_THUMBPRINT=<thumbprint>
ExpectedSHA‐1host
certificatethumbprintifnoCAcertificatesfileis
providedinthe--cacertsfile argument.Thethumbprintisreturnedbythe
serverintheerrormessageifyouattempttorunacommandwithout
specifyingathumbprintorcertificatefile.
--url <url>
VI_URL=<url>
ConnectstothespecifiedvSphereWebServicesSDKURL.
Table 4-2. vCLI Connection Options (Continued)
Option and Environment Variable Description