Getting Started with vSphere
Command-Line Interfaces
ESXi 5.0
vCenter Server 5.0
This document supports the version of each product listed and
supports all subsequent versions until the document is replaced
by a new edition. To check for more recent editions of this
document, see http://www.vmware.com/support/pubs.
EN-000488-00
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Getting Started with vSphere Command-Line Interfaces
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com
Copyright © 2010, 2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and
intellectual property laws. VMware products are covered by one or more patents listed at
http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc. 3
Contents
AboutThisBook 5
1 ManagingvSpherewithCommand‐LineInterfaces 7
OverviewofvSphereCommand‐LineInterfaces 7
UsingthevSphereCommand‐LineInterface 8
UsingESXCLI 8
ESXCLISyntax 9
RunningESXCLIvCLICommands 9
RunningESXCLIvCLICommandsAgainstESXi4.xHosts 9
RunningESXCLICommandsintheESXiShell 9
ESXiShellAccesswiththeDirectConsole 10
EnablingLocalESXiShellAccess 10
UsingtheLocalESXiShell 11
RemoteESXiShellAccess
withSSH 11
EnablingSSHfortheESXiShell 11
UsingtheESXiShellwithSSH 12
2 InstallingvCLI 13
InstallationOverview 13
InstallingandUninstallingvCLIonLinux 14
InstallationPrerequisites 14
InstallationProcess 14
InstallingRequiredPrerequisiteSoftwareforYourLinuxPlatform 16
InstallingthevCLIPackage 16
UninstallingthevCLIPackageonLinux 17
InstallingandUninstallingvCLIonWindows 17
RunningCommandsonWindows 18
UninstallingthevCLIPackageonWindows 18
EnablingCertificateVerification 19
DeployingvMA 19
3 UsingthevSphereCommand‐LineInterface 21
OverviewofRunningCommands 21
SpecifyingAuthenticationInformation 22
OrderofPrecedenceforvCLIAuthentication 22
UsingaSessionFile 22
UsingEnvironmentVariables 23
UsingaConfigurationFile 23
UsingCommand‐LineOptions 24
UsingMicrosoftWindowsSecuritySupportProviderInterface 25
vCLIandLockdownMode 25
CommonOptionsforvCLIExecution 25
UsingvCLICommandsinScripts 27
ESXCLICommandHierarchies 29
esxcliesxcliNamespace 29
esxclifcoeNamespace 29
VMware, Inc. 5
GettingStartedwithvSphereCommand‐LineInterfacesgivesanoverviewofcommand‐lineinterfacesin
vSphere 5.0andgetsyoustartedwithESXiShellcommandsandvCLI(VMware
®
vSphereCommand‐Line
Interface)commands.ThisbookalsoincludesinstructionsforinstallingvCLIandareferencetoconnection
parameters.
Intended Audience
ThisbookisforexperiencedWindowsorLinuxsystemadministratorswhoarefamiliarwithvSphere
administrationtasksanddatacenteroperations.
VMware Technical Publications Glossary
VMwareTechnicalPublicationsprovidesaglossaryoftermsthatmightbeunfamiliartoyou.Fordefinitions
oftermsastheyareusedinVMwaretechnicaldocumentation,gotohttp://www.vmware.com/support/pubs.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhavecomments,sendyour
feedbacktodocfeedback@vmware.com.
Related Documentation
ThedocumentationforvCLIisavailableinthevSphereDocumentationCenterandonthevCLI
documentationpage.Gotohttp://www.vmware.com/support/pubs,selectVMwareAdministration
Products,andselectvSphereCommand‐LineInterface.
Command‐LineManagementinvSphere5.0forServiceConsoleUsersisatechnicalnoteforuserswhoare
currentlyusingESXserviceconsolecommands,scripts,agents,orlogs.Youlearnhowtotransitiontoan
off‐hostimplementationortousetheESXiShellinspecialcases.
vSphereCommand‐LineInterfaceConceptsandExamplespresentsusageexamplesformanycommands,such
assettingupsoftwareandhardwareiSCSI,addingvirtualswitches,settingupActiveDirectory
authentication,andsoon.Thedocumentincludesthesameexamplewiththevicfg-commandandthe
ESXCLIcommandwheresupported.
vSphereCommand‐LineInterfaceReferenceisareferencetobothvicfg-commandsandESXCLIcommands.
Thevicfg-commandhelpisgeneratedfromthePODavailableforeachcommand,runpod2htmlfor
anyvicfg-commandtogenerateindividualHTMLfilesinteractively.TheESXCLIreferenceinformation
isgeneratedfromtheESXCLIhelp.
The
documentationforPowerCLIisavailableinthevSphereDocumentationCenterandonthePowerCLI
documentationpage.Gotohttp://www.vmware.com/support/pubs,selectVMwareAdministration
Products,andselectvSpherePowerCLIdocumentation.
About This Book