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
VMware, Inc. 23
3f
Inmostcases,installingvCLIandrunningcommandsfromaremotesystem,withoneormorehostsastargets,
isrecommended.However,formaintenanceandtroubleshootingtasksyoumightprefertorunESXCLI
commandsintheESXiShellorconnecttotheESXiShellwithSSH.
Youfirstestablishaccess,and
canthenruncommands.
“ESXiShellAccesswiththeDirectConsole”onpage 23
“RemoteESXiShellAccesswithSSH”onpage 24
“LockdownMode”onpage 26
“RunningESXCLICommandsintheESXiShell”onpage 26
ESXi Shell Access with the Direct Console
AnESXisystemincludesaDirectConsoleUserInterface(DCUI)thatallowsyoutostartandstopthesystem
andtoperformalimitedsetofmaintenanceandtroubleshootingtasks.Thedirectconsoleallowsaccesstothe
ESXiShell,whichisdisabledbydefault.YoucanenabletheESXiShellin
thedirectconsoleorbyusingthe
vSphereWebClient.Youcanenablelocalshellaccessorremoteshellaccess:
LocalshellaccessallowsyoutologintotheshelldirectlyfromtheDirectConsole.See“EnablingLocal
ESXiShellAccess”onpage 23.
Remoteshell(SSH)accessallowsyoutoconnecttothehostusingashellsuchasPuTTY,specifyauser
nameandpassword,andruncommandsintheshell.See“RemoteESXiShellAccesswithSSH”on
page 24.
TheESXiShellincludesallESXCLIcommands,asetofdeprecatedesxcfg-commands,
andasetof
commandsfortroubleshootingandremediation.
Enabling Local ESXi Shell Access
YoucanenabletheESXiShellfromthedirectconsoleorfromthevSphereWebClientorthevSphereClient.
Ifyouhaveaccesstothedirectconsole,youcanenabletheESXiShellfromthere.
To enable the ESXi Shell in the direct console
1AtthedirectconsoleoftheESXihost,pressF2andprovidecredentialswhen
prompted.
2ScrolltoTroubleshootingOptionsandpressEnter.
Running Host Management
Commands in the ESXi Shell
3
IMPORTANTAllESXCLIcommandsthatareavailableintheESXiShellarealsoincludedinthevCLIpackage.
VMwarerecommendsyouinstallthevCLIpackageonasupportedWindowsorLinuxsystemordeploythe
vMAvirtualappliance,andruncommandsagainstyourESXihosts.RuncommandsintheESXiShell
directly
orthroughSSHonlyintroubleshootingsituations.