A blog by Steven Johnston

Configuring vSphere App HA 1.0


When vSphere 5.5 was released, there were a number of features listed that I wanted to check out, App HA 1.0 being one of them. Recently I have been working with App HA in my homelab and realised there were a number of components which are probably new to many VMware Administrators.

This blog post is to explain what App HA does and to cover an overview of the install guided by what I carried out on my homelab.
I focus on parts of configuration which would be new to most people such as in the Hyperic interface and the configuration required within vSphere to enable the functionality. I gloss over common things like deploying vApp’s as I expect most people will have done so at some point but if they haven’t there is a ton of material out there covering that.
I hope others will find my post useful to quickly gain an understanding on the requirements to deploy it and to comprehend it’s functionality.

What does App HA do?
App HA will assist the VMware Admin in controlling application availability by displaying the status of applications, triggering notifications when services are unavailable and performing remedial actions such as restarting the services and resetting the virtual machine.

At the time of writing in App HA 1.0, the following Services are supported:

  • Apache Tomcat 6.0 and 7.0 on Windows and Linux
  • IIS 6, 7 and 8 on Windows
  • Microsoft SQL 2005, 2008, 2008R2 and 2012 on Windows
  • Apache HTTP Server 2.2 on Windows and Linux
  • SharePoint 2007 and 2010 on Windows with Hyperic 5.7.1 SharePoint plug-in
  • SpringSource tc Runtime 6.0 and 7.0 on Windows and Linux

This list of Services are provided by VMware here.

The Installation and Configuration Steps
For the installation of App HA the first thing of note is that vSphere App HA 1.0 has a number of components that’ll need installed prior to enabling it, this includes vCenter Hyperic, the App HA vApp and Hyperic Agents. App HA functionality is not present in the vSphere Client only within the vSphere Web Client.

The Installation and Configuration Steps for App HA are:

  • Deploy vCenter Hyperic 5.7x
  • Deploy App HA virtual Appliance
  • Hyperic Agent Installation (First of all on vCenter to allow the next step) (*)
  • Setup vFabric Hyperic vCenter Server Plug-in (enables alarms to be sent from vCenter Server)
  • Use Web Client to Configure App HA to see Hyperic
  • Set Cluster Configuration for “VM & Application Monitoring” (**)
  • (Optional) Configure Hyperic Files to Enable Automation and Mass Deployment
  • Configure and Assign App HA Policies (*)
  • Test Your Policies (*)

N.B. Steps with (*) need repeated for each VM.
Steps with (**) need repeated for each Cluster.

Deploy vCenter Hyperic 5.7x –

A pre-requisite for App HA is Hyperic, which is a product in it’s own right and came from one of VMware’s acquisitions. Hyperic is provided as either a vApp or an installer for selected Linux and Windows OS. One important point to note, if you intend on using Hyperic outside of the App HA use case, the vApp is recommended for large environments greater than 1000 managed platforms, other configurations are for “medium scale environments”.
The Hyperic deployment type isn’t so much an issue when used with App HA as it has a scale limitation of 400 agents as mentioned in the App HA 1.0 release notes but the vApp is easier to deploy.
The vApp is deployed via OVF and actually contains 2 VMs, one for the application and the other for the database (Remember to configure an IP Pool prior to deployment). The full deployment instructions can be found here.


The Hyperic Dashboard looks like this:

Deploy App HA virtual Appliance –

This is the other vApp required for enabling App HA, this one being the actual AppHA vApp. It is deployed the same as Hyperic using an OVF template. This one consists of a single VM. Full vApp deployment details are here

Hyperic Agent Installation –

Each Server which you intend to leverage App HA with, will require the Hyperic Agents to be deployed and the Hyperic Agent will need to be installed on the vCenter Server to allow the creation of the VFabric Hyperic vCenter Server Plug-in (the next step).

