Getting Started with vSphere Command-Line Interfaces
ESXi 5.1 vCenter Server 5.1
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-000886-00
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  20102012 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. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com
VMware, Inc.
Contents
AboutThisBook
1 ManagingvSpherewithCommandLineInterfaces 7
OverviewofvSphereCommandLineInterfaces 7 UsingthevSphereCommandLineInterface 8 UsingESXCLI 8 ESXCLISyntax 8 RunningESXCLIvCLICommands 9 CommandSyntax 9 CommandSupportwhenHostandvCLIVersionDoNotMatch 9 RunningESXCLICommandsintheESXiShell 9 ESXiShellAccesswiththeDirectConsole 10 EnablingLocalESXiShellAccess 10 UsingtheLocalESXiShell 11 RemoteESXiShellAccesswithSSH 11 EnablingSSHfortheESXiShell 11 UsingtheESXiShellwithSSH 12
2 InstallingvCLI 13
InstallationOverview 13 OverviewofLinuxInstallationProcess 14 InstallingthevCLIPackageonRedHatEnterpriseLinux 16 InstallingRequiredPrerequisiteSoftwareforRedHatEnterpriseLinux 16 InstallingthevCLIPackageonRHEL(NoInternetAccess) 16 InstallingvCLIonLinuxSystemswithInternetAccess 17 InstallingRequiredPrerequisiteSoftwareforLinuxSystemswithInternetAccess 17 InstallingthevCLIPackageonaLinuxSystemwithInternetAccess 18 RunningCommandsonLinux 19 UninstallingthevCLIPackageonLinux 19 InstallingandUninstallingvCLIonWindows 19 RunningCommandsonWindows 20 UninstallingthevCLIPackageonWindows 20 EnablingCertificateVerification 21 DeployingvMA 21
3 UsingthevSphereCommandLineInterface 23
OverviewofRunningCommands 23 SpecifyingAuthenticationInformation 24 OrderofPrecedenceforvCLIAuthentication 24 UsingaSessionFile 24 UsingEnvironmentVariables 25 UsingaConfigurationFile 25 UsingCommandLineOptions 26 UsingMicrosoftWindowsSecuritySupportProviderInterface 27 vCLIandLockdownMode 27 CommonOptionsforvCLIExecution 27 UsingvCLICommandsinScripts 29
VMware, Inc. 3
Getting Started with vSphere Command-Line Interfaces
ESXCLICommandHierarchies 31
esxcliesxcliNamespace 31 esxclifcoeNamespace 31 esxclihardwareNamespace 32 esxcliiscsiNamespace 32 esxclinetworkNamespace 33 esxclischedNamespace 34 esxclisoftwareNamespace 34 esxclistorageNamespace 35 esxclisystemNamespace 36 esxclivmNamespace 36
VMware, Inc.
About This Book
GettingStartedwithvSphereCommandLineInterfacesgivesanoverviewofcommandlineinterfacesin vSphere 5.0andvSphere5.1andgetsyoustartedwithESXiShellcommandsandvCLI(VMwarevSphere CommandLineInterface)commands.ThisbookalsoincludesinstructionsforinstallingvCLIandareference toconnectionparameters.
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,andselectvSphereCommandLineInterface.
CommandLineManagementinvSphere5forServiceConsoleUsersisatechnicalnoteforuserswhoare currentlyusingESXserviceconsolecommands,scripts,agents,orlogs.Youlearnhowtotransitiontoan offhostimplementationortousetheESXiShellinspecialcases. vSphereCommandLineInterfaceConceptsandExamplespresentsusageexamplesformanycommands,such assettingupsoftwareandhardwareiSCSI,addingvirtualswitches,settingupActiveDirectory authentication,andsoon.ThedocumentincludesthesameexamplewiththeESXCLIcommandandwith thevicfg-command. vSphereCommandLineInterfaceReferenceisareferencetobothESXCLIcommandsandvicfg-commands. Thevicfg-commandhelpisgeneratedfromthePODavailableforeachcommand,runpod2htmlfor anyvicfg-commandtogenerateindividualHTMLfilesinteractively.TheESXCLIreferenceinformation isgeneratedfromtheESXCLIhelp.
ThedocumentationforPowerCLIisavailableinthevSphereDocumentationCenterandonthePowerCLI documentationpage.Gotohttp://www.vmware.com/support/pubs,selectVMwareAdministration Products,andselectvSpherePowerCLIdocumentation.
VMware, Inc.
Getting Started with vSphere Command-Line Interfaces
ThevSphereSDKforPerldocumentationexplainshowyoucanusethevSphereSDKforPerlandrelated utilityapplicationstomanageyourvSphereenvironment.Thedocumentationincludesinformationaboutthe vSphereSDKforPerlUtilityApplications. ThevSphereManagementAssistantGuideexplainshowtoinstallandusethevSphereManagementAssistant (vMA).vMAisavirtualmachinethatincludesvCLIandotherprepackagedsoftware.SeeDeployingvMA onpage 21. BackgroundinformationforthetasksdiscussedinthisbookisavailableinthevSpheredocumentationset.The vSpheredocumentationconsistsofthecombinedVMwarevCenterServerandESXidocumentation.
Technical Support and Education Resources
Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou.Toaccessthecurrentversion ofthisbookandotherbooks,gotohttp://www.vmware.com/support/pubs.
Online and Telephone Support
Touseonlinesupporttosubmittechnicalsupportrequests,viewyourproductandcontractinformation,and registeryourproducts,gotohttp://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon priority1issues.Gotohttp://www.vmware.com/support/phone_support.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.
VMware Professional Services
VMwareEducationServicescoursesofferextensivehandsonlabs,casestudyexamples,andcoursematerials designedtobeusedasonthejobreferencetools.Coursesareavailableonsite,intheclassroom,andlive online.Foronsitepilotprograms andimplementationbestpractices,VMwareConsultingServicesprovides offeringsto helpyouassess,plan,build,andmanageyourvirtualenvironment.Toaccessinformationabout educationclasses,certificationprograms,andconsultingservices,gotohttp://www.vmware.com/services.
VMware, Inc.
Managing vSphere with Command-Line Interfaces
vSpheresupportsseveralcommandlineinterfacesformanagingyourvirtualinfrastructureincludingthe vSphereCommandLineInterface(vCLI),asetofESXiShellcommands,andPowerCLI.Youcanchoosethe CLIsetbestsuitedforyourneeds,andwritescriptstoautomateyourCLItasks. Thischapterincludesthefollowingtopics:
    OverviewofvSphereCommandLineInterfacesonpage 7 UsingthevSphereCommandLineInterfaceonpage 8 UsingESXCLIonpage 8 ESXiShellAccesswiththeDirectConsoleonpage 10 RemoteESXiShellAccesswithSSHonpage 11
