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.
- Execute the EXE file, in my case vCenter-hyperic-hqee-agent-5.8.1.exe.
- Click Next on the welcome screen and provide the Hyperic Server FQDN or IP address. Click Next.
- Enter password for the Hyperic administrator user.
- Select No when asked if the communication with the server should be unidirectional and click Next.
- Select Yes when asked if the communication with the server should be secured and click Next.
- Select a folder where the vCenter Hyperic Agent should be installed or leave it to default.
- Click Next to start the installation process.
- 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.
- Open a web browser, navigate to your vCenter Server and log in as Administrator.
- From the Home page, click Administration.
- On the left bottom, select vSphere App HA and click the green plus sign under the policies tab.
- In the Create Policy wizard, provide a policy name and optionally a description. Click Next.
- In the Configuration Details, select MsSQL2005 as the application service, leave other settings as default and click Next.
- 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.
- Next, in the Alarm Definition part, provide an e-mail address for the receptient that will receive the alarm message. Click Next.
- 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.
- From the Home page in the vSphere Web Client, navigate to you vCenter Server and select Applications Availability under the Monitor tab.
- Select the MsSQL2005 application and click the Assign Policy icon.
- Select the SQL Server Policy created earlier and click OK. Note the change of the Availability Status, it now reads Available.
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.
- Log in to the SQL server, open the command prompt and type: C:\> net stop mssqlserver
- The SQL service will stop and after a minute or two the vApp HA should display that the application is not available.
- 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.