On the vCenter server follow the below instructions (they are the same for the deployment of the Hyperic Agent for all Windows Servers):

  • Download the zip archive
  • Extract it to a directory (e.g. "c:\hyperic-hqee-agent-5.7.1")
  • Navigate to the “bin” sub-directory (e.g. "c:\hyperic-hqee-agent-5.7.1\bin")
  • Execute “hq-agent.bat install” and wait until it finishes.
  • Execute “hq-agent.bat start”. Respond to the series of questions it will ask, they will be specific to your environment. Defaults will be correct in most cases except the final question for which the response must be changed to “yes”

These steps are shown in the command prompt window below:

The Platform (Server) will appear in the Hyperic Dashboard under the Auto-Discovery section. From there you can add it to the inventory by clicking the Add to Inventory button.

Perform the above Hyperic Agent install steps again for any other servers you wish to configure with App HA.
Look to the “(Optional) Configure Hyperic Files to Enable Automation and Mass Deployment” section for details on making this easier.

Setup vFabric Hyperic vCenter Server Plug-in –

To enable alarms from vCenter Server if remediation actions are triggered, the vFabric Hyperic vCenter Server Plug-in needs created.
The Hyperic Agent needs to be installed on vCenter Server for this. After the agent is deployed follow the steps below.

  • Go to Resource > Browse as shown below
  • vFabric_1

  • Click the vCenter server from the Platforms list. In my case this is NEO-VC01
  • Select Tools Menu > New Server
  • Enter Name as “VC”, select “VMware vCenter” from the list and Install Path “*”
  • Click on Configuration Properties
  • Fill in the URL replacing “localhost” with your vCenter name or IP. Complete user and pass and leave process query as it is. Finally ensure Auto-Discover Services? is unticked.
  • On the vCenter Server ensure the VC Resource has a green tick beside it (note this might take a short while) and thats the VC Plug-in sorted.

VMware documentation for this is here.

Use Web Client to Configure App HA to see Hyperic –

The next step is to configure App HA from within the Web Client to see the Hyperic Server. This is done from the Inventory under Administraton > vSphere App HA on the Settings tab.

Complete the details giving IP or Hostname of vFabric Hyperic Server, Port and Username/Password as shown below.
Full documentation on this is here.

Set Cluster Configuration for “VM & Application Monitoring” –

Each Cluster in which you wish to use App HA needs to have that functionality enabled.
To do this, select the cluster then go to Manage > Settings > vSphere HA. From there click Edit.

In this menu ensure Turn ON vSphere HA has the check box ticked if it isn’t already and under VM Monitoring select VM & Application Monitoring then click OK. The final step of this is shown in the image below.
Ensure you repeat these steps for each Cluster you wish to use App HA with.
VMware documentation covering this section is here.

(Optional) Configure Hyperic Files to Enable Automation and Mass Deployment –

When I came across this topic within the App HA documentation, the title was not the same as I have used for this section. I was a little confused and unsure why it was required. The reason for my confusion was the title and description in the first line of the docs mentioned nothing of automation or enabling mass deployment. The description on the first line was:
“To trigger vSphere App HA alarms on vCenter, you must configure certain properties in the relevant vFabric Hyperic file.”.

What it doesn’t explain here is that these steps are covered when you first run “hq-agent start” and are asked a series of questions regarding Hyperic IP Address, Username and Password etc (this is described in the deploying Hyperic Agents section above).

We already know in order to use App HA the Hyperic Agent needs to be installed so if you have deployed and started the service for the Hyperic Agent then you have already ran through the series of questions covering these options and this isn’t required.

So what this section within the VMware documentation is actually describing is how to automate the answers to the Hyperic Agent deploy process. This became obvious when I looked at what it was trying to achieve and was confirmed by the description within the commented section in the file. It states
“Use the following if you’d like to have the agent setup automatically from these properties.”
I highly recommend using these steps as it makes deploying the agent quicker, easier and most importantly enables mass deployment.

If you have already deployed the Hyperic Agent to a server and the service is running but wish to remove the configuration to try again, such as for testing then follow the clean-up steps below.
If the Hyperic Agent has never been deployed then you will not need to perform these clean-up steps. Skip to the section “Configure the File:”

