6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
18 VMware, Inc.
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.
Using ESXCLI Output
ManyESXCLIcommandsgenerateoutputyoumightwanttouseinyourapplication.Youcanrunesxcli
withthe--formatterdispatcheroptionandsendtheresultingoutputasinputtoaparser.
The--formatteroptionssupportsthreevalues,csv,xml,andkeyvalueandisusedbeforeanynamespace.
esxcli --formatter=csv storage filesystem list
ListsallfilesysteminformationinCSVformat.
Youcanpipetheoutputtoafile.
esxcli --formatter=keyvalue storage filesystem list > myfilesystemlist.txt
Connection Options for vCLI Host Management Commands
YoucanrunhostmanagementcommandssuchasESXCLIcommands,vicfg‐commands,andother
commandswithseveraldifferentconnectionoptions.YoucantargethostsdirectlyortargetavCenterServer
systemandspecifythehostyouwanttomanage.IfyouaretargetingavCenterServersystem,specifythe
PlatformServices
Controller,whichincludesthevCenterSingleSignOnservice,forbestsecurity.
SeetheGettingStartedwithvSphereCommandLineInterfacesdocumentationforacompletelistandexamples.
Connection Options for DCLI Commands
DCLIisaCLIclienttothevCloudSuiteSDKinterfaceformanagingVMwareSDDCservices.ADCLI
commandtalkstoavCloudSuiteSDKendpointtogetthevCloudSuiteSDKcommandinformation,executes
thecommand,anddisplaysresulttotheuser.
YoucanrunDCLIcommandslocallyorfrom
anadministrationserver.
RunDCLIontheLinuxshellofavCenterServerVirtualAppliance.
InstallvCLIonasupportedWindowsorLinuxsystemandtargetavCenterServerwindowsinstallation
oravCenterServerVirtualAppliance.Youhavetoprovideendpointinformationtosuccessfullyrun
commands.
DCLIcommandssupportotherconnectionoptionsthanothercommandsinthecommandset.
SeetheGettingStartedwithvSphere
CommandLineInterfacesdocumentationforacompletelistandexamples.
IMPORTANTAlwaysuseaformatterforconsistentoutput.
IMPORTANTForconnectionstoESXi6.0hosts,vCLIsupportsboththeIPv4protocolandtheIPv6protocol.
Forearlierversions,vCLIsupportsonlyIPv4.Inallcases,youcanconfigureIPv6onthetargethostwith
severalofthenetworkingcommands.