Working with vSphere Management assistant

Before I talk about the various commands we can use with VMA , first let me explain bit about VMA.”vSphere Management Assistant enables administrators to run scripts or agent that interact with ESXi host and VMware vCenter server systems without authenticating each time. VSphere Management Assistant is easy to download and install, and configure through vSphere Web Client.

vSphere Management assistant is a virtual appliance that consist of following components:

– SUSE Linux Enterprise Server

– vmware tools

– vSphere SDK for Pearl

– vSPhere CLI

– Java JRE Version 1.6

– vi-fastpass , an authentication component for the appliance

vSphere Management Assistant requires ESXi Host that supports 64-bit virtual machines. The CPU on the ESXi host must be AMD opetron , rev E or later, or an Intel processor with EM64T support with VT enabled.by default vSphere Management Assistant uses 1 vCPU , 600 MB RAM and 3 GB of virtual disk. VSphere Management Assistant is used with vSphere 5.x or 6.

Let’s get started now.

  • Start SSH and vSphere ESXi Shell Services on the ESXi host you want to manage from vSphere Management assistant
  • Login to VMware vSphere Management Assistant, You use PuTTY to establish an SSH session to the VMware vSphere Management Assistant appliance.
  • using vi-admin as the user name and password that you have set during the initial power on the appliance1.png
  • Now we need to add vCenter Server systems and ESXi hosts as vSphere Management Assistant target servers to simplify commands
  • Add the vCenter Server system as a server target.
  • vifp addserver vc01.vclass.local –authpolicy fpauth –username administrator@vsphere.local
  • Any user with sufficient vCenter Server privileges can be specified, including VMware vCente  Single Sign-On users. The vSphere administrator user name is used here because it is the default vCenter Server Appliance administrator account.
  • When prompted for a password, enter the password you have set
  • When prompted to store the user name and password in the credential store, enter yes.2
  • Add the ESXi host as a server target.
  • vifp addserver esxi01.vclass.local –authpolicy fpauth –username root
  • When prompted for a password, enter password yo have set3
  • List the configured target servers.
  • vifp listservers
  • vCenter Server system and the ESXi host appear in the list.vc01.vclass.local   and esxi01.vclass.local must be listed4
  • Now I will add ESXi host thumbprint to the certificate store on the vCenter Server system so that a trust relationship exists between the host and the server. This trust relationship is necessary to run ESXCLI commands.
  • Let me show what happens when I run the command without adding ESXi host thumbprint to the certificate store on the vCenter Server system5
  • Add the ESXi host thumbprint to the vCenter Server certificate store.
  • /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add -s esxi01.vclass.local -t thumbprint
  • thumbprint is displayed in the last command. You can copy the thumbprint into the command by selecting and right-clicking it.6
  • Now you can use ESXCLI commands to query the ESXi host properties , I will show you some important command that you can use in day to day administration of vSphere environment
  • Set the ESXi host as the current target server.
  • vifptarget -s esxi01.vclass.local
  • As a result of running the command, the name of the target server appears as part of the command prompt.81.Display the CPU characteristics of the ESXi host.
  • esxcli hardware cpu list9
  • Use the command output to determine CPU characteristics.
  • Number of CPUs installed on the host
  • Brand of the first CPU
  • Family and model of the first CPU
  •  Core speed of the second CPU
  • 2.Display the ESXi host memory.
  • – esxcli hardware memory get10
  • Use the command output to determine memory characteristics.
  • Amount of physical memory
  • NUMA node count
  • 3.Display the platform on which the ESXi software is installed.
  • esxcli hardware platform get11
  • Use the command output to determine platform characteristics.
  • Product name
  • IPMI supported status
  • 4.List the software version of ESXi that is installed on the host.
  • esxcli system version get125.Display the time and date on the host.
  • esxcli hardware clock get

    6.Determine the system host name.

  • esxcli system hostname get

    7.Determine the system’s boot device.

  • esxcli system boot device get15 8.Last command i want to highlight is vicfg-ntp commands in the vSphere Management Assistant which you can use to query and configure Network Time Protocol (NTP) settings.
  • (i) List the NTP servers that are configured onesxi01.vclass.local.
  • vicfg-ntp –list
  • NTP servers are not yet configured.16
  • (ii)  top the NTP service.
  • vicfg-ntp –stop
  • (iii) Add an NTP server.
  • vicfg-ntp –add 172.20.10.5

    17

  • (iv) List the configured NTP server.
  • vicfg-ntp –list18.png
  • (v) Start the NTP service.
  • vicfg-ntp –start

 

One thought on “Working with vSphere Management assistant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s