Clean-up Steps (Only required if Agent already deployed):

  • Stop the vFabric Hyperic agent which is achieved by running the “hq-agent.bat stop” from a command prompt open at the agent bin directory. In my example from the "c:\hyperic-hqee-agent-5.7.1\bin\" directory.
  • Delete the “data” sub-folder from within the agent folder, in my example this is the "c:\hyperic-hqee-agent-5.7.1\data\" directory.
  • Next delete the agent Platform from the Hyperic server inventory (i.e. Delete the Server entry within the Hyperic Inventory)

The following section describes steps to edit the file and includes the properties the VMware documentation mentions as well as two other properties I found necessary to have the deployment fully automated. I found if I did not include these properties that it would ask me for a response when the Hyperic Agent was started for the first time. The extra properties are “agent.setup.camIP=” and “agent.setup.unidirectional=”. The first is the Hyperic Server IP address and the second is the option on whether the agent should communicate in a unidirectional manner.

Configure the File:

  • If the Hyperic Agent is not already on the Server, extract it to a local directory. Open the file found within the “conf” sub-directory. In my example from the "c:\hyperic-hqee-agent-5.7.1\conf\" directory and edit the following values replacing the entries between the asterisks (N.B. The Username is normally hqadmin) ensuring the “#” at the beginning of the line is deleted so the option is not commented out:


    Then save the file.

  • Start the Hyperic agent by running “hq-agent.bat start” from the command prompt opened at the agent “bin” directory.
    If it is configured correctly it should not ask any questions as it did prior to using the file.

To use this for other Servers you intend to use with App HA:
Extract the Hyperic Agent, copy the file with the modified properties above to the “Conf” sub-directory, install with “hq-agent.bat install” and start the service with “hq-agent.bat start”.

The VMware documentation covering this section can be found here.

Configure and Assign App HA Policies –

The next step for configuring App HA is to look at Policies.
Remember any servers you wish to monitor need the Hyperic Agent installed so ensure the agent is deployed before proceeding (Steps above).

Policies are created from within the vSphere Web Client at Administration > vSphere App HA on the Policies tab.

For my testing I created a SQL Server policy which can be seen in this list.

To create a Policy click the green plus seen in the above image. In the wizard assign a Policy Name, choose an Application Service with any further service specific options, choose Remediation for that service (Service restart and VM reset configuration) and whether you want to create an Alarms Definition. Policies configured can be used across multiple VM’s, there is no need to create duplicate policies unless the configuration options are different.

Now you have created a policy it just needs assigned to whatever machines you wish to provide App HA for. This is done at the cluster level.

On the cluster which contains the VM you wish to enable the policy with, navigate to Monitor then the Application Availability tab. This will list all machines with services Hyperic is aware of. This is shown in the image below.

From the Application Availability screen right click or use the Actions menu to Assign or Unassign a Policy.

Full details on Assigning a Policy to Application Services can be found here.

Test Your Policies –
As with anything you configure, it is prudent to test it to see if it reacts as you would expect. In my homelab I have configured a policy for SQL Server so used that as my test.
I stopped the SQL Service on my NEO-TOOLS01 server and within about 60 seconds the following was visible from the vSphere Web Client:

And nearly immediately after this alert came through, the service was restarted and the Availability Status returned to Available.

Wrap Up
This concludes the steps which I performed in order to get App HA 1.0 up and running in my homelab environment. If you’ve got through this far and look back at the start, at the list of tasks involved in configuration you’ll notice the steps marked with (*) which will need to be performed to add new VM’s/Applications to be monitored by App HA and steps with (**) that you’ll need to complete for each new Cluster configuration.
Once it is up and running you’ll find it’s extremely easy to add more and also once you are familiar with the process I recommending looking at methods of deploying the Hyperic Agent with the modified file in bulk.

Thanks for reading.

Leave a Reply

Required fields are marked *.

Captcha Captcha Reload