
Getting Started with vSphere Command-Line Interfaces
8 VMware, Inc.
Using the vSphere Command-Line Interface
ThevCLIcommandsetincludesvicfg-commandsandESXCLIcommands.TheESXCLIcommands
includedinthevCLIpackageareequivalenttotheESXCLIcommandsavailableontheESXiShell.Thevicfg-
commandsetissimilartothedeprecatedesxcfg-commandsetintheESXiShell.
YoucanrunvCLIcommandsfrom
aWindowsorLinuxsystem,orusevMA.
InstallthevCLIcommandsetontheWindowsorLinuxsystemfromwhichyouwanttoadministeryour
ESXisystemsandrunvCLIcommands.See“InstallingvCLI”onpage 13.
DeployavMAvirtualmachinetoanESXisystemandrunvCLIcommandsfromthere.
AfteryouhaveinstalledthevCLIpackageyoucanrunthecommandsinthesetagainstESXihosts.Youmust
specifyconnectionparameterswhenyourunavCLIcommand.See“UsingthevSphereCommand‐Line
Interface”
onpage 23.
Using ESXCLI
YoucanmanagemanyaspectsofanESXihostwiththeESXCLIcommandset.YoucanrunESXCLIcommands
asvCLIcommandsorrunthemintheESXiShellintroubleshootingsituations.
YoucanalsorunESXCLIcommandsfromthePowerCLIshellbyusingtheGet-EsxClicmdlet.SeethevSphere
PowerCLI
AdministrationGuideandthevSpherePowerCLIReference.
ThesetofESXCLIcommandsavailableonahostdependsonthehostconfiguration.ThevSphere
Command‐LineInterfaceReferencelistshelpinformationforallESXCLIcommands.Runesxcli --server
<MyESXi> --helpbeforeyourunacommandonahosttoverifythatthecommand
isdefinedonthehostyou
aretargeting.
ESXCLI Syntax
EachESXCLI5commandusesthesamesyntax.
esxcli [dispatcher options] <namespace> [<namespace> ...] <cmd> [cmd options]
dispatcheroptions.Predefinedoptionsforconnectioninformationsuchastargethost,username,andso
on.See“CommonOptionsforvCLIExecution”onpage 27.Notrequiredwhenyourunthecommandin
theESXiShell.
namespace.GroupsESXCLIcommands.vSphere5.0supportsnestednamespaces.
VMwarePowerCLI
cmdlets
VMwarevSpherePowerCLIprovidesaWindowsPowerShell
interfacetothevSphereAPI.vSpherePowerCLIincludes
PowerShellcmdletsforadministeringvSpherecomponents.
vSpherePowerCLIincludesmorethan200cmdlets,asetof
samplescripts,andafunctionlibraryformanagementand
automation.ThevSphereImageBuilderPowerCLIandthe
vSphereAutoDeployPowerCLIareincludedwhenyouinstall
thevSpherePowerCLI.
VMwarePowerCLI
documentationset.
localclicommands SetofcommandsforusewithVMwareTechnicalSupport.
localclicommandsareequivalentto
ESXCLIcommands,but
bypasshostd.Thelocalclicommandsareonlyforsituations
whenhostdisunavailableandcannotberestarted.Afteryourun
alocalclicommand,youmustrestarthostd.Run
ESXCLI
commandsaftertherestart.
Ifyouusealocalclicommandinothersituations,an
inconsistentsystemstateandpotentialfailurecanresult.
Command set Description See
IMPORTANTESXiShellisintendedforexperiencedusersonly.Minorerrorsintheshellcanresultin
seriousproblems.InsteadofrunningcommandsdirectlyintheESXiShell,usevCLIorPowerCLI.
Commentaires sur ces manuels