6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
34 VMware, Inc.
Using the Credential Store
YourvCLIinstallationincludesacredentialstore.Youcanmanagethecredentialstorewiththe
credstore-adminutilityapplication,whichislocatedinthe/Perl/apps/generaldirectoryinsidethe
VMwarevSphereCLIdirectory.
To establish trust for a user with the credential store
1AddtheuserandpasswordforthetargetESXihosttothelocalcredentialstore.
credstore_admin.pl add --server <esxi_HOSTNAME_OR_IP> --username <user> --password <pwd>
2AddthethumbprintforthetargetESXihost.Thisthumbprintwasreturnedintheerrorwhenyou
attemptedtoconnecttothehost.
credstore_admin.pl add --server <esxi_HOSTNAME_OR_IP> --thumbprint <thumbprint>
3Ifyouareusinganondefaultcredentialstorefile,youhavetopassitinwiththe--credstoreoption.
Otherwise,thisuserwillbeabletoaccessthehostwithoutauthenticationgoingforward.
Common Options for vCLI Host Management Command Execution
Table 42listsoptionsthatareavailableforallvCLIhostmanagementcommandsinalphabeticalorder.The
tableincludesoptionsforuseonthecommandlineandvariablesforuseinconfigurationfiles.Optionsfor
executingDCLIcommandsaredifferent.
See“RunningHostManagementCommandsfromaWindowsSystem”onpage 37
and“RunningHost
ManagementCommandsfromaLinuxSystem”onpage 37.
IMPORTANTUpdatingthecredentialstoreisatwostepprocess.Firstyouaddtheuserandpasswordforthe
server,andthenyouaddthethumbprintfortheserver.
IMPORTANTStartingwithvSphere5.5,vCLIsupportsbothIPv4andIPv6connections.
Table 4-2. vCLI Connection Options
Option and Environment Variable Description
--cacertsfile <certsfile>
-t <certs_file>
VI_CACERTFILE=<cert_file_path>
ESXCLIcommandsonly.
UsedtospecifytheCA(CertificateAuthority)certificatefile,inPEMformat,
toverifytheidentityofthevCenterServersystemorESXisystemtorunthe
commandon.
InvCLI6.0andlater,youcanonlyrunESXCLIcommandsifatrust
relationshipexistsbetween
thehostyouarerunningthecommandonandthe
systemyouaretargetingwiththe--serveroption(ESXihostorvCenter
Serversystem).YoucanestablishthetrustrelationshipbyspecifyingtheCA
certificatefileorbypassinginthethumbprintforeachtargetserver(ESXihost
orvCenterServer
system).
--config <cfg_file_full_path>
VI_CONFIG=<cfg_file_full_path>
Usestheconfigurationfileatthespecified location.
Specifyapaththatisreadablefromthecurrentdirectory.
--credstore <credstore>
VI_CREDSTORE=<credstore>
Nameofacredentialstorefile.Defaultsto
<HOME>/.vmware/credstore/vicredentials.xmlonLinuxand
<APPDATA>/VMware/credstore/vicredentials.xmlonWindows.
CommandsforsettingupthecredentialstoreareincludedinthevSphereSDK
for
Perl,whichisinstalledwithvCLI.ThevSphereSDKforPerlProgramming
Guideexplainshowtomanagethecredentialstore.
--encoding <encoding>
VI_ENCODING=<encoding>
Specifiestheencodingtobeused.Severalencodingsaresupported.
utf8
cp936(SimplifiedChinese)
shftjis(Japanese)
iso-885901(German).
Youcanuse--encodingtospecifytheencodingvCLIshouldmaptowhenit
isrunonaforeignlanguagesystem.