vMA Component Overview
When you install vMA, you are licensed to use the virtual machine that includes all vMA components.
vMA includes the following components.
vSphere CLI – Commands for managing vSphere from the command line. See the vSphere Command-Line Interface Installation and Reference Guide.
vSphere Authentication Mechanism
vMA’s authentication interface allows users and applications to authenticate with the target servers using vi-fastpass or Active Directory. While adding a server as a target, the Administrator can determine if the target needs to use vi-fastpass or Active Directory authentication. For vi-fastpass authentication, the credentials that a user has on the vCenter Server system or ESXi host are stored in a local credential store. For Active Directory authentication, the user is authenticated with an Active Directory server.
When you add an ESXi host as a fastpass target server, vi-fastpass creates two users with obfuscated passwords on the target server and stores the password information on vMA:
The creation of vi-admin and vi-user does not apply for Active Directory authentication targets. When you add a system as an Active Directory target, vMA does not store any information about the credentials. To use the Active Directory authentication, the administrator must configure vMA for Active Directory. For more information on how to configure vMA for Active Directory, see Configure vMA for Active Directory Authentication.
After adding a target server, you must initialize vi-fastpass so that you do not have to authenticate each time you run vSphere CLI commands. If you run a vSphere CLI command without initializing vi-fastpass, you will be asked for username and password.
You can initialize vi-fastpass by using one of the following methods:
Run vifptarget. For more information about this script, see vifptarget Command for vi-fastpass Initialization.
Call the Login method in a Perl or Java program. For more information about this method, see VmaTargetLib Reference.
After setting up a target using the vifptarget command, you can run vSphere CLI commands or scripts that use vSphere SDK for Perl without providing any authentication information. To run commands against an ESXi host that is managed by a vCenter Server, you can use the --vihost option.
Each time you log in to vMA, you must run the vifptarget command or the Login method once. The target that you specify in the vifptarget command is the default target. Target servers remain targets across reboots. You can override it by using the --server option of the vSphere CLI commands as shown in the following example:
vifptarget -s esx1.foo.com
vicfg-nics -l #lists the nics on esx1.foo.com
vicfg-nics -l --server esx2.foo.com #lists the nics on esx2.foo.com
vMA Samples
vMA samples illustrate the vMA CLIs and the VmaTargetLib library. The samples are available in vMA at /opt/vmware/vma/samples.
bulkAddServers.pl – Perl sample that adds multiple targets to vMA.
mcli.pl – Perl sample that runs a vSphere CLI command on multiple vMA targets specified in a file supplied as an argument. You must run vifptarget before running this script.
listTargets.pl - Perl sample that retrieves information and version of vMA targets using VmaTargetLib.
listTargets.sh - Java sample that demonstrates use of VmaTargetLib.