Vma 50 Guide
Vma 50 Guide
Vma 50 Guide
vSphere 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-000570-00
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 20082011 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.
Contents
AboutThisBook
1 IntroductiontovMA 7
vMACapabilities 7 vMAComponentOverview 8 vSphereAuthenticationMechanism 8 vMASamples 9 vMAUseCases 9 WritingorConvertingScripts 9 WritingorConvertingAgents 9
2 GettingStartedwithvMA 11
HardwareRequirements 12 SoftwareRequirements 12 RequiredAuthenticationInformation 12 DeployvMA 13 ConfigurevMAatFirstBoot 13 vMAConsoleandWebUI 14 ConfigurevMAforActiveDirectoryAuthentication 14 ConfigureUnattendedAuthenticationforActiveDirectoryTargets TroubleshootingUnattendedAuthentication 16 EnabletheviuserAccount 16 vMAUserAccountPrivileges 16 AddTargetServerstovMA 17 RunningvSphereCLIfortheTargets 19 ReconfigureaTargetServer 19 RemoveTargetServersfromvMA 20 ModifyingScripts 20 ConfigurevMAtoUseaStaticIPAddress 21 ConfigureaStaticIPAddressfromtheConsole 21 ConfigureaStaticIPAddressfromtheWebUI 22 ConfigurevMAtoUseaDHCPServer 22 ConfigurevMAtoUseaDHCPServerfromtheConsole 22 ConfigurevMAtoUseaDHCPServerfromtheWebUI 22 SettingtheTimeZone 22 SettingtheTimeZonefromtheConsole 23 SettingtheTimeZonefromtheWebUI 23 ShutDownvMA 23 DeletevMA 23 TroubleshootingvMA 24 UpdatevMA 24 ConfigureAutomaticvMAUpdates 25
15
3 vMAInterfaces 27
vMAInterfaceOverview 27 vifptargetCommandforvifastpassInitialization 27
VMware, Inc.
vifpTargetManagementCommands 28 vifpaddserver 28 vifpremoveserver 29 vifprotatepassword 30 vifplistservers 31 vifpreconfigure 32 TargetManagementExampleSequence 32 UsingtheVmaTargetLibLibrary 33 VmaTargetLibReference 33 EnumeratingTargets 33 QueryingTargets 33 ProgrammaticLogin 34 ProgrammaticLogout 34
Index 35
VMware, Inc.
Revision History
Thisbook,thevSphereManagementAssistantGuide,isrevisedwitheachreleaseoftheproductorwhen necessary.Arevisedversioncancontainminorormajorchanges.Table 1summarizesthesignificantchanges ineachversionofthisbook. Table 1. Revision History
Revision 24AUG2011 13JUL2010 16NOV2009 Description vMA5.0release. vMA4.1release Chapter1isenhancedtoprovidedetailsaboutvMAsenhancedcapabilities,authenticationmechanisms andthechangestothesamples. Chapter2providesinformationaboutconfiguringvMAforActiveDirectory.Italsoexplainshowto reconfigureatargetserver. Chapter3providesinformationaboutthenewvifptargetandvifp reconfigurecommands.Italso describestheVmaTargetLiblibrary. 21MAY2009 27OCT2008 vMA4.0documentation VIMA1.0documentation
Intended Audience
ThisbookisforadministratorsanddeveloperswithsomeexperiencesettingupaLinuxsystemandworking inaLinuxenvironment.AdministratorscanusethevMAautomatedauthenticationfacilitiesandthesoftware packagedwithvMAtointeractwithESXihostsandvCenterServersystems.Developerscancreateagentsthat interactwithESXihostsandvCenterServersystems.
VMware, Inc.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Sendyourfeedbackto docfeedback@vmware.com.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.
VMware, Inc.
Introduction to vMA
TogetstartedwithvMArightaway,gotoGettingStartedwithvMAonpage 11.
vMA Capabilities
vMAprovidesaflexibleandauthenticatedplatformforrunningscriptsandprograms.
VMware, Inc.
viadminwithadministratorprivileges viuserwithreadonlyprivileges
ThecreationofviadminandviuserdoesnotapplyforActiveDirectoryauthenticationtargets.Whenyouadd asystemasanActiveDirectorytarget,vMAdoesnotstoreanyinformationaboutthecredentials.Tousethe ActiveDirectoryauthentication,theadministratormustconfigurevMAforActiveDirectory.Formore informationonhowtoconfigurevMAforActiveDirectory,seeConfigurevMAforActiveDirectory Authenticationonpage 14. Afteraddingatargetserver,youmustinitializevifastpasssothatyoudonothavetoauthenticateeachtime yourunvSphereCLIcommands.IfyourunavSphereCLIcommandwithoutinitializingvifastpass,youwill beaskedforusernameandpassword. Youcaninitializevifastpassbyusingoneofthefollowingmethods:
VMware, Inc.
vMA Samples
vMAsamplesillustratethevMACLIsandtheVmaTargetLiblibrary.ThesamplesareavailableinvMAat /opt/vmware/vma/samples.
Thepartnerchangestheagenttousecodesimilartothefollowingpseudocodeinstead:
LoginToMyEsx(String myESXName) { VmaTarget target = VmaTargetLib.query_target(myESXName); UserSession us = target.login(); }
ThispseudocodeassumesonlyonevMAtarget.Formultipletargetservers,thecodecanspecifyany targetserverorloopthroughalistoftargetservers.
VMware, Inc.
10
VMware, Inc.
YoushouldhavesomeexperiencesettingupaLinuxsystemandworkinginaLinuxenvironment.This chapterexplainshowtodeployandconfigurevMA,howtoaddandremovetargetservers,andhowto prepareandrunscripts.Thechapteralsoincludestroubleshootinginformation. ReadChapter 1,IntroductiontovMA,onpage 7forbackgroundinformationonvMAfunctionalityand availablevMAcomponents. IMPORTANTYoucannotupgradeapreviousversionofvMAtovMA5.0.YoumustinstallafreshvMA5.0 instance. Thischapterincludesthefollowingtopics:
HardwareRequirementsonpage 12 SoftwareRequirementsonpage 12 RequiredAuthenticationInformationonpage 12 DeployvMAonpage 13 ConfigurevMAatFirstBootonpage 13 vMAConsoleandWebUIonpage 14 ConfigurevMAforActiveDirectoryAuthenticationonpage 14 ConfigureUnattendedAuthenticationforActiveDirectoryTargetsonpage 15 EnabletheviuserAccountonpage 16 vMAUserAccountPrivilegesonpage 16 AddTargetServerstovMAonpage 17 RunningvSphereCLIfortheTargetsonpage 19 ReconfigureaTargetServeronpage 19 RemoveTargetServersfromvMAonpage 20 ModifyingScriptsonpage 20 ConfigurevMAtoUseaStaticIPAddressonpage 21 ConfigurevMAtoUseaDHCPServeronpage 22 SettingtheTimeZoneonpage 22 ShutDownvMAonpage 23 DeletevMAonpage 23 TroubleshootingvMAonpage 24
VMware, Inc.
11
UpdatevMAonpage 24 ConfigureAutomaticvMAUpdatesonpage 25
Hardware Requirements
TosetupvMA,youmusthaveanESXihost.BecausevMArunsa64bitLinuxguestoperatingsystem,the ESXihostonwhichitrunsmustsupport64bitvirtualmachines. TheESXihostmusthaveoneofthefollowingCPUs:
AMDOpteron,revEorlater IntelprocessorswithEM64TsupportwithVTenabled.
Software Requirements
YoucandeployvMAonthefollowingsystems:
12
VMware, Inc.
Deploy vMA
YoucandeployvMAbyusingafileorfromaURL.Ifyouwanttodeployfromafile,downloadandunzipthe vMAZIPfilebeforeyoustartthedeploymentprocess. IMPORTANTYoucannotupgradeanearlierversionofvMAtovMA5.0.YoumustinstallafreshvMA5.0 instance. To deploy vMA 1 2 3 UseavSphereClienttoconnecttoasystemthatisrunningthesupportedversionofESXiorvCenter Server. IfconnectedtoavCenterServersystem,selectthehosttowhichyouwanttodeployvMAintheinventory pane. SelectFile>DeployOVFTemplate. TheDeployOVFTemplatewizardappears. 4 5 6 7 8 SelectDeployfromafileorURLifyouhavealreadydownloadedandunzippedthevMAvirtual appliancepackage. Click Browse,selecttheOVF,andclickNext. ClickNextwhentheOVFtemplatedetailsaredisplayed. AcceptthelicenseagreementandclickNext. Specifyanameforthevirtualmachine. Youcanalsoacceptthedefaultvirtualmachinename. 9 Selectaninventorylocationforthevirtualmachinewhenprompted. IfyouareconnectedtoavCenterServersystem,youcanselectafolder. 10 IfconnectedtoavCenterServersystem,selecttheresourcepoolforthevirtualmachine. Bydefault,thetoplevelrootresourcepoolisselected. 11 12 13 Ifprompted,selectthedatastoretostorethevirtualmachineonandclickNext. SelecttherequireddiskformatoptionandclickNext. SelectthenetworkmappingandclickNext. IMPORTANTEnurethatvMAisconnectedtothemanagementnetworkonwhichthevCenterServer systemandtheESXihoststhatareintendedvMAtargetsarelocated. 14 ReviewtheinformationandclickFinish. ThewizarddeploysthevMAvirtualmachinetothehostthatyouselected.The deployprocesscantake severalminutes. NextyouconfigureyourvMAvirtualmachine.YouperformthistaskwhenyoulogintovMAthefirsttime.
VMware, Inc.
13
ThewebUIenablesyoutodothefollowingtasks:
14
VMware, Inc.
ThevMAconsoledisplaysamessagestatingwhethervMAhaslefttheActiveDirectorydomain.
OnvMA,createascriptin/etc/cron.hourly/kticket-renewwiththefollowingcontents:
#!/bin/sh su - vma-dc\\foo -c '/usr/bin/kinit -k -t /home/local/VMA-DC/foo/foo.keytab foo'
Thisscriptwillrenewtheticketfortheuserfooeveryhour. Youcanalsoaddtheabovescripttoaservicein/etc/init.dtorefreshtheticketswhenvMAisbooted.
VMware, Inc.
15
AftertheviuseraccountisenabledonvMA,ithasnormalprivilegesonvMAbutisnotinthesudoerslist. WhenyouaddESXitargetservers,vMAcreatestwousersoneachtarget:
WhenauserisloggedintovMAasviuser,vMAusesthataccountontargetESXihosts,andtheusercanrun onlycommandsontargetESXihoststhatdonotrequireadministrativeprivileges.
16
VMware, Inc.
Setthetargetasthedefaultforthecurrentsession:
vifptarget --set | -s <server>
VerifythatyoucanrunavSphereCLIcommandwithoutauthenticationbyrunningacommandonone oftheESXihosts,forexample:
esxcli --server <VC_server> --vihost <esx_host> network nic list
Thecommandrunswithoutpromptingforauthenticationinformation. IMPORTANTIfthenameofatargetserverchanges,youmustremovethetargetserverbyusingvifp removeserverwiththeoldname,thenaddtheserverusingvifp addserverwiththenewname. To add a vCenter Server system as a vMA target for fastpass Authentication 1 2 LogintovMAasviadmin. AddaserverasavMAtargetbyrunningthefollowingcommand:
vifp addserver vc2.mycomp.com --authpolicy fpauth
Specifythepasswordforthatuserwhenprompted.
user1@machine.company.com's password: <not echoed to screen>
Reviewandacceptthesecurityriskinformation.
VMware, Inc.
17
Verifythatthetargetserverhasbeenadded. Thedisplayshowsalltargetserversandtheauthenticationpolicyusedforeachtarget.
vifp listservers --long server1.mycomp.com server2.mycomp.com server3.mycomp.com vc1.mycomp.com vc2.mycomp.com ESX ESX ESXi vCenter vCenter adauth fpauth adauth adauth fpauth
Setthetargetasthedefaultforthecurrentsession.
vifptarget --set | -s <server>
VerifythatyoucanrunavSphereCLIcommandwithoutauthenticationbyrunningacommandonone oftheESXihosts,forexample:
esxcli --server <VC_server> --vihost <esx_host> network nic list
Thecommandrunswithoutpromptingforauthenticationinformation. IMPORTANTIfthenameofatargetserverchanges,youmustremovethetargetserverbyusingvifp removeserverwiththeoldname,thenaddtheserverusingvifp addserverwiththenewname. To add an ESXi host as a vMA target 1 2 LogintovMAasviadmin. RunaddservertoaddaserverasavMAtarget.
vifp addserver <servername>
Youarepromptedforthetargetserversrootuserpassword.
root@<servername>s password:
Verifythatthetargetserverhasbeenadded:
vifp listservers
Setthetargetasthedefaultforthecurrentsession.
vifptarget --set | -s <server>
VerifythatyoucanrunavSphereCLIcommandwithoutauthenticationbyrunningacommand,forexample:
esxcli network nic list
18
VMware, Inc.
Verifythatthetargetserverhasbeenadded:
vifp listservers
Runvifptarget.
vifptarget -s <server2>
Whenprompted,provideyourcredentials.
Whenprompted,provideyourcredentials.
VMware, Inc.
19
TheRecentTaskspanelofthetargetserverdisplaysinformationabouttheviadminandviuserusersthat arebeingremoved.TheUsersandGroupspanelofthetargetservernolongerdisplaystheusers.
Modifying Scripts
YoucanmodifyserviceconsolescriptstorunfromvMA.
ProgrammaticconnectionInPerlscriptsorJavaprograms,youcancallVmaTarget.login() method of VmaTargetLibandspecifythehosttoconnectto.Thedirectory/opt/vmware/vma/samplescontains examplesinPerlandJava.vMAhandlesauthenticationiftheserverhasbeenestablishedasatarget server.ProgramscanuseVmaTargetLiblibrarycommands.SeeUsingtheVmaTargetLibLibraryon page 33. NoprocnodesSomeserviceconsolescriptsstilluseVMwareprocnodes,whichwereofficiallymade obsoletewithESXServer3.0andarenotavailableinESX/ESXi4.0andlater.Youcanextractinformation thatwasavailableinVMwareprocnodesusingthevSphereCLIcommandsavailableonvMA. TargetspecificationYoumustspecifythetargetserverwhenyouruncommandsorscripts.
20
VMware, Inc.
Table 22liststhevMAcomponentsthatyoucanuseformodifyingscriptsthatincludeprocnodesandLinux commands. Table 2-2. vMA Components for Use in Scripts
vMA Component vSphereCLIcommands vifsvSphereCLI command vSphereSDKforPerl Description ManageESXihostsandvirtualmachines. Performcommonoperations,suchascopy,remove, get,andput,onfilesanddirectories. AccessthevSphereAPI,aWebservicesbasedAPIfor managing,monitoring,andcontrollingthelifecycleof allvSpherecomponents. Performcommonadministrativetasks. For more information vSphereCommandLineInterface InstallationandReferenceGuide. vSphereCommandLineInterface InstallationandReferenceGuide. vSphereSDKforPerlProgramming Guide. vSphereSDKforPerlUtility ApplicationsReference. CommandsareonvMAin /usr/lib/vmware-vcli/apps vSphereSDKforPerlWS Managementcomponent AccessCIM/SMASHdata.ESXisupportsmany SystemsManagementArchitectureforServer Hardware(SMASH)profiles,enablingsystem managementclientapplicationstocheckthestatusof underlyingservercomponentssuchasCPU,fans, powersupplies,andsoon. vSphereSDKforPerlProgramming Guide.
vSphereSDKforPerl utilityapplications
4 5
VMware, Inc.
21
ClickSaveSettings.
22
VMware, Inc.
Delete vMA
IfyouintendtodeployanewerversionofvMA,orifyounolongerneedvMA,youcandeletethevMAvirtual machine. IMPORTANTIfyoudeletevMAwithoutremovingallservers,theviadminandviuserusersremainonthe targetESXihosts.ThenexttimeyouaddthehosttoavMAinstance,vMAcreatesausernamewithadifferent numericextension. To delete the vMA virtual machine 1 2 3 4 RemoveallvMAtargetserversyouadded.SeeRemoveTargetServersfromvMAonpage 20. ShutdownvMA. PoweroffthevirtualmachinebyusingthevSphereClient. InthevSphereClient,rightclickthevirtualmachineandselectDeletefromDisk.
VMware, Inc.
23
Troubleshooting vMA
YoucanfindtroubleshootinginformationforallVMwareproductsinVMwareKnowledgeBasearticlesand informationaboutvMAknownissuesinthereleasenotes.Table 23explainsafewcommonlyencountered issuesthatareeasilyresolved. Table 2-3. Troubleshooting vMA
Issue YoucandeployvMAbutwhenyoustartupthevirtual machine,anerroroccurs. YouaddaserverbutthevSphereCLIcommandorPerl scriptstillpromptsforauthentication. Youhaveaddedmultipleservers.Youdonotknow wherevMArunsvSphereCLIcommandsifyoudonot specify--server. YouwanttoenableDNSresolutioninvMA. Resolution Checkwhetheryoursetupmeetsthehardwareandsoftware requirementslistedinHardwareRequirementson page 12. Runviftargetforthetargetserver. Afteracalltovifptarget,yourpromptchangestoinclude thecurrenttarget. YoucanconfiguretheDNSresolutionnameserverforvMA byupdatingthe/etc/resolv.conffile.Addthefollowing lineforeachDNSserverinyournetwork: nameserver <dns server ip address> Typeman resolv.conffordetailsonthatfile. IfvMAissetupforDHCP,andthenetworkisrestarted, changesyoumadeto/etc/resolv.confarelost. ProblemswhileaddingActiveDirectorytarget orconfiguringvMAforActiveDirectory. IfyouareunabletoauthenticatefromvMAorcannotadd vMAtothedomaincontroller,checkthefollowing:
YourDNSserversetupinvMAresolvestheIPaddressor hostnameofthevCenterservertoanFQDNandthe FQDNcontainsthedomainnametowhichvMAis added. Thevifp listservercommandshowsthenameof vCenterastheFQDNthatcontainsthedomainnameto whichvMAisaddedasthesuffix. ThedateandtimesettingsonvMA,thedomain controllerandvCenterServerareidentical.Checkthe timezoneaswell.Thetimemaynotexactlybethesame butmayvarybyanhour.However,alargeskewinthe timemaycauseauthenticationproblems.
ThisreleaseofvMAprovidesthevma-supportscriptthatenablesyoutocollectvarioussystemconfiguration informationandotherlogs.Youcanrunthisscriptbyissuingthefollowingcommand:
> sudo vma-support
Thescriptgeneratestheinformationandlogbundleandappendsittothevmware.logfileontheESXihost onwhichvMAisdeployed.
Update vMA
YoucandownloadsoftwareupdatesincludingsecurityfixesfromVMwareandcomponentsincludedinvMA, suchastheSUSELinuxEnterpriseServerupdatesandJRE. IMPORTANTYoucannotupgradeapreviousversionofvMAtovMA5.0.YouneedtoinstallvMA5.0. To update vMA 1 2 3 AccesstheWebUI. Loginasviadmin. ClicktheUpdatetabandthentheStatustab.
24
VMware, Inc.
4 5 6
VMware, Inc.
25
26
VMware, Inc.
vMA Interfaces
VMware, Inc.
27
Usage
vifptarget --set | --clear | --display | --help | -s <server> -c -d -h
Description ThevifptargetcommandenablesseamlessauthenticationforremotevSphereCLIandvSphereSDKforPerl commands. Youcanestablishmultipleserversastargetservers,andthencallvifptargetoncetoinitializeallserversfor vifastpassauthentication.Youcanthenruncommandsagainstanytargetserverwithoutadditional authentication.Youcanusethe--serveroptiontospecifytheservertoruncommandson. ThevMApromptdisplaysthecurrentdefaultexecutionserver.Ifyouremovethatdefaultserver,theserver nameisremovedfromthepromptbutthevifastpassenvironmentisnotclearedandthevCLIcommandscan stillrunseamlesslyagainstallthetargets. WhilehostsremaintargetserversacrossvMAreboots,youmustrunvifptargetaftereachlogouttoenable vifastpassforvSphereCLIandvSphereSDKforPerlcommands. Options
Option set display clear help Description Initializesthefastpasstarget. Displaystheinitializedfastpasstarget. Clearsthevifastpassenvironment. Displayhelpforthecommand.
Example vifptarget --set | -s <server> Initializesthefastpasstarget. vifptarget --display | -d Displaystheinitializedfastpasstarget. vifptarget --clear | -c Clearsthevifastpassenvironment.
vifp addserver
AddsavCenterServersystemorESXihostasavMAtargetserver. Usage
vifp addserver <server> [--authpolicy <fpauth | adauth>] [--protocol <http | https>] [--portnumber <portnum>] [--servicepath <servicepath>] [--username <username>] [--password <password>]
28
VMware, Inc.
Example
vifp addserver my_vCenter
AddsavCenterServersystemasavMAtarget.Youarepromptedforausernameandpassword.Theuser musthaveloginprivilegesonthevCenterServersystem.
vifp addserver myESX42
AddsanESXihosttovifastpass.Youarepromptedfortherootpasswordforthetargetsystem.
vifp removeserver
RemovesaspecifiedvMAtargetthatwaspreviouslyaddedwithvifp addserver. IfthetargetisanESXisystem,youneedsuperuserprivilegesforremoval.IfthetargetisavCenterServer system,anyuserwithconnectionprivilegescanremovethetarget.Youonlyhavetospecifythe<server> option,withoutthepassword.
VMware, Inc.
29
Usage
vifp removeserver <server> [--protocol <http | https>] [--portnumber <portnum>] [--servicepath <servicepath>] [--username <username>] [--password <password>] [--force]
Examples
vifp removeserver <vCenter_Address>
RemovesavCenterServersystem.Youarenotpromptedforapassword.
vifp removeserver <esxi_Address>
RemovesanESXihost.
vifp rotatepassword
Specifiesviadminandviuserpasswordrotationparameters. IMPORTANTThiscommandappliesonlytoESXitargetserverswiththefpauthauthenticationpolicy.You cannotrotatepasswordsfortargetswithadauthauthenticationpolicyandforvCenterServertargets. Usage
vifp rotatepassword [--now [--server <server>] | --never | --days <days>]
30
VMware, Inc.
Options
Option now server never days Description Immediatelyrotatesthepasswordforallserversoraspecifiedserver. ESXihostforwhichyouwanttorotatethepassword.Use--serveronlywith--now. Neverrotatethepasswordforanytargetserver. Rotatethepasswordforalltargetserversafterthespecifiednumberofdays.
Examples
vifp rotatepassword --now
ImmediatelyrotatespasswordsofallESXivMAtargetservers.
vifp rotatepassword --now --server <server_address>
Immediatelyrotatesthepasswordofaspecificserver.
vifp rotatepassword --days 7
SetsthepasswordrotationpolicytorotatethepasswordofallESXivMAtargetseverysevendays. Forexample,ifyouaddserver1on9/1,andserver2on9/2,andrunvifp rotatepassword --days 7,vMA rotatesthepasswordforserver1atmidnighton9/8andthepasswordforserver2atmidnighton9/9.vMA rotatestheserver1passwordagainon9/15andtheserver2passwordagainon9/16.Ifyouthenrunvifp rotatepassword --days 3,vMArotatestheserver1passwordon9/18andtheserver2passwordon9/19.
vifp rotatepassword
Displaysthecurrentpasswordrotationpolicy.
vifp listservers
Liststargetsystems. Usage
listservers [-l | --long]
ListsallserversthatarevMAtargets,forexample:
server1.mycomp.com server2.mycomp.com server3.mycomp.com vc42.mycomp.com ESX ESX ESXi vCenter fpauth adauth fpauth adauth
VMware, Inc.
31
vifp reconfigure
Reconfigurestargetsystems.ThiscanbedonetochangeauthenticationpolicyortheconfiguredActive Directoryuser. Usage
reconfigure <server> [--authpolicy <fpauth | adauth>] [--protocol <http | https>] [--portnumber <portnum>] [--servicepath <servicepath>] [--username <username>] [--password <password>]
32
VMware, Inc.
SeetheVmaTargetLibjavalibraryforamoredetailedreferencetotheJavainterface.Youcanfindsamplesin /opt/vmware/vma/samples.
VmaTargetLib Reference
YoucanusethefollowingVmaTargetLibcommandsinPerlorJavaprograms.
Enumerating Targets
Usage Perl Java Description ReturnsalistoftargetvCenterServerorESXisystemsaddedtothevMAinstancebyusingvifp addserver. Options None Returns Returnsalistofalltargetservers.
enumerate_targets() enumerateTargets()
Querying Targets
Usage Perl Java Description Allowsthecaller,forexample,anagent,toretrievelogincredentialsfromavMAtargetandusethose credentialstoconnecttothevMAtarget. Options
Option servername Description OneoftheserversaddedtothisvMAinstanceusingvifp addserver.CanbeanESXihostor avCenterServersystem. query_target (<servername>) queryTarget (string <servername>)
Returns ReturnsaspecificvMAtargetserver.
VMware, Inc.
33
Programmatic Login
Usage Perl Java Description Allowsaprogramtologintoatargetserverprogrammatically. Options
Option service svcRef servername Language Java Java Java,Perl Description Javaserviceinstance. JavaserviceManagedObjectReference. OneoftheserversaddedtothisvMAinstanceusingvifp addserver. VmaTarget.login() VmaTarget.login()
Returns Returns1ifsuccessfuland0otherwise.
Programmatic Logout
Usage Perl Java Description Allowsaprogramtologoutofatargetserverprogrammatically. Options
Option servername Language Java,Perl Description OneoftheserversaddedtothisvMAinstanceusingvifp addserver. VmaTarget.logout() VmaTarget.logout()
34
VMware, Inc.
Index
A
adding target servers 17 addserver command 28 authentication component 8 authentication prerequisites 12
R
removeservers command 29 removing target servers 20 root user account 12 rotatepassword command 30 rotatepassword example 31
C
configuring vMA 16
S
scripts, modifying 20 shutting down vMA 23 storage required for vMA 12 sudo 12
D
deleting vMA 23 deploying vMA 13 DNS resolution 24
T E
ESXi systems, vMA target 18 example sequence 32 target servers commands 28 multiple 19 name change 17, 18 removing 20 single 17 technical support resources 6 troubleshooting vMA 24
H
hardware prerequisites 12 host name 14
I
initialization 27
U
user account privileges 16
J
Java JRE 8
L
listservers command 31 localhost 20
V
vCenter Server systems, vMA target 17 VI CLI vifptarget 27 vifs 20 without vi-fastpass 19 vi-admin privileges 16 setting password 14 vi-fastpass initialization 27 overview 8 vifp addserver 28 vifp listservers 31 vifp removeserver 29 vifp rotatepassword 30 vifp target management 28 vifptarget command 27 vifs command 20
M
modifying scripts 20 multiple target servers 19
N
name change 17, 18 network configuration 13 network setup 13
P
passwords ESXi hosts 12 vCenter Server systems 12 proc nodes 20
VMware, Inc.
35
vi-user privileges 16 setup 16 vMA component overview 8 getting started 11 interface overview 27 samples 9 use cases 9 vMA targets ESXi systems 18 vCenter Server systems 17 VmaTargetLib 33 VMware Tools 8 vSphere CLI 8 vSphere SDK for Perl 8
36
VMware, Inc.