Overview of vSphere Command-Line Interfaces
vSphereincludescommandsformanagingdifferentaspectsofyourenvironment,eitherlocallyorremotely.
Command set Description ManagemanyaspectsofanESXihost.YoucanrunESXCLI commandsremotelyorintheESXiShell.
See UsingESXCLIonpage 8 InstallingvCLIon page 13 vSphereCommandLine ConceptsandExamples vSphereManagement AssistantGuide vSphereCommandLine InterfaceReference
ESXCLIcommands
vCLIpackage.InstallthevCLIpackageontheserverofyour choice,ordeployavMAvirtualmachineandtargettheESXi systemthatyouwantmanipulate.YoucanrunESXCLI commandsagainstavCenterServersystemandtargetthe hostindirectly.RunningagainstvCenterServersystemsby usingthe-vihostparameterisrequiredifthehostisin lockdownmode. ESXishell.RunESXCLIcommandsinthelocalESXishellto managethathost.
YoucanalsorunESXCLIcommandsfromthevSpherePowerCLI promptbyusingtheGet-EsxClicmdlet. esxcfg-commands AvailableintheESXiShell.esxcfg-commandsarestillincluded inthisreleasebutaredeprecated.MigratetoESXCLIwhere possible.ESXCLIreplacementsexistformostcommands. IntroducedinvSphere3toallowuserstomanagehostsremotely. InstallthevCLIpackageontheserverofyourchoice,ordeploya vMAvirtualmachineandtargettheESXisystemthatyouwant manipulate. YoucanrunthecommandsagainstESXisystemsoragainsta vCenterServersystem.IfyoutargetavCenterServersystem,use the--vihostoptiontospecifythetargetESXisystem. Note:IftheESXisystemisinlockdownmode,youmustrun commandsagainstthevCenterServersystemthatmanagesyour ESXisystem. CommandLineManagement ofvSphere5forService ConsoleUsers InstallingvCLIonpage 13 vSphereCommandLine ConceptsandExamples vSphereCommandLine InterfaceReference
vicfg-andother vCLIcommands
VMware, Inc.
Getting Started with vSphere Command-Line Interfaces
Command set VMwarePowerCLI cmdlets
Description VMwarevSpherePowerCLIprovidesaWindowsPowerShell interfacetothevSphereAPI.vSpherePowerCLIincludes PowerShellcmdletsforadministeringvSpherecomponents. vSpherePowerCLIincludesmorethan200cmdlets,asetof samplescripts,andafunctionlibraryformanagementand automation.ThevSphereImageBuilderPowerCLIandthe vSphereAutoDeployPowerCLIareincludedwhenyouinstall thevSpherePowerCLI.
See VMwarePowerCLI documentationset.
localclicommands
SetofcommandsforusewithVMwareTechnicalSupport. localclicommandsareequivalenttoESXCLIcommands,but bypasshostd.Thelocalclicommandsareonlyforsituations whenhostdisunavailableandcannotberestarted.Afteryourun alocalclicommand,youmustrestarthostd.RunESXCLI commandsaftertherestart. Ifyouusealocalclicommandinothersituations,an inconsistentsystemstateandpotentialfailurecanresult.
Using the vSphere Command-Line Interface
ThevCLIcommandsetincludesvicfg-commandsandESXCLIcommands.TheESXCLIcommands includedinthevCLIpackageareequivalenttotheESXCLIcommandsavailableontheESXiShell.Thevicfg- commandsetissimilartothedeprecatedesxcfg-commandsetintheESXiShell. IMPORTANTESXiShellisintendedforexperiencedusersonly.Minorerrorsintheshellcanresultin seriousproblems.InsteadofrunningcommandsdirectlyintheESXiShell,usevCLIorPowerCLI. YoucanrunvCLIcommandsfromaWindowsorLinuxsystem,orusevMA.
InstallthevCLIcommandsetontheWindowsorLinuxsystemfromwhichyouwanttoadministeryour ESXisystemsandrunvCLIcommands.SeeInstallingvCLIonpage 13. DeployavMAvirtualmachinetoanESXisystemandrunvCLIcommandsfromthere.
AfteryouhaveinstalledthevCLIpackageyoucanrunthecommandsinthesetagainstESXihosts.Youmust specifyconnectionparameterswhenyourunavCLIcommand.SeeUsingthevSphereCommandLine Interfaceonpage 23.
Using ESXCLI
YoucanmanagemanyaspectsofanESXihostwiththeESXCLIcommandset.YoucanrunESXCLIcommands asvCLIcommandsorrunthemintheESXiShellintroubleshootingsituations. YoucanalsorunESXCLIcommandsfromthePowerCLIshellbyusingtheGet-EsxClicmdlet.SeethevSphere PowerCLIAdministrationGuideandthevSpherePowerCLIReference. ThesetofESXCLIcommandsavailableonahostdependsonthehostconfiguration.ThevSphere CommandLineInterfaceReferencelistshelpinformationforallESXCLIcommands.Runesxcli --server <MyESXi> --helpbeforeyourunacommandonahosttoverifythatthecommandisdefinedonthehostyou aretargeting.
ESXCLI Syntax
EachESXCLI5commandusesthesamesyntax.
esxcli [dispatcher options] <namespace> [<namespace> ...] <cmd> [cmd options] 
dispatcheroptions.Predefinedoptionsforconnectioninformationsuchastargethost,username,andso on.SeeCommonOptionsforvCLIExecutiononpage 27.Notrequiredwhenyourunthecommandin theESXiShell. namespace.GroupsESXCLIcommands.vSphere5.0supportsnestednamespaces.
VMware, Inc.
Chapter 1 Managing vSphere with Command-Line Interfaces
command.Reportsonormodifiesstateonthesystem.
Running ESXCLI vCLI Commands
YoucanrunanESXCLIvCLIcommandremotelyagainstaspecifichostoragainstavCenterServersystem. Youhavethefollowingchoices:
DeploythevMAapplianceonanESXisystemandauthenticateagainstasetoftargetservers.Youcan thenrunESXCLIcommandsagainstanytargetserverbyspecifyingthe--hostdispatcheroption.No additionalauthenticationisrequired.SeethevSphereManagementAssistantGuide. InstallthevCLIpackageononeofthesupportedWindowsorLinuxsystems.TheESXCLIcommandset isincluded.YoucanruncommandsagainstanESXiorvCenterServersystemifyouspecifyconnection options.SeeInstallingvCLIonpage 13.
Command Syntax
Afterinstallation,runESXCLIcommandsagainstaspecifichostbyfirstspecifyingalldispatcheroptions.If thetargetserverisavCenterServersystem,specifythetargetESXihostbeforeanyESXCLInamespaces, commands,andsupportedoptions.
esxcli --server myESXi --username user1 --password 'my_password' storage nfs list esxcli --server myVCServer --username user1 --password 'my_pwd' --vihost myESXi.mycompany.com storage nfs list
Eachtimeyourunacommand,youmustspecifyauthenticationinformation.SeeUsingthevSphere CommandLineInterfaceonpage 23.
Command Support when Host and vCLI Version Do Not Match
WhenyourunanESXCLIvCLIcommand,youmustknowthecommandssupportedonthetargethost specifiedwith--serverorasavMAtarget. 
IfyouruncommandsagainstESXi4.xhosts,ESXCLI4.xcommandsaresupported. IfyouruncommandsagainstESXi5.0hosts,ESXCLI5.0commandsaresupported.ESXCLI5.1 commandsthatwereincludedinESXCLI5.0arealsosupported. IfyouruncommandsagainstESXi5.1hosts,ESXCLI5.1andESXCLI5.0commandsaresupported.
VMwarepartnersmightdevelopcustomESXCLIcommandsthatyoucanrunonhostswherethepartnerVIB hasbeeninstalled. Runesxcli --server <target> --helpforalistofnamespacessupportedonthetarget.Youcandrill downintothenamespacesforadditionalhelp. IMPORTANTESXCLIonESX4.xhostsdoesnotsupporttargetingavCenterServersystem.Youcantherefore notruncommandswith--serverpointingtoavCenterServersystemevenifyouinstallvCLI5.0orvCLI5.1.
Running ESXCLI Commands in the ESXi Shell
ESXCLIcommandsintheESXiShellarefullysupportedunlesstheyaremarkedasinternalintheonlinehelp. TheESXiShellisdisabledbydefault.YoumustenabletheESXiShellbeforeyoucanruncommandsinthe shell.SeeESXiShellAccesswiththeDirectConsoleonpage 10. To run an ESXCLI command in the shell 1 2 Logintotheshell. Runthecommand.Forexample,tolistNASstoragedevices,runthefollowingcommand.
esxcli storage nfs list
Youcanuse--helpatanylevelofesxcliforhelponavailablenamespaces,commands,oroptions.
VMware, Inc.
Getting Started with vSphere Command-Line Interfaces
ESXi Shell Access with the Direct Console
AnESXisystemincludesadirectconsole(alsocalledDCUI)thatallowsyoutostartandstopthesystemand toperformalimitedsetofmaintenanceandtroubleshootingtasks.ThedirectconsoleincludestheESXiShell, whichisdisabledbydefault.YoucanenabletheESXiShellinthedirectconsoleorbyusingthevSphereClient. Youcanenablelocalshellaccessorremoteshellaccess:
LocalshellaccessallowsyoutologintotheshelldirectlyfromtheDirectConsole.SeeEnablingLocal ESXiShellAccessonpage 10. Remoteshell(SSH)accessallowsyoutoconnecttothehostusingashellsuchasPuTTY,specifyauser nameandpassword,andruncommandsintheshell.
TheESXiShellincludesallESXCLIcommands,asetofdeprecatedesxcfg-commands,andasetof commandsfortroubleshootingandremediation. IMPORTANTAllESXCLIcommandsthatareavailableintheESXiShellarealsoincludedinthevCLIpackage. VMwarerecommendsyouinstallthevCLIpackageonasupportedWindowsorLinuxsystemordeploythe vMAvirtualappliance,andruncommandsagainstyourESXihosts.RuncommandsdirectlyintheESXiShell introubleshootingsituationsonly.
Enabling Local ESXi Shell Access
YoucanenabletheESXiShellfromthedirectconsoleorfromthevSphereClient. Ifyouhaveaccesstothedirectconsole,youcanenabletheESXiShellfromthere. To enable the ESXi Shell in the direct console 1 2 3 AtthedirectconsoleoftheESXihost,pressF2andprovidecredentialswhenprompted. ScrolltoTroubleshootingOptionsandpressEnter. ChooseEnableESXiShellandpressEnter. Ontheleft,EnableESXiShellchangestoDisableESXiShell.Ontheright,ESXiShellisDisabled changestoESXiShellisEnabled. 4 PressEscuntilyoureturntothemaindirectconsolescreen.
Ifyoudonothaveaccesstothedirectconsole,youcanenabletheESXiShellfromthevSphereClient. To enable the local or remote ESXi Shell from the vSphere Client 1 2 3 4 Selectthehost,clicktheConfigurationtab,andclickSecurityProfileintheSoftwarepanel. IntheServicessection,clickProperties. SelectESXiShellandclickOptions. ChangetheESXiShelloptions.
 
