6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
28 VMware, Inc.
AccessthevMALinuxconsole.SetuptargetserversandrunvCLIcommandsagainstthetargetswithout
additionalauthentication.
PreparescriptsthatcontainvCLIcommands.ThenrunthescriptsfromasystemthathasthevCLI
packageinstalledorfromthevMALinuxconsole.See“UsingvCLICommandsinScripts”onpage 36.
WhenyouruncommandsagainstanESXihost,youmustbeauthenticatedforthathost.
Target a Host That is Managed by a vCenter Server System
WhenyoutargetahostthatismanagedbyavCenterServersystem,youcanruncommandsindifferentways.
SpecifythevCenterSingleSignOnservicewith--pscand,ifmultiplevCenterServersystemsare
associatedwiththevCenterSingleSignOnservice,thevCenterServersystemwith--server.Specify
alsothehostwith--vihost.
SpecifythevCenterServersystemwith--serverandtheESXihostwith--vihost.
SpecifyonlytheESXihostwith--vihost.
WhenyoucanauthenticatetoavCenterSingleSignOnserviceortoavCenterServersystem,youcantarget
allESXihoststhatvCenterServermanageswithoutadditionalauthentication.SeeAuthenticatingThrough
vCenterServerandvCenterSingleSignOn”onpage 29.
Protecting Passwords
Followoneofthefollowingapproachesforprotectingpasswords.
IfyouuseavCLIhostmanagementcommandinteractivelyanddonotspecifyausernameandpassword,
youarepromptedforthem.Thescreendoesnotechothepasswordyoutype.
Fornoninteractiveuse,youcancreateasessionfileusingthesave_sessionoption.See“UsingaSession
File”onpage 30.
TargetavCenterServersystemandauthenticatetovCenterSingleSignOn.Youcansavethe
correspondingsessionanduseitforsubsequentconnections.SeeAuthenticatingThroughvCenter
ServerandvCenterSingleSignOn”onpage 29.
Usevariablesorconfigurationfiles.
IfyouarerunningonaWindowssystem,youcanusethe--passthroughauthoption.Iftheuserwho
runsthecommandwiththatoptionisaknownActiveDirectoryuser,nopasswordisrequired.
IfyouarerunningvMA,youcansetuptargetserversandrunmostvCLIcommandsagainst
targetservers
withoutadditionalauthentication.SeethevSphereManagementAssistantGuide.
vCLIallowsyoutorunscriptsagainstmultipletargetserversfromthesameadministrationserver.Youmust
havethecorrectprivilegestoperformtheactionsoneachtarget,andyoumustauthenticatetothetarget.
N
OTEDifferentcommandsetsinthevCLIpackagerequiredifferentconnectionoptions.
CAUTIONIfyouspecifypasswordsinplaintext,youriskexposingthepasswordtootherusers.Thepassword
mightalsobecomeexposedinbackupfiles.Donotprovideplaintextpasswordsonproductionsystems.
IMPORTANTAdministratorscanplaceESXihostsinlockdownmodeforenhancedsecurity.Bydefault,not
eventherootusercanrunvCLIcommandsdirectlyagainstESXihostsinlockdownmode.See“vCLIand
LockdownMode”onpage 32andthevSphereSecuritydocumentation.