Latest Articles

How To Install and Configure vSphere App HA – Part 3

In the two previous parts, we installed and configured the vSphere App HA so it is now up and running. Time for some testing! In my setup, I have a Windows 2003 virtual machine running Microsoft SQL Server. Before we can protect the VM we must install the Hyperic Agent first.

Install Hyperic Agent

Download the appropriate Hyperic Agent installation file from VMware first.

  1. Execute the EXE file, in my case vCenter-hyperic-hqee-agent-5.8.1.exe.
  2. Click Next on the welcome screen and provide the Hyperic Server FQDN or IP address. Click Next.App HA P2 S6
  3. Enter password for the Hyperic administrator user.
  4. Select No when asked if the communication with the server should be unidirectional and click Next.
  5. Select Yes when asked if the communication with the server should be secured and click Next.
  6. Select a folder where the vCenter Hyperic Agent should be installed or leave it to default.
  7. Click Next to start the installation process.
  8. Click Finish to end the installation process.

Note: if configured properly, the agent should add the SQL server to Hyperic automatically. Check your firewall settings when you cannot see the SQL server in the Hyperic inventory.

Create vSphere App HA Policy

A policy is created to define the remediation actions that take place when the SQL service is unstable or unavailable.

  1. Open a web browser, navigate to your vCenter Server and log in as Administrator.
  2. From the Home page, click Administration.
  3. On the left bottom, select vSphere App HA and click the green plus sign under the policies tab.App HA P2 S1
  4. In the Create Policy wizard, provide a policy name and optionally a description. Click Next.App HA P2 S2
  5. In the Configuration Details, select MsSQL2005 as the application service, leave other settings as default and click Next.App HA P2 S3
  6. At the Remediation configuration, select the action to occur when the service is unavailable according to you company policy. Notice the small exclamation marks, hover over it and they will provide you with addition information about the setting.App HA P2 S4
  7. Next, in the Alarm Definition part, provide an e-mail address for the receptient that will receive the alarm message. Click Next.App HA P2 S5
  8. Review the policy settings and click Finish when ready.

Assign vSphere App HA Policy

A policy can be assigned to one or more applications services that are of the same service type.

  1. From the Home page in the vSphere Web Client, navigate to you vCenter Server and select Applications Availability under the Monitor tab.App HA P2 S7
  2. Select the MsSQL2005 application and click the Assign Policy icon.App HA P2 S8
  3. Select the SQL Server Policy created earlier and click OK. Note the change of the Availability Status, it now reads Available.App HA P2 S9

vSphere HA Test

Alright! App HA is configurered, policy is created and assigned. Let the testing fun begin! 🙂 There are many ways to stop or crash a service on a Windows machine 🙂 but let’s just use the NET STOP command from the command prompt.

  1. Log in to the SQL server, open the command prompt and type: C:\> net stop mssqlserver
  2. The SQL service will stop and after a minute or two the vApp HA should display that the application is not available.App HA P2 S10
  3. As soon as this happens the service will be restarted on the server as configured in the policy.

This concludes the vCenter App HA series. As you can see, the setup is not quite easy but I think it is a great enhancement for your datacenter and availability of your applications.

Cheers!

– Marek.Z

  • How To Install and Configure vSphere App HA – Part 1
  • How To Install and Configure vSphere App HA – Part 2
About Marek (293 Articles)
Marek is an IT professional with 15+ years of experience in the IT industry and is currently working as PSO Senior Consultant SDDC at VMware for the NEMEA region.

Leave a reply...