TochangetheStartuppolicyacrossreboots,clickStartandstopwithhostandrebootthehost. Totemporarilystartorstoptheservice,clicktheStartorStopbutton.
ClickOK.
AfteryouhaveenabledtheESXiShell,youcanuseitfromthatmonitororthroughaserialport. TheESXiShelltimeoutsettingspecifieshowlong,inminutes,youcanleaveanunusedsessionopen.By default,thetimeoutfortheESXiShellis0,whichmeansthesessionremainsopenevenifitisunused.Ifyou changethetimeout,forexample,to30minutes,youhavetologinagainafterthetimeoutperiodhaselapsed. NOTEIfyouareloggedinwhenthetimeoutperiodelapses,yoursessionwillpersist.However,theESXiShell willbedisabled,preventingotherusersfromloggingin.
10
VMware, Inc.
Chapter 1 Managing vSphere with Command-Line Interfaces
YoucanmodifythetimeoutfromtheDirectConsoleorfromthevSphereClient. To modify the ESXi Shell Timeout
IntheDirectConsole,followthesesteps. a b SelectModifyESXiShelltimeoutandpressEnter. EnterthetimeoutvalueinminutesandpressEnter.
InthevSphereClient,followthesesteps. a b c d IntheConfigurationtabsSoftwarepanel,clickAdvancedSettings. Intheleftpanel,clickUserVars. LocateUserVars.ESXiShellTimeOutandenterthetimeoutvalueinminutes. ClickOK.
Using the Local ESXi Shell
AfteryouenabletheESXiShellinthedirectconsole,youcanuseitfrommaindirectconsolescreenorremotely throughaserialport. To use the local ESXi Shell 1 2 Atthemaindirectconsolescreen,pressAltF1toopenavirtualconsolewindowtothehost. Providecredentialswhenprompted. Whenyoutypethepassword,charactersarenotdisplayedontheconsole. 3 4 5 Entershellcommandstoperformmanagementtasks. Tologout,typeexitintheshell. Toreturntothedirectconsole,typeAltF2.
SeevSphereInstallationandSetupdocumentationforinformationonserialportsetup.
Remote ESXi Shell Access with SSH
IfSecureShellisenabledfortheESXiShell,youcanrunshellcommandsbyusingaSecureShellclientsuch asSSHorPuTTY.
Enabling SSH for the ESXi Shell
Bydefault,remotecommandexecutionisdisabledonanESXihost,andyoucannotlogintothehostusinga remoteshell.YoucanenableremotecommandexecutionfromthedirectconsoleorfromthevSphereClient. To enable SSH access in the direct console 1 2 3 AtthedirectconsoleoftheESXihost,pressF2andprovidecredentialswhenprompted. ScrolltoTroubleshootingOptionsandpressEnter. ChooseEnableSSHandpressEnteronce. Ontheleft,EnableSSHchangestoDisableSSH.Ontheright,SSHisDisabledchangestoSSHis Enabled. 4 PressEscuntilyoureturntothemaindirectconsolescreen.
To enable SSH from the vSphere Client 1 2 SelectthehostandclicktheConfigurationtab. ClickSecurityProfileintheSoftwarepanel.
VMware, Inc.
11
Getting Started with vSphere Command-Line Interfaces
3 4 5
IntheServicessection,clickProperties. SelectSSHandclickOptions. ChangetheSSHoptions.
 TochangetheStartuppolicyacrossreboots,clickStartandstopwithhostandrebootthehost. Totemporarilystartorstoptheservice,clicktheStartorStopbutton.
ClickOK.
AfteryouhaveenabledSSH,youlogintotheESXiShellremotelyandrunESXiShellcommands.
Using the ESXi Shell with SSH
IfSSHisenabledonyourESXihost,youcanruncommandsonthatshellusinganSSHclient. To access the remote ESXi Shell 1 2 OpenanSSHclient. SpecifytheIPaddressordomainnameoftheESXihost. PrecisedirectionsvarydependingontheSSHclientthatyouareusing.Seevendordocumentationand support. 3 Providecredentialswhenprompted.
12
VMware, Inc.
Installing vCLI
YoucaninstallavCLIpackageonaLinuxoraMicrosoftWindowssystem,ordeploythevSphere ManagementAssistant(vMA)onanESXihost. Thischapterincludesthefollowingtopics:
         InstallationOverviewonpage 13 OverviewofLinuxInstallationProcessonpage 14 InstallingthevCLIPackageonRedHatEnterpriseLinuxonpage 16 InstallingvCLIonLinuxSystemswithInternetAccessonpage 17 RunningCommandsonLinuxonpage 19 UninstallingthevCLIPackageonLinuxonpage 19 InstallingandUninstallingvCLIonWindowsonpage 19 RunningCommandsonWindowsonpage 20 EnablingCertificateVerificationonpage 21 DeployingvMAonpage 21
Installation Overview
YoucaninstallavCLIpackageonasupportedplatformordeploythevMAvirtualmachineonanESXihost.
vCLIpackages.InstallavCLIpackageonaphysicalorvirtualmachine.SeeInstallingthevCLIPackage onRedHatEnterpriseLinuxonpage 16,InstallingvCLIonLinuxSystemswithInternetAccesson page 17,andInstallingandUninstallingvCLIonWindowsonpage 19. ThevCLIinstallerinstallsbothvSphereSDKforPerlandvCLIbecausevCLIcommandsrunontopofthe vSphereSDKforPerl.Thecontentsoftheinstallerpackagediffersfordifferentplatforms.
Platform Windows RedHatEnterprise Linux Installation Process TheinstallationpackageincludesvCLI,vSphereSDKforPerl,andprerequisitePerl modules. Youmustinstallrequiredsoftware.SeeInstallingRequiredPrerequisiteSoftwareforRed HatEnterpriseLinuxonpage 16. IfyouhaveInternetaccess,RHELdownloadsPerlmodulesfromCPAN. IfyoudonothaveInternetaccess,theinstallerinstallsPerlmodulesthatitdoesnotfind onyoursystemfromtheinstallerpackage. SLESandUbuntu YoumustinstallrequiredsoftwareandyoumusthaveInternetaccess.SeeInstalling RequiredPrerequisiteSoftwareforLinuxSystemswithInternetAccessonpage 17. TheinstallerdownloadsotherPerlmodulesfromCPAN.
VMware, Inc.
13
vSphere SDK for Perl Installation Guide
Afterinstallation,youcanrunvCLIcommandsandvSphereSDKforPerlutilityapplicationsfromthe operatingsystemcommandline.Eachtimeyourunacommand,youspecifythetargetserverconnection optionsdirectlyorindirectly.YoucanalsowritescriptsandmanageyourvSphereenvironmentusing thosescripts.
vMA.DeployvMA,avirtualmachinethatadministratorscanusetorunscriptsthatmanagevSphere,on anESXihost.vMAincludesvCLI,vSphereSDKforPerl,andotherprepackagedsoftwareinaLinux environment. vMAsupportsnoninteractivelogin.IfyouestablishanESXihostasatargetserver,youcanrunvCLIand vSphereSDKforPerlcommandsagainstthatserverwithoutadditionalauthentication.Ifyouestablisha vCenterServersystemasatargetserver,youcanrunmostvCLIcommandsagainstallESXisystemsthat servermanageswithoutadditionalauthentication.SeeDeployingvMAonpage 21.
Overview of Linux Installation Process
TheinstallationscriptforvCLIissupportedonthefollowingLinuxdistributions:    
RedHatEnterpriseLinux5.5Server(32bitand64bit) SLES10SP1(32bitand64bit) SLES11(32bitand64bit) SLES11SP1(32bitand64bit) Ubuntu10.04(32bitand64bit)
ThevCLIpackageinstallerinstallsthevCLIscriptsandthevSphereSDKforPerl.Theinstallationproceedsas follows. 1 Theinstallercheckswhetherthefollowingrequiredprerequisitepackagesareinstalledonthesystem:
Perl OpenSSL Perlversion5.8.8orversion5.10mustbeinstalledonyoursystem. ThevCLIrequiresSSLbecausemostconnectionsbetweenthesystemonwhichyourunthecommand andthetargetvSpheresystemareencryptedwithSSL. TheOpenSSLlibrary(libssl-devpackage)isnotincludedinthedefaultLinuxdistribution.See InstallingRequiredPrerequisiteSoftwareforRedHatEnterpriseLinuxonpage 16andInstalling RequiredPrerequisiteSoftwareforLinuxSystemswithInternetAccessonpage 17. LibXML2 UsedforXMLparsing.ThevCLIclientrequires2.6.26orhigherversion.Ifyouhaveanolderversion installed,pleaseupgradeto2.6.26orhigher. Thelibxml2packageisnotincludedinthedefaultLinuxdistribution.SeeInstallingRequired PrerequisiteSoftwareforRedHatEnterpriseLinuxonpage 16andInstallingRequiredPrerequisite SoftwareforLinuxSystemswithInternetAccessonpage 17. uuid Includedinuuid-devforSLES11andine2fsprogsforotherLinuxplatforms.RequiredbytheUUID Perlmodule.
Iftherequiredsoftwareisfound,theinstallerproceeds.Otherwise,theinstallerstopsandinformsyou thatyoumustinstallthesoftware.SeeInstallingRequiredPrerequisiteSoftwareforRedHatEnterprise Linuxonpage 16andInstallingRequiredPrerequisiteSoftwareforLinuxSystemswithInternet Accessonpage 17forinstructions. TheinstallercheckswhetherthefollowingPerlmodulesarefound,andwhetherthecorrectversionis installed.
      CryptSSLeay0.55(0.550.9.7or0.550.9.8) IOCompressBase2.037 CompressZlib2.037 IOCompressZlib2.037 CompressRawZlib2.037 ArchiveZip1.28 DataDumper2.121
