6.0

VMware, Inc. 4
Command-Line Management in vSphere 5 and vSphere 6 for Service Console Users
ThefollowingdocumentationhelpsyouworkwithvCLIcommands.
GettingStartedwithvSphereCommandLineInterfacesgiv esoverviewsofavailablecommandsandincludes
instructionsforinstallingvCLIonWidowsorLinuxanddetailedinformationaboutconnectionoptions.
vSphereCommandLineInterfaceConceptsandExamplespresentsusageexamplesformanycommands,such
assettingupsoftwareandhardwareiSCSI,addingvirtualswitches,settingupActiveDirectory
authentication,andsoon.Thedocumentincludesthesameexamplewiththevicfg-commandandthe
ESXCLIcommandwheresupported.
vSphereCommandLineInterfaceReferenceisareferencetobothvicfg-commandsandESXCLIcommands.
Thevicfg-commandhelpisgeneratedfromthePODavailableforeachcommand,runpod2htmlfor
anyvicfg-commandtogenerateindividualHTMLfilesinteractively.TheESXCLIreferenceinformation
isgeneratedfromtheESXCLIhelp.
Running ESXCLI Commands Against ESXi 4.x Hosts
WhenyourunanESXCLIvCLIcommand,youmustknowthecommandssupportedonthetargethost
specifiedwith--serverorasavMAtarget.
IfyouruncommandsagainstESXi4.xhosts,ESXCLI4.xcommandsaresupported.
IfyouruncommandsagainstESXi5.0hosts,ESXCLI5.0commandsandmostESXCLI5.1commandsare
supported.CommandsthatarenewinESXCLI5.1arenotsupported.
IfyouruncommandsagainstESX5.1hosts,ESXCLI5.0commandsandallESXCLI5.1commandsare
supported.
VMwarepartnersmightdevelopcustomESXCLIcommandsthatyoucanrunonhostswherethepartnerVIB
hasbeeninstalled.
Runesxcli --server <target> --helpforalistofnamespacessupportedonthetarget.Youcan
drill
downintothenamespacesforadditionalhelp.
PowerCLI Cmdlet Set
VMwareoffersacomprehensivesetofPowerCLIcmdlets.YoucaninstallthePowerCLIpackageona
WindowssystemonwhichMicrosoftPowerShellisinstalledandusePowerCLIcmdletstomanagehostsand
virtualmachines.PowerCLIcmdletsandvCLIcommandsoverlapinfunctionality.ThePowerCLIfocusison
virtualmachinemanagement.The
vCLIfocusisonhostmanagement.
SeethevSpherePowerCLIdocumentationset,availableintheVMwareAdministrationAutomationProducts
sectionofhttp://www.vmware.com/support/pubs.
Command Set Description
ESXCLIvCLI
commands
ExtensiblecommandframeworkformanagingmanyaspectsofvSphere.
Runesxcli --helptoseealltop-levelnamespaces.Youcanrun--helpatanylevelofthe
hierarchy.
TheesxclicommandsetintheESXiShellandtheesxclivCLIcommandsetsupportthesame
functionality.WhenrunningvCLIcommands,
youmustspecifythetargetserverand
authenticationoptions.
vicfg- (esxcfg-)
vCLIcommands
Setofcommandsformanagingmanyaspectsof vSphere.Foreachvicfg-vCLIcommand,the
packageincludesanesxcfg-vCLIcommandthatisequivalentofthevicfg-vCLIcommand.
Important:esxcfg-vCLIcommandsarenotalwaysequivalenttocorresponding
esxcfg-
serviceconsoleorESXiShellcommands.
vicfg-commandswillbedeprecatedinfuturereleases.Useesxclicommandsinsteadwhere
possible.
Management
commands
Asmallsetofmanagementcommandsisavailable.Commandsincludevifsforfilemigration,
vmware-cmdformanagingvirtualmachines,andvmkfstoolsforVMFSfilemanagement.
IMPORTANTESXCLIonESX4.xhostsdoesnotsupporttargetingavCenterServersystem.Youcantherefore
notruncommandswith--serverpointingtoavCenterServersystemevenifyouinstallvCLI5.0orvCLI5.1.