Wednesday 27 October 2010

Using vMA 4.1

In my previous post I showed you how to configure vMA 4.1 and integrate it into your existing network.  This post is all about actually using the vMA appliance and running commands against remote ESX/ESXi servers.
You can connect to your vMA server using either the vSphere client console or putty.  Putty is a free telnet/ssh client and is my preferred choice.  Download the .exe and connect to the IP address of your vMA appliance:
Login with the username vi-admin and password you configured in the previous post.  Once you have successfully authenticated you will see the vMA command line:
First thing we are going to do is enable the vi-user account.  This account has limited privileges on the ESX/ESXi systems and cannot run any vilogger commands or any commands that require sudo execution.
Run the following linux command to set a password for the vi-user account.  After you run the command you will be prompted to enter a new password and confirm it:
sudo passwd vi-user
After the vi-user account has been enabled it will have normal privileges on the vMA but it is not in the sudoers list.  The vi-user account will also have read only privileges on the target ESX/ESXi systems.  To make any configuration changes on target ESX/ESXi systems you will have to use the vi-admin account.
We are now going to add an ESXi system as a target for the vMA.  Login to the vMA as the vi-admin user account and enter the following command:
vifp addserver <Server>
When prompted enter the servers root password to authenticate.  The vMA will authenticate and add two users accounts to the host.  The vi-admin and vi-user will be added to the host and the encrypted password will be stored in the VMware credential store:
Connecting directly to the host using the vSphere client and viewing the Local Users & Groups shows that the two accounts have been added to the host:
To verify that the target server has been added issue the following command:
vifp listservers
To set the target as the default host for the current session issue the following command:
vifptarget –s <Server>
As you can see, the command prompt has changed to show that you are now under the context of the ESX1.m80arm.local host.  This shows that you are connected to that host and any command that you issue will be run on that host.  The command issued below lists the physical network cards of the ESXi host:
In order to remove a server as a target from the vMA simply issue the following command:
vifp removeserver <server>
This post is a simple guide on how to add a remote ESX/ESXi host as a target to your vMA and run a simple command against the host remotely.  Obviously this is more directed towards ESXi which doesn’t have service console rather than ESX.  You could, if you wish use Active Directory to authentication against your vMA and against you ESX/ESXi servers.  I recommend you read the vSphere Management Assistant Guide for more information and advanced options.  In the next post I’ll show you how to configure your vMA to retrieve logs files from ESX/ESXi servers.

No comments:

Post a Comment