14
VMware, Inc.
Chapter 2 Installing vCLI
XMLLibXML1.63 libwwwperl5.805 LWPProtocolhttps6.02 XMLLibXMLCommon0.13 XMLNamespaceSupport1.09 XMLSAX0.16 DataDump1.15 URI1.37 UUID0.03 SOAPLite0.710.08 HTMLParser3.60 version0.78 ClassMethodMaker2.10
EarlierversionsoflibwwwperlincludetheLWPProtocolhttpsmodule.Veryrecentversionsof libwwwperldonotincludetheLWPProtocolhttpsmoduleandyouhavetoinstallthatmodule. NOTEIfyouintendtorunvCLIcommandswithSSLcertification,besuretocheckthatLWP::UserAgent 6.00orlaterisinstalled.Theinstallerdoesnotcheckthismodule,andearlierversionsdonotworkwith SSL. 4 TheinstallerproceedsdependingontheLinuxdistribution.
Linux distribution RHEL(NoInternet access) Installer behavior OnRHEL,theinstallerallowsyoutoinstallPerlmoduleswithCPANifInternetaccessis available. IfnoInternetaccessisavailable,andifarecommendedPerlmoduleisnotfoundatall,the installerinstallsit.Ifadifferentversionofthemoduleisfound,theinstallerdoesnotinstall itandproceedswiththeinstallationprocess.Attheendoftheinstallationprocess,the installerinformsyouiftheversiononthesystemdoesnotmatchtherecommended version,andrecommendsthatyouinstalltheversionvCLIwastestedwith.Youcaninstall themodulesusingthepackageinstallerforyourplatform,theinstallationCD,orCPAN. Note:TheinstallerdoesnotoverwriteexistingversionsofrecommendedPerlmodules. Youmustexplicitlyupdatethosemodulesyourself. AllLinux distributions (Internetaccess) TheinstallerproceedsdependingonwhetherthePerlmodulesarefound.
IfarecommendedPerlmoduleisnotfoundatall,theinstallerinstallsitusingCPAN. YoumustmeettheinstallationprerequisitesortheinstallercannotinstallthePerl modulesandstops.SeeInstallingvCLIonLinuxSystemswithInternetAccesson page 17. Ifalowerversionofarecommendedmoduleisfound,theinstallerdoesnotinstalla differentversionfromCPANandproceedswithinstallation.Aftercompleting installation,theinstallerdisplaysamessagethattheversiononthesystemdoesnot matchtherecommendedversion,andrecommendsthatyouinstalltheversionvCLI wastestedwith.Youcaninstallthemodulesusingthepackageinstallerforyour platform,theinstallationCD,orCPAN. Ifahigherversionofarecommendedmoduleisfound,theinstallerproceedswith installationanddoesnotdisplayamessageafterinstallation.
Note:TheinstallerdoesnotoverwriteexistingversionsofrecommendedPerlmodules. Youmustexplicitlyupdatethosemodulesyourself.
AfterallrequiredsoftwareandallprerequisitePerlmodulesareinstalled,youcaninstallvCLI.See InstallingthevCLIPackageonRedHatEnterpriseLinuxonpage 16andInstallingthevCLIPackage onaLinuxSystemwithInternetAccessonpage 18.
IfapreviousversionofvCLI,RemoteCLI,orvSphereSDKforPerlisinstalledonyoursystem,andyouinstall vCLIinadifferentdirectory,youmustresetthePATHenvironmentvariable.Youcandosobeforeorafterthe installation,usingthecommandappropriateforyourdistributionandshell(setenv,export,andsoon).If youdonotresetthepath,thesystemmightstilllookforexecutablesintheoldlocation.
VMware, Inc. 15
vSphere SDK for Perl Installation Guide
Installing the vCLI Package on Red Hat Enterprise Linux
vCLIissupportedonRedHatEnterpriseLinux5.5Server,32bitand64bit.OnRHEL,thevSphereSDKfor PerlinstallerpromptsyouwhetheryouwanttoinstallrequiredPerlmodulesfromtheinstallationpackageor fromCPAN.Followthesestepstoinstallthesoftware. 1 2 Installrequiredprerequisitesoftware.SeeInstallingRequiredPrerequisiteSoftwareforRedHat EnterpriseLinuxonpage 16. Whenprompted,directtheinstallertoinstalladditionalprerequisitesfromtheinstallationpackage(see InstallingthevCLIPackageonRHEL(NoInternetAccess)onpage 16)orfromCPAN(seeInstalling thevCLIPackageonaLinuxSystemwithInternetAccessonpage 18)
Installing Required Prerequisite Software for Red Hat Enterprise Linux
PrerequisitesoftwareonRHELincludesrequiredsoftwareandrecommendedPerlmodules. Required Software Ifrequiredsoftwareisnotinstalled,thevCLIinstallerstops.Youcaninstallprerequisitesusingyum,theRHEL packageinstaller(recommended),orfromtheinstallationDVD. Forexample,ifbothOpenSSLdevelopmentlibraries,libXML2,ande2fsprogsaremissing,typethe followingatacommandprompt:
yum install openssl-devel libxml2-dev e2fsprogs-dev
Recommended Perl Modules Whentheinstallerfinishes,itmightissueawarningthattheversionofamoduleinstalledonyoursystemdoes notmatchtheversionwithwhichvCLIwastested.InstallthatversionusingyumorCPANtoresolvetheissue. SeeOverviewofLinuxInstallationProcessonpage 14foracompletelistofmodules. NOTETheinstallerdoesnotoverwriteexistingPerlmodules.
Installing the vCLI Package on RHEL (No Internet Access)
BeforeyouinstallvCLI,youmustremoveallpreviousversionsofthatsoftware.Theprocessdiffersfrom simplyuninstallingvCLI. To remove previous versions of vCLI 1 Runtheuninstallscript,forexample,ifyouinstalledvCLIinthedefaultlocation,runthefollowing command:
/usr/bin/vmware-uninstall-vSphere-CLI.pl
DeleteexistingversionsofvSphere-CLI.xxxx.tar.gzanddeletethevmware-vsphere-cli-distrib directory.
To install vCLI on RHEL 1 UntarthevCLIbinarythatyoudownloaded.
tar zxvf VMware-vSphere-CLI-5.X.X-XXXXX.i386.tar.gz
Avmware-vsphere-vcli-distribdirectoryiscreated. 2 Loginassuperuserandruntheinstaller:
/<location>/sudo vmware-vsphere-cli-distrib/vmware-install.pl
3 4 5
Toacceptthelicenseterms,typeyesandpressEnter. ToinstallPerlmoduleslocally,typeyesandpressEnter. Specifyaninstallationdirectory,orpressEntertoacceptthedefault,whichis/usr/bin.
16
VMware, Inc.
Chapter 2 Installing vCLI
Acompleteinstallationprocesshasthefollowingresult:
  
Asuccessmessageappears. Theinstallerlistsdifferentversionnumbersforrequiredmodules(ifany). Thepromptreturnstotheshellprompt.
Ifyouacceptedthedefaultsduringinstallation,youcanfindtheinstalledsoftwareinthefollowinglocations:
  
vCLIscripts/usr/bin vSphereSDKforPerlutilityapplications/usr/lib/vmware-vcli/apps vSphereSDKforPerlsamplescripts/usr/share/doc/vmware-vcli/samples
SeethevSphereSDKforPerldocumentationforareferencetoallutilityapplications. AfteryouinstallthevCLI,youcantesttheinstallationbyrunningacommandfromthecommandprompt.See RunningCommandsonLinuxonpage 19.
Installing vCLI on Linux Systems with Internet Access
BeforeyoucaninstallthevCLIpackageonaLinuxsystemwithInternetaccess,thatsystemmustmeet followingprerequisites.
Internetaccess.YoumusthaveInternetaccesswhenyouruntheinstallerbecausetheinstallerusesCPAN toinstallprerequisitePerlmodules. DevelopmentToolsandLibraries.YoumustinstalltheDevelopmentToolsandLibrariesfortheLinux platformthatyouareworkingwithbeforeyouinstallvCLIandprerequisitePerlmodules. Proxysettings.IfyoursystemisusingaproxyforInternetaccess,youmustsetthehttp://andftp:// proxies,asfollows:
export http_proxy=<proxy_server>:port export ftp_proxy=<proxy_server>:port
Installing Required Prerequisite Software for Linux Systems with Internet Access
Ifrequiredprerequisitesoftwareisnotinstalled,theinstallerstopsandrequeststhatyouinstallit.Installation ofprerequisitesoftwaredependsontheplatformthatyouareusing. Table 2-1. Installing Required Prerequisite Software
Platform RHEL5.5,32bit RHEL5.5,64bit SLES10,32bit SLES10,64bit Installation Installprerequisitesusingyum,theRHELpackageinstaller(recommended),orfromthe installationDVD.Forexample: yum install openssl-devel libxml2-dev e2fsprogs-dev InstalltheprerequisitepackagesfromtheSLES10andSLES11SDKDVD.Whenyouinsertthe DVD,itofferstoautorun.Canceltheautorundialogboxandusetheyastpackageinstallerto installOpenSSLorothermissingrequiredpackages.
 
SLES10,64bit.yast -i openssl-devel libxml2-devel-32bit e2fsprogs-devel-32bit SLES10,32bit.yast -i openssl-devel libxml2-devel e2fsprogs-devel
SomeusersmightbeauthorizedtousetheNovellCustomerCenteranduseyasttoretrieve missingpackagesfromthere. NotethatSLES10includeslibxml2version2.6.23.ThevCLIclientrequire2.6.26orhigher. Upgradeto2.6.26orhigher.
VMware, Inc.
17
vSphere SDK for Perl Installation Guide
Table 2-1. Installing Required Prerequisite Software
Platform SLES11,32bit SLES11SP1,32bit SLES11,64bit SLES11SP1,64bit Installation InstalltheprerequisitepackagesfromtheSLES10andSLES11SDKDVD.Whenyouinsertthe DVD,itofferstoautorun.Canceltheautorundialogboxandusetheyastpackageinstallerto installOpenSSLorothermissingrequiredpackages. 
SLES1164bit.yast -i openssl-devel libuuid-devel libuuid-devel-32bit SLES1132bit.yast -i openssl-devel libuuid-devel
SomeusersmightbeauthorizedtousetheNovellCustomerCenteranduseyasttoretrieve missingpackagesfromthere. Ubuntu10.04,32bit Ubuntu10.04,64bit 1.ConnecttotheInternet. 2.Updatethelocalrepositoryoflibrariesfromaterminalwindow. sudo apt-get update 3.Installtherequiredlibrariesfromaterminalwindow.
 
