- Install and configure vMA
- Add/Remove target servers (Note: This Objective has been updated per 21-01-2013)
- Perform updates to the vMA
- Use vmkfstools to manage VMFS datastores
- Use vmware-cmd to manage VMs
- Use esxcli to manage ESXi Host configurations
- Troubleshoot common vMA errors and conditions
Install and configure vMA
vSphere Management Assistant Guide vSphere 5.0, Chapter 2 “Getting started with the vMA”, section “Deploy vMA”.
The vSphere Management Assistant (vMA from now on) and the documentation can be found at: http://www.vmware.com/support/developer/vima/
Note: multiple versions are available! You can deploy vMA 5.0 on vSphere 4.0 Update 2 or later (no vSphere 5.1) and vCenter Server 4.0 Update 2 or later. The vCenter Appliance 5.0 is also supported. After installation, you can target even ESX/ESXi 3.5 Update 5 servers.
The vMA comes as a SUSE Linux Enterprise Server 11‐based virtual machine that includes pre-packaged software such as the vSphere command‐line interface, and the vSphere SDK for Perl. The vMA allows administrators to run scripts or agents that interact with ESXi hosts and vCenter Server systems without having to authenticate each time. The vMA comes as a virtual appliance
Under normal conditions, you will deploy the vMA in your cluster. Another way is to deploy vMA on your workstation and take it with you, with your own tools and scripts.
- Hardware requirements are minimal; the ESXi host must support 64-bit virtual machines. The vMA requires one vCPU, 600 MB of memory and 3 GB storage.
- You can deploy vMA by using a file or from a URL.
- The deployment process should be familiar.
- At the “Network Mapping” windows, select as the “Destination Networks”, the management network on which the vCenter Server and the ESXi hosts reside.
You can ignore the warning considering IP Pools.
- Unless you work with IP Pools, you must choose the “Fixed” option in the “IP Address Allocation” window. If you are interested in IP Pools, read this excellent post by Chris Wahl.
- To avoid this message on first boot…
- There are two options:
– configure IP Pools, see VMware KB 2007012.
– disable the vApp options in the config of the VM.
- Now it is time to boot the vMA for the first time, the vMA will ask for the network configuration. Answer the first two questions with ‘No’ and provide IP Address, Netmask, gateway, DNS servers, hostname and finally proxy settings.
- Review the provided information and continue
- Next you are prompted to provide a strong password for the vi-admin account. The expected ‘root’ account is not available; instead the vi-admin account has the highest privilege level.
- At this point, things become more relaxing.
- You can choose to login, but a better option is to start a browser and enter the provided URL, do not forget to provide 5480 as the port number.
- From here you can adjust the Time Zone, network settings and reboot or shutdown the vMA.
- It is also a good idea to join the vMA to the Active Directory
At the console run this command:
> sudo domainjoin-cli join <domain-name> <domain-admin-user>
- Provide the Active Directory administrator’s password.
- After joining, you can check the status:
- This concludes the installation and basic configuration.
Note: Besides the vi-admin account, there is also a less privileged user account; vi-user.
- The post “Getting started with vMA5” on Virten.net, describes the installation process in great detail. This post also provides information on how to configure the vMA for Active Directory Authentication.
- VMware KB 2007012 “Powering on a VMware vSphere Management Assistant appliance virtual machine fails with the error: Cannot initialize property ‘vami.DNS0.vsphere_Management_Assistance_(vMA)’”
- My Post “vi-admin password reset on a vMA 5”
Add/Remove target servers
vSphere Management Assistant Guide vSphere 5.0, Chapter 2 “Getting started with the vMA”, section “Add Target Servers to the vMA”.
Note: This Objective has been updated per 21-01-2013.
The official documentation presents three examples on how to add a vCenter Server or an ESXi host as a vMA target. Unfortunately the examples given did not completely work to my expectations.
Sometime later I stumbled on a series of excellent blog post written by the great William Lam at Virtuallyghetto.com. Although these posts have been written for vSphere 4.1, they can be used in vSphere 5.x without the slightest change.
It does not make sense (and is not very decent to the Netiquette) to rewrite these post.
The first post “How to configure and use vMA’s vi-fastpass with fpauth and adauth on vSphere 4.1” explains the vi-fastpass mechanism and the two authentication modes:
Section “Configuring vMA vi-fastpass using fpauth (fastpass authentication)” details how to add an ESXi host and a vCenter Server using fpauth.
The final part “Configuring vMA vi-fastpass using adauth (Active Directory authentication)” explains how to:
- prepare the ESXi hosts by joining them to the domain
- organize the domain users
- add the vMA to the domain
- start using vifptarget on ESXi hosts or vCenter and execute commands
A second post “vMA 4.1 – Authentication Policy (fpauth vs adauth)”, dives deeper into the details. Most important questions:
- What user context are you trying to execute a command against a target?
- What authentication policy was used to add the target to vMA?
- Is vMA host joined to an Active Directory Domain?
Examples explain the differences.
On Virtuallyghetto.com you will find even more posts, for instance regarding the product Likewise (the product that joins the vMA to an Active Directory) and more.
Perform updates to the vMA
vSphere Management Assistant Guide vSphere 5.0, Chapter 2 “Getting started with the vMA”, section “Update vMA”.
You can download software updates including security fixes from VMware and the components included in vMA. The first option is to use the vMA Web GUI.
1 Access the Web UI.
2 Log in as vi‐admin.
3 Click the Update tab and then the Settings tab.
4 Open the Settings tab and then from the Update Repository section, select a repository.
3 Click the Status tab.
5 Click Check Updates, to check for new updates.
6 Click Install Updates (if available).
Another way is using the VMware Update Manager. For detailed instructions, see my post on “VCAP5-DCA Objective 5.2 -Deploy and Manage complex Update Manager environments”, section on “Upgrade vApps using Update Manager”.
You can also configure the vMA for Automatic Updates:
Use vmkfstools to manage VMFS datastores
vSphere Storage Guide, Chapter 22,”Using vmkfstools”, page 205.
The vmkfstools command is also part of the vMA.
See also section “Configure and troubleshoot VMFS datastores using vmkfstools” in Objective 6.4.
Use vmware-cmd to manage VMs
vSphere Command-Line Interface Concepts and Examples, Chapter 8, chapter 8 “Managing Virtual Machines”, page 101.
As the vSphere Command-Line Interface Concepts and Examples document states:
You can manage virtual machines with the vSphere Client or the vmware-cmd vCLI command. Using vmware-cmd you can register and unregister virtual machines, retrieve virtual machine information, manage snapshots, turn the virtual machine on and off, add and remove virtual devices, and prompt for user input.
Also from the official documentation:
IMPORTANT: vmware-cmd is a legacy tool and supports the usage of VMFS paths for virtual machine configuration files. As a rule, use datastore paths to access virtual machine configuration files.
As you already would have expected, the vmware-cmd command is also part of the vMA.
Have a look at the command options. Personally, I would invest my time in the esxcli command.
Use esxcli to manage ESXi Host configurations
vSphere Command-Line Interface Concepts and Examples and
Getting Started with vSphere Command-Line Interfaces
Both documents provide a lot of information about the various vSphere Command-Line interfaces. The ESXCLI command is a comprehensive set of commands for managing most aspects of vSphere. In the latest release, the command set has been unified. Eventually, ESXCLI commands will replace other commands in the vCLI set.
“Getting Started with vSphere Command-Line Interfaces”, provides the ESXCLI command hierarchy.
“vSphere Command-Line Interface Concepts and Examples”, chapter 1 provides an overview of the available vSphere CLI commands. The next chapters discuss available commands for managing Hosts, Files, Storage, Networking, etc.
- My post “Mindmapping the ESXCLI command”
Troubleshoot common vMA errors and conditions
vSphere Management Assistant Guide vSphere 5.0, Chapter 2 “Getting started with the vMA”, section “Troubleshooting vMA”.
This section explains a few commonly encountered issues that are easily resolved. For all other issues, VMware recommends browsing the KB database.