Using Cluster concepts among ESXi hosts we can achieve high availability. In VMware we have two types of Clusters. In this post we will cover, incase of any system failure how the VMs will be migrated to other hosts in the cluster.
1. Distributed Resource Scheduler (DRS)
is a utility that balances computing workloads with available resources in a virtualized environment. Total resources will be distributed as user requirements among all hosts.
2. High Availability (HA)
is a utility that eliminates the need for dedicated standby hardware and software in a virtualized environment. When a Host is down, the VMs within that will be shifted to other hosts automatically. This reduces manual shifting overhead.
For this we need to create a cluster and move our hosts to that cluster...
It is preferred to maintain separate NIC in all the hosts for checking heartbeats. One NIC for normal data transfers and the other is dedicated for Fault tolerance management.
Click on any of the hosts, click on Configuration tab and then click on networking....
We can see only 1 NIC is available for Host1... Now let us add one more NIC. Click on Properties....
We can view the properties of our Virtual Switch...
Click on Management and then add new network....
Select the newly added NIC adapter...
Click Finish and so we added our NIC...
As we can see our second NIC is not yet assigned with any IP...
Click on properties to add a Network to this new NIC...
Select Connection Type "VMkernel" ... (We use this NIC for host management)
Here I am using my existing virtual switch for our Network traffic...
Give a desired name as "Network Label"
We can obtain IP automatically or can assign as per our range...
Review Summary one last time...
We can see the changes in our Networking tab...
Similarly I added NIC to my second host (Host2) and also assigned IP....
Now we are good to configure HA cluster... Right Click on our cluster and click on settings...
Once we Enable HA, we can see vSphere HA in our Cluster Features...
Modify VM options as per our requirement....
Read the description of VM monitoring and choose accordingly, I prefer "Disabled" otherwise while monitoring even for short network drops the VMs will be restarted.
Datastore Hearbeating manages the preferences about what storage to be used. I selected both the storages, so both the storages will be used by cluster....
So far done with the minimum requirements and configuration part of HA cluster.
vSphere HA configured on both the hosts successfully........
Current Scenario:
Below is the current status of VMs in my host1...... Windows_VM is on shared storage and VMware vCenter Server is on local datastore of Host1....
HOST1 HOST2
Let us test our cluster by powering off one of our hosts..... Click on Shut Down....
Now I powered on my Host1, so lets try connecting to it....
Now Host1 is back and so VMware vCenter VM is also back....
After Host1 is rebooted, below is the status of VMs in both hosts.....
Host2 Host1
Now lets try it in the other way, what happens when we shut down the Host2...
Shut Down Initiated....
Since Host2 is unavailable, both the VMs within Host2 are down...
Windows_VM is unrecheable for a while and switched back to Host1 with few network drops...
Windows_VM is back to Host1, since it is on shared storage but the other VM couldn't....
At first the Windows_VM is on Host1, so we shut down the Host1 and then the VM is migrated to Host2 automatically.
Then we tried with shut down of Host2, this time Windows_VM is switched back to available Host which is Host1. We have seen working of HA cluster in both the example scenarios.
1. Distributed Resource Scheduler (DRS)
is a utility that balances computing workloads with available resources in a virtualized environment. Total resources will be distributed as user requirements among all hosts.
2. High Availability (HA)
is a utility that eliminates the need for dedicated standby hardware and software in a virtualized environment. When a Host is down, the VMs within that will be shifted to other hosts automatically. This reduces manual shifting overhead.
For this we need to create a cluster and move our hosts to that cluster...
It is preferred to maintain separate NIC in all the hosts for checking heartbeats. One NIC for normal data transfers and the other is dedicated for Fault tolerance management.
Click on any of the hosts, click on Configuration tab and then click on networking....
We can see only 1 NIC is available for Host1... Now let us add one more NIC. Click on Properties....
We can view the properties of our Virtual Switch...
Host2 Networking tab....
Removed and deleted few VMs for space issue, dont get confused...
Below is the current status of VMs in my host1...... Windows_VM is on shared storage and VMware vCenter Server is on local datastore of Host1....
After shut down of Host1 my Windows_VM migrated to Host2 automatically, but VMware Vcenter VM is still down since it is originally located on datastore of Host1.
Host2 Host1
Finally after powering on the Host2, we have all our VMs back....
#####################################################################################
No comments:
Post a Comment