32bit.sudo apt-get install build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl 64bit.sudo apt-get install ia32-libs build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl
ForUbuntu10.0464bit,youmustinstallthe32bitcompatibilitylibrariesortheresxtopand
ESXCLIcommandsdonotwork.
Installing the vCLI Package on a Linux System with Internet Access
InstallthevCLIpackageandrunacommandtoverifyinstallationwassuccessful. To install vCLI 1 2 Loginasroot. UntarthevCLIbinarythatyoudownloaded.
tar zxvf VMware-vSphere-CLI-5.X.X-XXXXX.i386.tar.gz
Avmware-vsphere-vcli-distribdirectoryiscreated. 3 (Optional)IfyourserverusesaproxytoaccesstheInternet,andifyourhttp://andftp://proxywere notsetwhenyouinstalledprerequisitesoftware,setthemnow.
export http_proxy=<proxy_server>:port export ftp_proxy=<proxy_server>:port
Runtheinstaller:
sudo vmware-vsphere-cli-distrib/vmware-install.pl
Toacceptthelicenseterms,typeyesandpressEnter. TheinstallerconnectstoCPANandinstallsprerequisitesoftware.Establishingaconnectionmighttakea longtime.
OnRHEL,whenpromptedtoinstallprecompiledPerlmodules,typenoandpressEntertouseCPAN TheinstallerconnectstoCPANandinstallsprerequisitesoftware.Establishingaconnectionmighttakea longtime.
Specifyaninstallationdirectory,orpressEntertoacceptthedefault,whichis/usr/bin. Acompleteinstallationprocesshasthefollowingresult:
  
Asuccessmessageappears. Theinstallerlistsdifferentversionnumbersforrequiredmodules(ifany). Thepromptreturnstotheshellprompt.
Ifyouacceptedthedefaultsduringinstallation,youcanfindtheinstalledsoftwareinthefollowinglocations:
vCLIscripts/usr/bin
18
VMware, Inc.
Chapter 2 Installing vCLI
vSphereSDKforPerlutilityapplications/usr/lib/vmware-vcli/apps vSphereSDKforPerlsamplescripts/usr/share/doc/vmware-vcli/samples
SeethevSphereSDKforPerldocumentationforareferencetoallutilityapplications.AfteryouinstallvCLI, youcantesttheinstallationbyrunningavCLIcommandorvSphereSDKforPerlutilityapplicationfromthe commandprompt.
Running Commands on Linux
Afterinstallation,youcanrunvCLIcommandsandvSphereSDKforPerlutilityapplicationsatthecommand prompt. To run a vCLI command on Linux 1 2 3 Openacommandprompt. (Optional)ChangetothedirectorywhereyouinstalledthevCLI(defaultis/usr/bin). Runthecommand,includingtheconnectionoptions.
<command> <conn_options> <params>
Specifyconnectionoptionsinaconfigurationfileorpassthemonthecommandline.Theextension.pl isnotrequiredonLinux.Forexample:
esxcli --server <server> --username snow\-white --password dwarf\$ network ip interface list vicfg-mpath --server <server> --username snow\-white --password dwarf\$ --list
Thesystempromptsyouforausernameandpasswordforthetargetserver. SeeTable 32,vCLIConnectionOptions,onpage 28foracompletelistofconnectionoptions.
Uninstalling the vCLI Package on Linux
YoucanuseascriptincludedintheinstallationtouninstallthevCLIpackage. To uninstall vCLI on Linux 1 2 ChangetothedirectorywhereyouinstalledvCLI(defaultis/usr/bin). Runthevmware-uninstall-vSphere-CLI.pl script. ThecommanduninstallsvCLIandthevSphereSDKforPerl.
Installing and Uninstalling vCLI on Windows
BeforeyoucanrunvCLIcommandsfromyourWindowsystem,youmustinstallthevCLIpackageandtest theinstallationbyrunningacommand. ThevCLIinstallationpackageforWindowsincludestheActivePerlruntimefromActiveStateSoftwareand requiredPerlmodulesandlibraries.ThevCLIissupportedonthefollowingWindowsplatforms:  
WindowsVistaEnterpriseSP132bitand64bit Windows200864bit Windows732bitand64bit
IMPORTANTIfyouwanttorunESXCLIcommandsincludedinvCLIfromaWindowssystem,youmusthave theVisualC++2008redistributablefor32bitinstalledonthatsystem.Findvcredist_x86.exeforVisualC++ 2008andinstallitonyourWindowssystem. To install the vCLI Package on Windows 1 DownloadthevCLIWindowsinstallerpackage. YoucanfindtheinstallerontheVMwareCommunitiespage.
VMware, Inc.
19
vSphere SDK for Perl Installation Guide
2 3
Starttheinstaller. (Optional)IfpromptedtoremoveolderversionsofvSphereSDKforPerlorvCLI,youcaneitheraccept orcanceltheinstallationandinstallthevCLIpackageonadifferentsystem. IMPORTANTTheinstallerreplacesboththevSphereSDKforPerlandvCLI.Tokeepanolderversion, installthispackageonadifferentsystem.
4 5
ClickNextintheWelcomepage. ToinstallthevCLIinanondefaultdirectory,clickChangeandselectthedirectory. ThedefaultlocationisC:\Program Files\VMware\VMware vSphere CLI.
6 7
ClickNext. ClickInstalltoproceedwiththeinstallation. Theinstallationmighttakeseveralminutestocomplete.
Rebootyoursystem. Withoutreboot,pathsettingsmightnotbecorrectonyourWindowsplatform.
Running Commands on Windows
AfteryouinstallvCLIandrebootyoursystem,youcantesttheinstallationbyrunningavCLIorSDKforPerl commandfromtheWindowscommandprompt. To run a vCLI command on Windows 1 FromtheWindowsStartmenu,choosePrograms>VMware>VMwarevSphereCLI>Command Prompt. AcommandpromptshellforthelocationwherevCLIisinstalledappears.YouhaveeasyaccesstovCLI andtovSphereSDKforPerlcommandsfromthatlocation. 2 Runthecommand,passinginconnectionoptionsandotheroptions. OnWindows,theextension.plisrequiredforvicfg-commands,butnotforESXCLI.
<command>.pl <conn_options> <params>
Forexample:
esxcli --server <server> --username snow-white --password dwarf$ network ip interface list vicfg-mpath.pl --server <server> --username snow-white --password dwarf$ --list
Thesystempromptsyouforausernameandpassword. SeeTable 32,vCLIConnectionOptions,onpage 28foracompletelistofconnectionoptions.
Uninstalling the vCLI Package on Windows
YoucanuninstallthevCLIpackageasyouwouldotherprograms. To uninstall vCLI on Windows 1 2 3 FindtheoptionforaddingandremovingprogramsontheWindowsoperatingsystemyouareusing. Inthepanelthatappears,selectVMwarevSphereCLI,andclickRemove. ClickYeswhenprompted.
ThesystemuninstallsthevSphereSDKforPerl,thevCLI,andallprerequisitesoftware.
20
VMware, Inc.
Chapter 2 Installing vCLI
Enabling Certificate Verification
ThevSphereSDKforPerlandvCLIuseCrypt::SSLEaytosupportcertificateverification.Crypt::SSLEay allowsverificationofcertificatessignedbyaCertificateAuthority(CA)ifyousetthefollowingtwovariables: 
HTTPS_CA_FILETheCAfile. HTTPS_CA_DIRTheCAdirectory.
SeetheCrypt::SSLEaydocumentationfordetailsonsetup. CAUTIONIfthetwoenvironmentvariablesHTTPS_CA_FILEandHTTPS_CA_DIRaresetincorrectlyorifa problemwiththecertificateexists,vCLIcommandsdonotcomplete,anddonotprinterrororwarning messages.UseHTTPS_DEBUGfortroubleshootingbeforerunningvCLIcommands.
Deploying vMA
Asanalternativetoapackageinstallation,youcandeployvMAonanESXihostandrunvCLIcommandsfrom there.vMAisavirtualmachineyoucanusetorunscriptstomanageESXisystems.vMAincludesaLinux environment,vCLI,andotherprepackagedsoftware. SettingupvMAconsistsofafewtasks.ThevSphereManagementAssistantGuidediscusseseachtaskindetail. 1 DeployvMAtoanESXisystemthatmeetsthehardwareprerequisites. SeethevSphereManagementAssistantGuideforprerequisitesanddeploymentdetails. 2 ConfigurevMA. WhenyoubootvMA,youmustspecifythefollowingrequiredconfigurationinformationwhen prompted:
  
