
VMware, Inc. 7
1
vSpheresupportsseveralcommand‐lineinterfacesformanagingyourvirtualinfrastructureincludingthe
vSphereCommand‐LineInterface(vCLI),asetofESXiShellcommands,andPowerCLI.Youcanchoosethe
CLIsetbestsuitedforyourneeds,andwritescriptstoautomateyourCLItasks.
Thischapterincludesthefollowingtopics:
“OverviewofvSphereCommand‐LineInterfaces”onpage 7
“UsingthevSphereCommand‐LineInterface”onpage 8
“UsingESXCLI”onpage 8
“ESXiShellAccesswiththeDirectConsole”onpage 10
“RemoteESXiShellAccesswithSSH”onpage 11
Overview of vSphere Command-Line Interfaces
vSphereincludescommandsformanagingdifferentaspectsofyourenvironment,eitherlocallyorremotely.
Managing vSphere with
Command-Line Interfaces
1
Command set Description See
ESXCLIcommands ManagemanyaspectsofanESXihost.YoucanrunESXCLI
commandsremotelyorintheESXiShell.
vCLIpackage.InstallthevCLIpackageontheserverofyour
choice,ordeployavMAvirtualmachineandtargettheESXi
systemthatyouwantmanipulate.Youcanrun
ESXCLI
commandsagainstavCenterServersystemandtargetthe
hostindirectly.RunningagainstvCenterServersystemsby
usingthe-vihostparameterisrequiredifthehostisin
lockdownmode.
ESXishell.RunESXCLIcommandsinthelocalESXishellto
managethathost.
YoucanalsorunESXCLIcommandsfromthevSpherePowerCLI
promptbyusingtheGet-EsxClicmdlet.
“UsingESXCLI”onpage 8
“InstallingvCLI”on
page 13
vSphereCommand‐Line
ConceptsandExamples
vSphereManagement
AssistantGuide
vSphereCommand‐Line
InterfaceReference
esxcfg-commands Availableinthe
ESXiShell.esxcfg-commandsarestillincluded
inthisreleasebutaredeprecated.Migrateto
ESXCLIwhere
possible.
ESXCLIreplacementsexistformostcommands.
Command‐LineManagement
ofvSphere5forService
ConsoleUsers
vicfg-andother
vCLIcommands
IntroducedinvSphere3toallowuserstomanagehostsremotely.
InstallthevCLIpackageontheserverofyourchoice,ordeploya
vMAvirtualmachineandtargettheESXi
systemthatyouwant
manipulate.
YoucanrunthecommandsagainstESXisystemsoragainsta
vCenterServersystem.IfyoutargetavCenterServersystem,use
the--vihostoptiontospecifythetargetESXisystem.
Note:IftheESXisystemisinlockdownmode,youmustrun
commandsagainstthe
vCenterServersystemthatmanagesyour
ESXisystem.
“InstallingvCLI”onpage 13
vSphereCommand‐Line
ConceptsandExamples
vSphereCommand‐Line
InterfaceReference
Komentarze do niniejszej Instrukcji