Friday, October 4, 2013

VMware High Availability (VMHA) Configuration

In this post I am going to show how to configure and test VMware High Availability. VMHA monitors physical servers and virtual machines, server failure detection also migrate and restart the virtual machine from offline hosts. vSphere uses an agent called "FDM" Fault Domain Manager. FDM agent communicates with vCenter to gather information about the status of virtual machines. In every VMHA cluster one host is always a Master and the rest are Slaves. The selection takes place via an election. The host with most number of mounted datastores becomes the Master. In case of a tie, Managed Object ID is used. The host with the highest ID becomes the master. The election takes place during the VMHA cluster creation or in case when the current Master's host fails or enters in maintenance mode. VMHA maintains a communication channel with all the hosts in a cluster with the help of heartbeat. In vSphere 5.0 there are two heartbeat mechanism. Network heartbeat and Datastore heartbeat (use when network is unavailable).

Master Responsibilities: 
1- Master host monitors the availability of host and virtual machines.
2- Manages virtual machines restart in case of host failure
3- Maintains the list of virtual machines on each ESXi host
4- Restarts fail virtual machines
5- Exchange the state with vCenter
6- Monitors the state of slaves.

Slave Responsibilities:
1- Monitors their running virtual machines and send status to Master and perform restart on request from Master
2- Monitors Masters host health
3- In case of Master failure, slave takes part in Master election.

VMware High Availability Requirements:
1- Minimum of vSphere Enterprise license 
2- At least two hosts in a cluster
3- All the hosts have access to shared storage
4- At least one management network, best practice says two
5- All hosts have static IP Address

Since its a lab environment, i have already configured a new datacenter and connected two ESXi hosts in it. The shared/centralized storage has also been presented on the host. A virtual machine has been created on the storage.

1- Right click the newly created datacenter and select new cluster.
 
2- Enter the name and select Turn on vSphere HA. For better performance VMware recommends to configure vSphere and vSphere DRS together. For the sake of simplicity, i have only using vSphere HA. Select next.

3- Configure the settings according to the requirements and select next.

4- Select next.

5- I have disabled the VM monitoring. Configure the setting according to the requirement and select next.

6- Select next.

7- Select next.

8- Select finish.

9- The cluster has been created.

10- Now its time to move the ESXi hosts into the cluster. Drag and drop each host in the cluster at a time. VMHA will install the FDM agent on each host and after that Master/Slave election will take place.

11- The VMHA has been successfully configured. In order to check the Master and Slave host. Check each host summary.
 In order to test the VMHA, just shutdown or restart the host which is hosting the virtual machine.

Conclusion: In this post the VMHA has been successfully configured and tested. In the next post i will show how to configure Distributed Resource Scheduler (DRS).



No comments:

Post a Comment