Networkinformation(thedefaultisoftenacceptable) HostnameforvMA. Passwordfortheviadminuser.TheviadminuserhassuperuserprivilegesonvMA.Youcannotlog intovMAastherootuser.
(Optional)AddavCenterServersystemoroneormoreESXisystemsastargets.YouconfigurevMAfor ActiveDirectoryauthenticationandcanthenaddESXiandvCenterServersystemstovMAwithout havingtostorepasswordsinthevMAcredentialstore.SeethevSphereManagementAssistantGuide.
VMware, Inc.
21
vSphere SDK for Perl Installation Guide
22
VMware, Inc.
3f
Using the vSphere Command-Line Interface
YoucanrunvSphereCommandLineInterface(vCLI)commandsfromthecommandlineofthesystemwhere youinstalledthepackage,fromthevMAcommandline,andfromscripts.Eachcommandrequiresata minimumthetargetservertorunthecommandon.Usersauthorizedtoruncommandsonthetargetserver donothavetospecifyauthenticationinformation.Otherusersmustspecifyauthenticationinformation. Thischapterincludesthefollowingtopics:
   OverviewofRunningCommandsonpage 23 SpecifyingAuthenticationInformationonpage 24 CommonOptionsforvCLIExecutiononpage 27 UsingvCLICommandsinScriptsonpage 29
