5.0
Table Of Contents
- vSphere Management Assistant Guide
- Contents
- About This Book
- Introduction to vMA
- Getting Started with vMA
- Hardware Requirements
- Software Requirements
- Required Authentication Information
- Deploy vMA
- Configure vMA at First Boot
- vMA Console and Web UI
- Configure vMA for Active Directory Authentication
- Configure Unattended Authentication for Active Directory Targets
- Enable the vi-user Account
- vMA User Account Privileges
- Add Target Servers to vMA
- Running vSphere CLI for the Targets
- Reconfigure a Target Server
- Remove Target Servers from vMA
- Modifying Scripts
- Configure vMA to Use a Static IP Address
- Configure vMA to Use a DHCP Server
- Setting the Time Zone
- Shut Down vMA
- Delete vMA
- Troubleshooting vMA
- Update vMA
- Configure Automatic vMA Updates
- vMA Interfaces
- Index
VMware, Inc. 33
Chapter 3 vMA Interfaces
Using the VmaTargetLib Library
TheVmaTargetLib libraryallowsyoutoprogrammaticallyconnecttovMAtargetsbyusingPerlorJava.
AgentscanlinkwithVmaTargetLib
andusevi‐fastpassfunctionality.TheVmaTargetLiblibraryallowsyou
toenablevi‐fastpassauthenticationandtoqueryorlistoneormoretargetswiththefollowingcommands:
EnumerateTargets–RetrievesalistofallserversthatarevMAtargets.
QueryTarget–Retrievesconnectioninformationforatargetserver.
Login–Connectstoatargetserver.
Logout–Logsyououtofthetargetserver.
SeetheVmaTargetLibjavalibraryforamoredetailedreferencetotheJavainterface.Youcanfindsamplesin
/opt/vmware/vma/samples.
VmaTargetLib Reference
YoucanusethefollowingVmaTargetLibcommandsinPerlorJavaprograms.
Enumerating Targets
Usage
Description
ReturnsalistoftargetvCenterServerorESXisystemsaddedtothevMAinstancebyusingvifp addserver.
Options
None
Returns
Returnsalistofalltargetservers.
Querying Targets
Usage
Description
Allowsthecaller,forexample,anagent,toretrievelogincredentialsfromavMAtargetandusethose
credentialstoconnecttothevMAtarget.
Options
Returns
ReturnsaspecificvMAtargetserver.
Perl
enumerate_targets()
Java
enumerateTargets()
Perl
query_target (<servername>)
Java
queryTarget (string <servername>)
Option Description
servername OneoftheserversaddedtothisvMAinstanceusingvifp addserver.CanbeanESXihostor
avCenterServersystem.