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
Getting Started with vSphere Command-Line Interfaces
12 VMware, Inc.
2Iftheuserisnotyetauthenticated,DCLIpromptsforapassword.
3Theuserspecifiesapassword.
4ThecommandconnectstothevCenterSingleSign‐Onserviceandcheckswhethertheuserspecifiedon
thecommand‐lineorinacertificatestorefilecanauthenticate.
5Iftheusercanauthenticate,DCLI
communicateswiththevCenterServerandexecutethevCloudSuite
SDKcommandthatcorrespondstotheDCLIcommand.DifferentvCenterServersystemssupport
differentservices.
6DCLIdisplaystheresultoranerrortotheuser.
YoucanrunDCLIcommandsasfollows.
vCLIpackage.InstallthevCLIpackageontheserverofyourchoice,ordeployavMAvirtualmachine.
YoucanthenrunDCLIcommandsagainstanendpoint.See“RunningDCLICommands”onpage 41.
vCenterServerappliance.RunDCLIcommandsfromthevCenterServerApplianceshell.See“Running
DCLICommandsonthevCenterServerAppliance”onpage 42.
vCenterServerWindowscommandprompt.InstallvCenterServeronasupportedWindowssystemand
runDCLIcommandsfromthecommandprompt.
DCLI Syntax
EachDCLIcommandusesthesamesyntax.
Thecommandnamecanbefollowedbyconnectionandformattingoptions,eachprecededbya+sign.You
alsospecifythenamespace,thecommand,andthecommandoptions.Namespacesarenested.
dcli +[DCLI options] <namespace> [<namespace> ...] <cmd> --[cmd option] [option value]
DCLIoptions.PredefinedoptionsforconnectioninformationincludingthevCloudSuiteSDKendpoint
andformattingoptions.Alwaysprecededbya+sign.
NotrequiredwhenyourunthecommandinthevCenterServerApplianceshellorfromthecommand
promptofavCenterServerWindowsinstallation.
namespace.GroupsDCLIcommands.NamespacescorrespondtothevCloudSuiteSDKnamespacesand
arenested.
command.Reportsonormodifiesstateonthesystem.
optionandvalue.Commandoptionandvaluepairs.
Example
$dcli +server <vcenter-IP> com vmware cis tagging tag list
vCLI Package Contents
vCLIisnotacommandsetbutapackageofseveralcommandsets.YouusuallyinstallvCLIonan
administrationserverandrunscriptsfromthereagainstotherhostsor,forDCLI,againstvCenterServer
systems.SomevCLIcommandscanalsoberunlocallyontheESXihostorthevCenter
Serversystem.
WhenyouinstallthevCLIpackage,thefollowingcommandsetsbecomeavailable.
DCLICommands.TheDCLIcommandsarenewinvSphere6.0,andareavailableformanagingvCenter
servicesthatarenewinvSphere6.0.ThesecommandsareavailableaspartofvCLI,fromthevCenter
ServerVirtualAppliance,andfromthecommand‐promptofavCenterServerWindowsinstallation.
HostManagementCommands.Includesthefollowingcommandsets.
NOTETheorderinwhichDCLIoptionsareprovidedonthecommandlineisnotimportant.However,you
mustspecifyDCLIoptionswithaplus(+)andcommand‐specificoptionswithaminus(‐).