IMPORTANTIfanESXisystemthatyoutargetisinlockdownmode,youcannotrunvCLIcommandsagainst thatsystemdirectly.YoumusttargetavCenterServersystemthatmanagestheESXisystemandusethe --vihostoptiontospecifytheESXitarget.SeevCLIandLockdownModeonpage 27.
Overview of Running Commands
YoucanrunvCLIcommandsinteractivelyorinscriptsinseveralways.
OpenacommandpromptonaLinuxorWindowssystemonwhichyouinstalledvCLI.Entercommands intothatcommandprompt,specifyingconnectionoptions. AccessthevMALinuxconsole.SetuptargetserversandrunvCLIcommandsagainstthetargetswithout additionalauthentication. PreparescriptsthatcontainvCLIcommands.Thenrunthescriptsfromaremoteadministrationserver thathasthevCLIpackageinstalledorfromthevMALinuxconsole.SeeUsingvCLICommandsin Scriptsonpage 29.
WhenyouruncommandsagainstanESXihost,youmustbeauthenticatedforthathost.Whenyourun commandsagainstavCenterServersystem,andyouareauthenticatedforthatsystem,youcantargetallESXi hoststhatvCenterServermanageswithoutadditionalauthentication.SeeSpecifyingAuthentication Informationonpage 24. CAUTIONIfyouspecifypasswordsinplaintext,youriskexposingthepasswordtootherusers.Thepassword mightalsobecomeexposedinbackupfiles.Donotprovideplaintextpasswordsonproductionsystems.
VMware, Inc.
23
Getting Started with vSphere Command-Line Interfaces
Followoneofthefollowingapproachesforprotectingpasswords.
IfyouuseavCLIcommandinteractivelyanddonotspecifyausernameandpassword,youareprompted forthem.Thescreendoesnotechothepasswordyoutype. Fornoninteractiveuse,youcancreateasessionfileusingthesave_sessionscriptincludedinthe apps/sessiondirectory.SeeUsingaSessionFileonpage 24. IfyouarerunningonaWindowssystem,youcanusethe--passthroughauthoption.Iftheuserwho runsthecommandwiththatoptionisknown,nopasswordisrequired.
IfyouarerunningvMA,youcansetuptargetserversandrunmostvCLIcommandsagainsttargetservers withoutadditionalauthentication.SeethevSphereManagementAssistantGuide.
Specifying Authentication Information
vCLIallowsyoutorunagainstmultipletargetserversfromthesameadministrationserver.Youmusthave thecorrectprivilegestoperformtheactionsoneachtarget. IMPORTANTvCLI4.1andlaterallowsadministratorstoplaceESXihostsinlockdownmodeforenhanced security.OnlyavCLIcommandoravSphereClientconnectedtoavCenterServersystemcanmakechanges toESXihostsinlockdownmode.Nousers,noteventherootuser,canrunvCLIcommandsagainstESXihosts inlockdownmode.SeevCLIandLockdownModeonpage 27andtheDatacenterAdministrationGuide.
Order of Precedence for vCLI Authentication
WhenyourunavCLIcommand,authenticationhappensintheorderofprecedenceshowninTable 31.This orderofprecedencealwaysapplies.Thatmeans,forexample,thatyoucannotoverrideanenvironment variablesettinginaconfigurationfile. Table 3-1. vCLI Authentication Precedence
Authentication Commandline Description Password(--password),sessionfile (--sessionfile),orconfigurationfile (--config)specifiedonthecommandline. Passwordspecifiedinanenvironmentvariable. Passwordspecifiedinaconfigurationfile. Currentaccountinformationusedtoestablish anSSPIconnection.AvailableonlyonWindows. Passwordretrievedfromthecredentialstore. Passwordisnotechoedtoscreen. See UsingaSessionFileonpage 24
Environment variable Configurationfile Currentaccount (ActiveDirectory) Credentialstore Prompttheuserfor apassword.
UsingEnvironmentVariablesonpage 25 UsingaConfigurationFileonpage 25 UsingMicrosoftWindowsSecuritySupport ProviderInterfaceonpage 27 vSphereWebServicesSDKProgrammingGuide andvSphereSDKforPerlProgrammingGuide.
Using a Session File
Youcancreateasessionfilewiththesave_sessionscript.Thescriptisinthe/apps/sessiondirectoryof thevSphereSDKforPerl,whichisincludedinthevCLIpackage.Youcanusethesessionfile,whichdoesnot revealpasswordinformation,whenyourunvCLIcommands.Ifthesessionfileisnotusedfor30 minutes,it expires. Ifyouuseasessionfile,otherconnectionoptionsareignored.
24
VMware, Inc.
Chapter 3 Using the vSphere Command-Line Interface
To create and use a session file 1 Connecttothedirectorywherethescriptislocated. Forexample: Windows: Linux: 2
cd C:\Program Files\VMware\VMware vSphere CLI\Perl\apps\session cd /usr/share/lib/vmware-vcli/apps/session
Runsave_session. Youcanusethesave_session.plscriptorthe--savesessionfileoptiontothevCLIcommand.You mustspecifytheservertoconnecttoandthenameofasessionfileinwhichthescriptsavesan authenticationcookie.
save_session --savesessionfile <location> --server <server>
Forexample: Windows: Linux:
save_session.pl --savesessionfile C:\Temp\my_session --server my_server --username <username> --password <password> save_session --savesessionfile /tmp/vimsession --server <servername_or_address> --username <username> --password <password>
Ifyouspecifyaserver,butnousernameorpassword,thescriptpromptsyou. 3 WhenyourunvCLIcommands,passinthesessionfileusingthe--sessionfileoption.
<command> --sessionfile <sessionfile_location> <command_options>
Forexample: Windows: Linux:
esxcli --sessionfile C:\Temp\my_session network ip interface list vicfg-mpath.pl --sessionfile C:\Temp\my_session --list esxcli --sessionfile /tmp/vimsession network ip interface list vicfg-mpath --sessionfile /tmp/vimsession --list
Using Environment Variables
OnLinux,youcansetenvironmentvariablesinaLinuxbashprofileoronthecommandlinebyusinga commandlikethefollowing:
export VI_SERVER=<your_server_name_or_address>
OnWindows,youcansetenvironmentvariablesintheEnvironmentpropertiesdialogboxoftheSystem controlpanel.Forthecurrentsession,youcansetenvironmentvariablesatthecommandlinebyusinga commandlikethefollowing:
set VI_SERVER=<your_server_name_or_address>
IMPORTANTDonotuseescapecharactersinenvironmentvariables. SeeUsingvCLICommandsinScriptsonpage 29foranenvironmentvariableexample.
Using a Configuration File
Youcanuseatextfilethatcontainsvariablenamesandsettingsasaconfigurationfile.Variablescorresponding totheoptionsareshowninTable 32,vCLIConnectionOptions,onpage 28. CAUTIONLimitreadaccesstoaconfigurationfilethatcontainsusercredentials.
VMware, Inc.
25
Getting Started with vSphere Command-Line Interfaces
PassintheconfigurationfilewhenyourunvCLIcommands,asfollows:
<command> --config <my_saved_config> <option>
Forexample:
esxcli --config <my_saved_config> network ip interface list vicfg-mpath --config <my_saved_config> --list
IfyouhavemultiplevCenterServerorESXisystemsandyouadministereachsystemindividually,youcan createmultipleconfigurationfileswithdifferentnames.Torunacommandorasetofcommandsonaserver, youpassinthe--configoptionwiththeappropriatefilenameatthecommandline. Thefollowingexampleillustratesthecontentsofaconfigurationfile:
VI_SERVER = XX.XXX.XXX.XX VI_USERNAME = root VI_PASSWORD = my_password VI_PROTOCOL = https VI_PORTNUMBER = 443
Ifyouhavesetupyoursystemtorunthisfile,youcanrunscriptsonthespecifiedserverafterwards.
Using Command-Line Options
Youcanpassincommandlineoptionsusingoptionnameandoptionvaluepairsinmostcases.ForESXCLI commands,youcanuselongorshortoptions.Anequalsignbetweenoptionnameandoptionvalueis optional.
esxcli --server <vc_server> --username <privileged_user> --password <pw> --vihost <esx_host> <namespace> [<namespace]...> <command> --<option_name=option_value>
ForothervCLIcommands,uselongorshortoptions.Anequalsignisnotsupported.
<vicfg- command> --server <vc_server> --username <privileged_user> --password <pw> --vihost <esx_host> --<option_name option_value>
Someoptions,suchas--help,havenovalue. IMPORTANTEnclosepasswordsandothertextwithspecialcharactersinquotationmarks. WhenrunningcommandsonWindows,usedoublequotes( ).WhenrunningcommandsonLinux,use singlequotes( )orabackslash(\)asanescapecharacter. Thefollowingexamplesconnecttotheserverasusersnow-whitewithpassworddwarf$. Linux
esxcli --server <server> --username snow\-white --password dwarf\$ network ip interface list esxcli --server <server> --username snow\-white --password dwarf$ network ip interface list vicfg-mpath --server <server> --username snow\-white --password dwarf\$ --list vicfg-mpath --server <server> --username snow-white --password dwarf$ --list
Windows
esxcli --server <server> --username snow-white --password dwarf$ network ip interface list vicfg-mpath.pl --server <server> --username snow-white --password dwarf$ --list
26
VMware, Inc.
Chapter 3 Using the vSphere Command-Line Interface
Using Microsoft Windows Security Support Provider Interface
The--passthroughauthoption,whichisavailableifyourunvCLIcommandsfromaMicrosoftWindows system,allowsyoutousetheMicrosoftWindowsSecuritySupportProviderInterface(SSPI).SeetheMicrosoft WebsiteforadetaileddiscussionofSSPI. Youcanuse--passthroughauthtoestablishaconnectionwithavCenterServersystem(vCenterServer systemorVirtualCenterServer3.5Update2orlater).Aftertheconnectionhasbeenestablished,authentication forthevCenterServersystemoranyESXisystemitmanagesisnolongerrequired.Using --passthroughauthpassesthecredentialsoftheuserwhorunsthecommandtothetargetvCenterServer system.Noadditionalauthenticationisrequirediftheuserwhorunsthecommandisknownbythecomputer fromwhichyouaccessthevCenterServersystemandbythecomputerrunningthevCenterServersoftware. IfvCLIcommandsandthevCenterServersoftwarerunonthesamecomputer,theuserneedsonlyalocal accounttorunthecommand.IfthevCLIcommandandthevCenterServersoftwarerunondifferent machines,theuserwhorunsthecommandmusthaveanaccountinadomaintrustedbybothmachines. SSPIsupportsseveralprotocols.Bydefault,itselectstheNegotiateprotocol,whereclientandservertryto findaprotocolthatbothsupport.Youcanuse--passthroughauthpackagetoexplicitlyspecifyaprotocol thatissupportedbySSPI.Kerberos,theWindowsstandardfordomainlevelauthentication,isused frequently.IfthevCenterServersystemisconfiguredtoacceptonlyaspecificprotocol,specifyingtheprotocol with --passthroughauthpackagemightberequiredforsuccessfulauthentication.Ifyouuse --passthroughauth,youdonothavetospecifyauthenticationinformationbyusingotheroptions. Example
esxcli --server <vc_server> --passthroughauth --passthroughauthpackage Kerberos --vihost my_esx network ip interface list vicfg-mpath.pl --server <vc_server> --passthroughauth --passthroughauthpackage Kerberos --vihost my_esx --list
ConnectstoaserverthatissetuptouseSSPI.Whenatrusteduserrunsthecommand,thesystemcallsthe ESXCLIcommandorvicfg-mpathwiththe--listoption.Thesystemdoesnotpromptforausernameand password.
vCLI and Lockdown Mode
LockdownmodedisablesalldirectrootaccesstoESXimachines.TomakechangestoESXisystemsin lockdownmodeyoumustgothroughavCenterServersystemthatmanagestheESXisystem.Youcanusethe vSphereClientorvCLIcommandsthatsupportthe--vihostoption.Thefollowingcommandscannotrun againstvCenterServersystemsandarethereforenotavailableinlockdownmode:      
vicfg-snmp vifs vicfg-user vicfg-cfgbackup vihostupdate vmkfstools vicfg-ipsec
IfyouhaveproblemsrunningacommandonanESXihostdirectly(withoutspecifyingavCenterServer target),checkwhetherlockdownmodeisenabledonthathost.SeethevSphereSecuritydocumentation.
Common Options for vCLI Execution
Table 32listsoptionsthatareavailableforallvCLIcommandsinalphabeticalorder.Thetableincludes optionsforuseonthecommandlineandvariablesforuseinconfigurationfiles. IMPORTANTForconnections,vCLIsupportsonlytheIPv4protocol,nottheIPv6protocol.Youcan,however, configureIPv6onthetargethostwithseveralofthenetworkingcommands.
VMware, Inc. 27
Getting Started with vSphere Command-Line Interfaces
SeeTorunavCLIcommandonLinuxonpage 19andTorunavCLIcommandonWindowsonpage 20 forusageexamples. Table 3-2. vCLI Connection Options
Option and Environment Variable --cacertsfile <certsfile> -t <certs_file> VI_CACERTFILE=<cert_file_path> --config <cfg_file_full_path> VI_CONFIG=<cfg_file_full_path> --credstore <credstore> Description ESXCLIcommandsonly. UsedtospecifytheCA(CertificateAuthority)certificatefile,inPEMformat, toverifytheidentityofthevCenterServersystemorESXisystemtorunthe commandon.Canbeused,forexample,topreventmaninthemiddleattacks. Usestheconfigurationfileatthespecifiedlocation. Specifyapaththatisreadablefromthecurrentdirectory. Nameofacredentialstorefile.Defaultsto <HOME>/.vmware/credstore/vicredentials.xmlonLinuxand <APPDATA>/VMware/credstore/vicredentials.xmlonWindows. CommandsforsettingupthecredentialstoreareincludedinthevSphereSDK forPerl,whichisinstalledwithvCLI.ThevSphereSDKforPerlProgramming Guideexplainshowtomanagethecredentialstore. Specifiestheencodingtobeused.Severalencodingsaresupported.  
--encoding <encoding> VI_ENCODING=<encoding>
cp936(SimplifiedChinese) shftjis(Japanese) cp850(GermanandFrench).
Youcanuse--encodingtospecifytheencodingvCLIshouldmaptowhenit isrunonaforeignlanguagesystem. --passthroughauth VI_PASSTHROUGHAUTH Ifyouspecifythisoption,thesystemusestheMicrosoftWindowsSecurity SupportProviderInterface(SSPI)forauthentication.Trustedusersarenot promptedforausernameandpassword.SeetheMicrosoftWebsitefora detaileddiscussionofSSPI. ThisoptionissupportedonlyifyouarerunningvCLIonaWindowssystem andareconnectingtoavCenterServersystem. --passthroughauthpackage <package> VI_PASSTHROUGHAUTHPACKAGE= <package> Usethisoptionwith--passthroughauthtospecifyadomainlevel authenticationprotocoltobeusedbyWindows.Bydefault,SSPIusesthe Negotiateprotocol,whichmeansthatclientandservertrytonegotiatea protocolthatbothsupport. IfthevCenterServersystemtowhichyouareconnectingisconfiguredtouse aspecificprotocol,youcanspecifythatprotocolusingthisoption. ThisoptionissupportedonlyifyouarerunningvCLIonaWindowssystem andconnectingtoavCenterServersystem. --password <passwd> VI_PASSWORD=<passwd> Usesthespecifiedpassword(usedwith--username)tologintotheserver.
If--serverspecifiesavCenterServersystem,theusernameandpassword applytothatserver.IfyoucanlogintothevCenterServersystem,you neednoadditionalauthenticationtoruncommandsontheESXihoststhat servermanages. If--serverspecifiesanESXihost,theusernameandpasswordapplyto thatserver.
Usetheemptystring(' 'onLinuxand onWindows)toindicateno password. Ifyoudonotspecifyausernameandpasswordonthecommandline,the systempromptsyouanddoesnotechoyourinputtothescreen. --portnumber <number> VI_PORTNUMBER=<number> --protocol <HTTP|HTTPS> VI_PROTOCOL=<HTTP|HTTPS> --savesessionfile <file> VI_SAVESESSIONFILE=<file> Usesthespecifiedporttoconnecttothesystemspecifiedby--server.Default is443. Usesthespecifiedprotocoltoconnecttothesystemspecifiedby--server. DefaultisHTTPS. Savesasessiontothespecifiedfile.Thesessionexpiresifithasbeenunused for30minutes.
28
VMware, Inc.
Chapter 3 Using the vSphere Command-Line Interface
Table 3-2. vCLI Connection Options (Continued)
Option and Environment Variable --server <server> VI_SERVER=<server> Description UsesthespecifiedESXiorvCenterServersystem.Defaultislocalhost. If--serverpointstoavCenterServersystem,youusethe--vihostoption tospecifytheESXihostonwhichyouwanttorunthecommand.Acommand issupportedforvCenterServerifthe--vihostoptionisdefined. UsesthespecifiedservicepathtoconnecttotheESXihost.Defaultis /sdk/webService. Usesthespecifiedsessionfiletoloadapreviouslysavedsession.Thesession mustbeunexpired. ConnectstothespecifiedvSphereWebServicesSDKURL. Usesthespecifiedusername.
--servicepath <path> VI_SERVICEPATH=<path> --sessionfile <file> VI_SESSIONFILE=<file> --url <url> VI_URL=<url> --username <u_name> VI_USERNAME=<u_name>
If--serverspecifiesavCenterServersystem,theusernameand passwordapplytothatserver.IfyoucanlogintothevCenterServer system,youneednoadditionalauthenticationtoruncommandsonthe ESXihoststhatservermanages. If--serverspecifiesanESXisystem,theusernameandpasswordapply tothatsystem.
Ifyoudonotspecifyausernameandpasswordonthecommandline,the systempromptsyouanddoesnotechoyourinputtothescreen. --vihost <host> -h <host WhenyourunavCLIcommandwiththe--serveroptionpointingtoa vCenterServersystem,use--vihosttospecifytheESXihosttorunthe commandagainst. NOTE:Thisoptionisnotsupportedforeachcommand.Ifsupported,the optionisincludedwhenyourun<cmd> --help.
Table 33listsoptionsnotusedasconnectionoptionsthatyoucanusewhenyourunavicfg-vCLIcommand. Table 3-3. vCLI Common Options
Option --help --verbose --version Description Printsabriefusagemessage.Themessagelistsfirsteachcommandspecificoptionandthen eachofthecommonoptions. Displaysadditionaldebugginginformation. Displaysversioninformation.
Using vCLI Commands in Scripts
Mostadministratorsrunscriptstoperformthesametaskrepeatedlyortoperformataskonmultiplehosts. YoucanrunvCLIcommandsfromoneadministrationserveragainstmultipletargetservers. Forexample,whenanewdatastorebecomesavailableinyourenvironment,youmustmakethatdatastore availabletoeachESXihost.ThefollowingsamplescriptillustrateshowtomakeaNASdatastoreavailableto threehosts(esxi_server_a,esx_server_b,andesxi_server_c). Thesampleassumesthataconfigurationfile/home/admin/.visdkrc.<hostname>existsforeachhost.For example,theconfigurationfileforesxi_server_ahasthefollowingcontents:
VI_SERVER = esxi_server_a VI_USERNAME = root VI_PASSWORD = xysfdjkat
VMware, Inc.
29
Getting Started with vSphere Command-Line Interfaces
ThescriptitselfaddstheNASdatastorebycallingthedifferentconfigurationfiles.
#!bin/sh for i in {"esxi_server_a","esx_server_b","esxi_server_c"} do echo "Adding NAS datastore for $i..." esxcli --config /host.conf storage nfs add -H <hostname> -s <sharepoint> -v <volumename> esxcli --config <config.file> storage nfs list done
30
VMware, Inc.
ESXCLI Command Hierarchies
Thisappendixconsistsoftablesofcommandsummariesthatillustratethehierarchyofnamespacesand commands(inbold)foreachESXCLInamespace.Thisappendixisnotmeanttobeareferencebutfacilitates locatingtheonlinehelpforindividualcommands. Theappendixincludesthefollowingtopics:
         esxcliesxcliNamespaceonpage 31 esxclifcoeNamespaceonpage 31 esxclihardwareNamespaceonpage 32 esxcliiscsiNamespaceonpage 32 esxclinetworkNamespaceonpage 33 esxclischedNamespaceonpage 34 esxclisoftwareNamespaceonpage 34 esxclistorageNamespaceonpage 35 esxclisystemNamespaceonpage 36 esxclivmNamespaceonpage 36
