I must confess that I don’t use ESXCLI very much unless I’m in a situation which forces me to do so. This blog post is more for me as I want to be able to run more commands on a regular basis from ESXCLI or VIFP rather than relie on the GUI.
The vSphere Management Assistant is a free OVF provided by VMware to allow you to access all your ESXi Hosts from a central location to run scripts or CLI commands.
We are going to look at the initial installation and configuration.
VMware require IP Pools to be configured for most of their OVF’s nowadays. Chris Wahl wrote a great blog post on Managing & Configuring IP Pools which is our first step.
Go into the Datacenter Object in vSphere and Select IP Pools Tab then Add
Give the IP Pool a name, Subnet Mask and Gateway
Note: We have specifically chosen not to enable the IP Pool
Then jump over to Associations and associate the IP Pool with a Port Group that your vSphere Management Assistant will reside on.
Once configured it should look something like this.
Install vSphere Management Assistant
The next step is to download the vSphere Management Assistant ZIP file which is located here. As of the time of this blog post the msot recent version is vMA-126.96.36.199-1295338.
Extract the ZIP file to a location of your choice and fire up the vSphere Client. I’m not going to talk you threw how to upload an OVF as it’s a simple case of going to File > Deploy OVF Template > Select Location and following the wizard.
When you get to the IP Address Allocation Policy select ‘Fixed’
On the next page enter the IP Address you are going to assign to your vSphere Management Assistant 5.5
Select ‘Power On After Deployment’ and you are good to go.
Fire up your vSphere Console for the vSphere Management Assistant Console and configure the following items:
- Default Gateway
- Proxy Server (if any)
- IP Address Allocation (eth0)
Once done it should look like this.
Enter 1 and change the password. Note your old password will be ‘vmware’. After this completes you will be able to access the vSphere Management Assistant by going to https://x.x.x.x:5480 to perform maintenance tasks such as appliance updates.
I suggest you login to your vSphere Management Assistant using the URL just to make sure that your password works.
TOP TIP: Your username is vi-admin
vSphere Management Assistant Initial Configuration
Use a client such as Putty to login to your vSphere Management Assistant by SSH
We have two ways to add ESXi Hosts and vCenter to our VMA, either by Domain or Local Authentication.
Join VMA to Active Directory
sudo domainjoin-cli join <domain-name> <domain-admin-user>
Once done reboot the system
Check the domain and OU
sudo domainjoin-cli query
Add ESXi Hosts/vCenter to VMA
vifp addserver VMF-ESXi01 –authpolicy adauth –username VMFocus.com\\Service.vCenter
Check ESXi Hosts/vCenter joined to VMA
vifp listserver -l
Target A Specific Host
vifptarget -s VMF-ESXi01