Knowledge
- Identify vMA prerequisites
- Identify vMA specific commands
- Determine when vMA is needed
Skills and Abilities
- Install and Configure vMA
- Add/Remove target servers
- Perform updates to the vMA
- Use vmkfstools to manage VMFS datastores
- Use vmware-cmd to manage VMs
- Use esxcli to manage Storage Multipathing
- Troubleshoot common vMA errors and conditions
Tools
- vSphere Management Assistant Guide
- vSphere Command-Line Interface Installation and Scripting Guide
- Product Documentation
- vSphere Management Appliance
- vifp (vifpinit has been replaced by vifptarget)
- vima-update
- vSphere CLI
- vicfg-*
- vmkfstools
- esxcli
- vmware-cmd
- vSphere Client
Notes
It is no secret as noted here that the service console is on its way out, so knowledge of command-line based administration and the vMA has become even more important.
The vMA is a CentOS based virtual machine packaged with the vSphere CLI and vSphere SDK for Perl. It allows the ability to run scripts against ESX/ESXi as well as vCenter and now includes Active Directory authentication with the 4.1 release. The vMA can also be used as a syslog server, which is a necessity when using ESXi as the logs are not retained after a reboot.
Before reading through any of the blueprint outline below I would recommend giving the vMA 4.1 guide a quick read. It details all the steps to setup a working vMA appliance. You can download the appliance here. You should also check out these two blog posts:
- Blog on setting up for AD authentication
- Blog on setting up your vMA appliance as a log host (not necessarily relevant to this section of the blueprint but important nonetheless)
Install and Configure vMA
- Pretty straightforward, import the .OVF and follow the prompts.
- Read the blogs mentioned above for setting up AD authentication, which can also be found in the admin guide. AD authentication is new to 4.1 so it is not currently on the blueprint but I imagine it will be added soon.
Add/Remove target servers
- Sudo vifp addserver <FQDN ESX host>
- Sudo vifp remove <FQDN ESX host>
- Sudo vifp reconfigure <FQDN ESX host>
Perform updates to the vMA
- sudo vma-update info
- sudo vma-update scan
- sudo vma-update
Use vmkfstools to manage VMFS datastores
From the vSphere Command-Line Interface Reference: You use the vmkfstools vSphere CLI to create and manipulate virtual disks, file systems, logical volumes, and physical storage devices on an ESX/ESXi host. You can use vmkfstools to create and manage a virtual machine file system (VMFS) on a physical partition of a disk and to manipulate files, such as virtual disks, stored on VMFS-3 and NFS. You can also use vmkfstools to set up and manage raw device mappings (RDMs).
You will want to use this command extensively and go through all of its options.
Use vmware-cmd to manage VMs
- From the vSphere Command-Line Interface Reference: vmware-cmd provides an interface to perform operations on a virtual machine. You can retrieve information such as the power state, register and unregister the virtual machine, set configuration variables, and manage snapshots.
- Again you will need to go through this command and the options extensively. A good example that every VMware admin has encountered at some point, resolving a stuck virtual machine, can be found here.
Use esxcli to manage Storage Multipathing
- Use the vicfg-mpath and vicfg-mpath35 (for esx 3.5 hosts) to configure and manage storage multipathing.
- This blog entry shows off a little PowerShell for setting a preferred path. Most of the reference for storage multipathing will be from the below. Additionally the vSphere Troubleshooting course is a good target for this type of exercise.
- From the vSphere Command-Line Interface Reference: The vicfg-mpath command supports listing information about Fibre Channel or iSCSI LUNs and changing a path’s state.
Troubleshoot common vMA errors and conditions
- Refer to the Troubleshooting vMA section of the vMA Administration Guide
- By far the best resource for vMA information can be found at the blog virtuallyGhetto
Other relevant blogs and websites related to this section
vMA Setup
- http://communities.vmware.com/community/vmtn/vSphere/automationtools/vima
- http://www.vmware.com/support/developer/vima/vma41/doc/vma_41_guide.pdf
- http://geeksilver.wordpress.com/2010/07/22/how-to-use-vma-4-1-installation-configuration/
- http://www.simonlong.co.uk/blog/2010/05/28/using-vma-as-your-esxi-syslog-server/
- http://www.virtuallyghetto.com/2010/05/getting-started-with-vma.html
vmkfstools
- http://pubs.vmware.com/vi35/wwhelp/wwhimpl/common/html/wwhelp.htm?context=server_config&file=sc_appb.21.1.html
- http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/vmkfstools.html
vmware-cmd
- http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/vmware-cmd.html
- http://www.vmware.com/support/esx2/doc/vmware-cmd.html
- http://www.yellow-bricks.com/2009/04/15/the-basics-how-to-kill-a-vm-thats-stuck-during-shutdown/
vicfg-mpath