esxcli esxcli Namespace
Theesxcli esxclinamespaceincludestheesxcli esxcli command listcommand.
esxcli fcoe Namespace
adapter[list] nic[disable|discover|list]
VMware, Inc.
31
Getting Started with vSphere Command-Line Interfaces
esxcli hardware Namespace
The esxcli hardwarenamespaceincludesthefollowingnamespacesandcommands.
bootdevice[list] clock[get|set] cpu[list] cpuid[get] global[get|set] ipmi fru[get|list] sdrlist sel[get|list] memory[get] pci[list] platform[get] trustedbood[get]
esxcli iscsi Namespace
Theesxcli iscsinamespaceincludesthefollowingnamespacesandcommands.
adapter[get|list|set] auth discovery [rediscover] chap[set|get] sendtarget [add|list|remove] auth param[get|set] statictarget [add|list|remove] statusget target[list] portal[list] auth param[get|set] capabilitiesget firmware[get|set] param[get|set] ibftboot[get|import] logicalnetworkportallist networkportal[add|list|remove] physicalnetworkportal[list] pluginlist session[add|list|remove] software[get|set] connectionlist ipconfig[get|set] param[get|set] chap[get|set] chap[get|set]
32
VMware, Inc.
ESXCLI Command Hierarchies
esxcli network Namespace
Theesxcli networknamespaceincludesthefollowingnamespacesandcommands.
diag[ping] fence[list] network[list] bte[list] port[list] firewall [get|load|refresh|set|unload] ruleset[list|set] allowedip[add| list|remove] rule[list] ip[get|set] connection[list] dns search [add|list|remove] server [add|list|remove] interface [add|list|remove| set] ipv4[get|set]
ipv6[get|set] address [add|list|remove] tag [add|get|remove] ipsec[set] sa [add|list|remove] sp [add|list|remove] route  neighbor[list] nic[down|get|list|set|up] stats[get] vlan port stats[get] filter sroivmic[list] vm sriovnicvf[list] [list] port[list] vswitch dvs vmware[list] lacp[getconfig| getstats|get status|set] vxlan[list] configstats[get |set] networklist stats[get] stats[get|set] ipv4 [add|list|remove] ipv6 [add|list|remove]
VMware, Inc.
33
Getting Started with vSphere Command-Line Interfaces
networkmapping [list|reset] networkportlist networkportstats [list|reset] networkstats[list |reset] stats[reset] vmknic[list|reset] vmknic multicastgroup list vmknicstats[list| reset] standard[add| list|remove|set] policy[get] failover[get|set] security[get|set] shaping[get|set] portgroup [add|list|remove |set] policy[set] failover[get|set]
security[get|set] shaping[get|set] uplink [add|remove]
esxcli sched Namespace
Theesxcli schednamespaceincludestheswapnamespaceandthefollowingcommands.
swap system[get|get]
esxcli software Namespace
Theesxcli softwarenamespaceincludesthefollowingnamespacesandcommands.
acceptance[get|set] sources profile[get|list] vib[get|list] profile[get|install|update|validate] vib[get|install|list|remove|update]
34
VMware, Inc.
ESXCLI Command Hierarchies
esxcli storage Namespace
Theesxcli storagenamespaceincludesthefollowingnamespacesandcommands.
core adapter[list|rescan] device [list|set|setconfig] stats[get] vaai[status] detached [list|remove] partition [list|showguid]] smart[get] stats[get] vaai world[list] path[list|set] claiming [reclaim|unclaim] claimrule[add| convert|list|load| move|remove|run] plugin[list] registration [add|list|remove] filesystem[automount| list|mount|rescan| unmount] nfs[add|list|remove] nmp device[list|set] path[list] psp[list] fixed generic deviceconfig[get|set] deviceconfig[get|set] pathconfig[get|set] roundrobin satp[list|set] generic deviceconfig[get|set] deviceconfig[get|set] pathconfig[get|set] rule [add|list|remove] san fc[list|reset] events[get|clear] statsget fcoe[list|reset] iscsilist sas[list|reset] vmfs[upgrade] snapshot[list|mount| resignature] extentlist extentlist statsget statsget statsget stats[get] status[get]
VMware, Inc.
35
Getting Started with vSphere Command-Line Interfaces
esxcli system Namespace
Theesxcli systemnamespaceincludesthefollowingnamespacesandcommands.
boot deviceget
coredump
network[check| get|set] partition [get|list|set]
hostname[get|set] maintenanceMode[get|set] module[get|list|load|set] parameters[list|set]
processlist
stats loadget runningget
secpolicy settings
domain[list|set] advanced[list|set] keyboard kernel[list|set] layout[get|list|set]
shutdown [poweroff|reboot] snmp[get|hash|set|test] stats syslog[mark|reload] visorfs[get] uptimeget config[get|set] ramdisk[add|list| remove] tardisk[list] time[get|set] uuidget versionget visorfsget ramdisk [add|list|remove] tardisklist welcomemsg[get|set] logger[list|set]
esxcli vm Namespace
Theesxcli vmnamespaceincludesaprocessnamespacewithalistcommandandakillcommand.
36
VMware, Inc.
Index
A
Active Directory 21 authentication information 24
P
Perl 13 precedence 24 prerequisites Red Hat Enterprise Linux 5.2 16
C
command-line connection parameters 26 configuration files for authentication 25 usage 25 connection options 24, 27 cp936 encoding 28 creating session files 25 credential store precedence 24
R
Red Hat Enterprise Linux 5.2 16 required parameters 24 running commands from vMA 21 Linux 16, 24 Windows 19
D
DCUI 10 deploying vMA 21 direct console 10
S
scripts with vCLI commands 29 session files 24, 25 Shift_JIS encoding 28 SSPI protocol 27
E
encoding cp936 28 Shift_JIS 28 ESXCLI command hierarchies 31 execution options 27
U
uninstalling Linux 19 on Linux 19 on Windows 20 Using 26 using session files 25
I
installing vCLI Linux 16, 24 Windows 19 installing vMA 21
V
vCLI command-line 26 configuration files 25 environment variables 25 execution options 27 installing on Linux 16, 24 installing on Windows 19 vCLI package installing on Linux 14 installing on Windows 19 uninstalling 19 unpacking 16, 18 vMA 21 environment variables 25 installing 21 multiple configuration files 26 vSphere Management Assistant 21
L
Linux installing vCLI 16, 24 running vCLI commands 19, 26 vCLI 16 lockdown mode 27
M
Microsoft Windows Security Support Provider Interface 27
O
options 27 order of precedence 24
VMware, Inc.
37
Getting Started with vSphere Command-Line Interfaces
vSphere SDK for Perl 13
W
Windows executing commands 26 installing vCLI 19 running vCLI commands 20 using vCLI 19
38
VMware, Inc.