6.0

VMware, Inc. 9
Command-Line Management in vSphere 5 and vSphere 6 for Service Console Users
ESXCLI Commands
TheESXiShellinESXi5includesalargesetofnewESXCLInamespacesandcommands.ThecompleteESXCLI
commandsetisalsopartofthevCLIpackage.TheESXCLIcommandsyntaxinESXi5ismoreflexiblethan
thesyntaxinESXi4andsupportsmultiplenamespaces.
esxcli [dispatch_option] <namespace> [namespace, ...] <cmd> [cmd_options]
Eachcommandcanuseanarbitrarynumberofnamespaces,anddifferentcommandshaveadifferentnumber
ofelements.Allcommandshavealsobeenreviewedforconsistencyandmostcommandshavebeenrenamed.
Forexample:
Eachgetcommandreturnssinglevalues.
esxcli hardware memory get
Thelistcommandsareusedformultiplereturnvalues.
esxcli hardware cpu list
Manycommandshaveoptions.Useanequalsignoraspacebetweentheoptionandtheoptionvalue.
esxcli storage nfs add --host=<host_name> --share=<share_name> --volume=<volume_name>
esxcli storage nfs add --host <host_name> --share <share_name> --volume <volume_name>
Shell Commands
IncontrasttoVMwareESX,VMwareESXidoesnotincludeaconsoleOSwithalargesetofshellcommands
andothersoftware.However,asmallsetofshellcommandsisavailableintheESXiShell.
Youcanseealistofcommandsin/usr/bin.Whenyoulistthecommandswithls -al,noticethatseveralof
theutilitiesareredirectedtocommandsappropriateinthevSphereenvironment.Thefollowingcommands
producedifferentresultsthantypicalshellcommands.
Severalcommandsareredirectedtovmkvsitools.
Pingcommandsareredirectedtovmkping.
SomeadditionalcommandsareavailableintheESXiShellforcertaintroubleshootingtasks.Usethese
commandswheninstructedbyaVMwareKnowledgeBasearticleorVMwareTechnicalSupportstaff.
Usermanagementcommandsaredeprecated.
Goto/usr/binandrunls -atoseeacompletelist.
POSIX-like
commands
See“ShellCommands”onpage 9.
localclicommands SetoftroubleshootingcommandsforusewithVMwareTechnicalSupport.localcli
commandsareequivalenttoESXCLIcommandsbutbypassthehostdaemon(hostd).
Warning:localclicommandsareonlyforsituationswhenhostdisunavailableandcannot
berestarted.Afteryourunalocalcli
command,youmustrestarthostd.Usinglocalcli
commandsinothersituationsisnotsupported.Aninconsistentsystemstateandpotential
failurecanresult.
IMPORTANTForacompletelistofESXCLIcommands,seethevSphereCommandLineInterfaceReference.The
vSphereCommandLineInterfaceConceptsandExamplesdocumentillustrateshowtoperformcommontaskswith
ESXCLIorvicfg-commands.
I
MPORTANTThecommandsarenottestedorsupportedbyVMware.UseVMwarecommandssuchas
ESXCLI,vicfg-commands,andsoon,instead.
I
MPORTANTvmkvsitoolsisintendedforusewithVMwareTechnicalSupport.Donotuse
vmkvsitoolstomanageyoursystem.
Table 1. ESXi Shell Commands (Continued)
Command Set Description