In this article you'll learn how to configure VMware High Availability (HA) cluster. It's not in depth article about HA, but gives you enough knowledge and get things running. You could already read my article VMware HA cluster –  how it works with an introductory video from VMware TechPub.
VMware HA components changed in vSphere 5 where the AAM agent (automated availability manager) responsible for the communication between hosts present in the cluster and vCenter, has been replaced by FDM (Fault Domain Manager). I written also a detailed article about FDM here:Â vSphere 5 – New High Availability Agent Introduced – FDM.
VMware High Availability (HA) components
VMware vSphere High Availability (HA) is composed from three main components, which each of them plays different role.
- FDM – Fault Domain Manager is responsible for communication between hosts which are part of the cluster, informing other members about available resource, and VMs state. FDM manages the restart of VMs in case host fails.
- Hostd Agent – responsible for communication between hostd and vCenter. If this agent has a problem, then HA stops functionning. Restart possible from DCUI – Under Troubleshooting Options >Enter > F11 >restart the services OR through the CLI… Â Â Â ./sbin/services.sh restart
- vCenter Server – is used to deploy and configure FDM agents inside the cluster. Manages the election of server elected master. If the whole vCenter server (or just the service) fails, the HA still continues to work.
Basic two hosts HA cluster running in my lab.
To be able to create cluster with ESXi hosts, a vCenter is needed. The most basic package, vSphere Essentials cannot be used since the limited licensing does not allow you to create HA cluster as only vSphere Essentials Plus allows you to do that. The essentials package basicaly allows you manage three hosts from central location which is – vCenter server for essentials.
The Essentials Plus allows you not only create HA cluster, but provides also vMotion, Enhanced vMotion, and also many other products which are part of the Essentials Plus bundle:
- vSphere Data Protection (backup product)
- vSphere Replication (VR)  can replicate VMs to another host for DR scenarios – supports VSS) .
- vShield Endpoint ( AV, Security)
Essentials Plus is an entry level package for small business which needs to consolidate (virtualize) like 20-30 physical servers, and make the VMs be high available. Any hardware failure of the physical hosts enables the automatic restart of VMs on another host in the cluster.
VMware vSphere High Availability Cluster Requirements
There are many requirements for VMware HA. First one of thm is to have the right VMware vSphere license, as I mentioned above. Here are other requirements:
- vSphere Essentials Plus or higher.
- Shared Storage – you'll need some kind of shared storage. I say some kind, since you can use dedicated storage device (NAS, SAN) or also you can use other (software based) products which emulate the shared storage, like VMware VSAN, or any NAS or SAN hardware device.
- CPU compatibility between the hosts – the ideal cluster is a cluster with exactly same hardware and memory size. Small 3 host cluster allowing to run 20-30 VMs will satisfy most of SMBs. But you can use VMware EVC to adjust cluster settings for CPU compatibility.
Once you install vCenter Server, configure a network of each of your ESXi hosts, you can start creating your cluster. Each of your hosts should have redundancy assured by using at least two physical NICs for each network:
- management network
- VM network
- vMotion network
To make this article shorter, I'm skipping the network configuration now. The installation of the vCenter server on Windows Server OS is another piece which is not covered in my article as you can simply use easy install or you can deploy vCenter Server Appliance (vCSA) – read my detailed article:
The vCSA has the advantage that its all-in-one prepackaged product, part of the bundle, and so no need to install the individual components one by one.
Another requirement for creating VMware HA cluster is solid DNS architecture with forward and reverse zones created and working. If not already done, create on your DNS server the necessary records now.
Let's create datacenter and cluster now.
To do so, fire up vSphere Client and go to Hosts and clusters
Then, position yourself on the Manage Tab > right click the vCenter server > New datacenter
Once done, you should see new icon appear. I called my Datacenter vladan. -:). Then again, right click the datacenter you just create and create new cluster.
While going through the assistant you're asked, if you want to Turn On DRS and Turn On HA. If you're on the Essentials Plus licensing, you'll get a pop-up saying that Essentials Plus isnt's available, or something like this. As the DRS is available only in Enterprise and Enterprise Plus.
If you don't want to activate those options now, you can leave unchecked, and continue the assistant.
You can do exactly the same steps by using the vSphere Windows Client, as a configuration of VMware vSphere (HA) cluster is still the base element of VMware, and the new vSphere Web Client only brings new functions like vSphere Enhanced vMotion or deployment and management of vSphere Replication.
So we have Datacenter, we have a cluster. Now we need to add our ESXi hosts to our cluster. To do so, just follow those steps, right-click (I like right clicking) the HA cluster we just created > Add Host
As you can see, my host's FQDN (fully qualified domain name) is esxi5-01.vladan-fr.localÂ
You're prompted for a root password on that host.
And also, you'll receive a security prompt before validating the assistant…
The last point is to attach a license. In my case, the license has already been entered in vCenter server, so I can assign that license to that host. When you first installing your hosts and vCenter server, you have 60 days for entering your license, and here through this assistant you wan use the Evaluation Mode license. But after 60 days, the VMs will get disconnected from vCenter and the HA won't function.
Optionally, to reinforce your company's security, you can prevent login directly to the host and check Enable lockdown mode. Users will be forced to login only through vCenter….
Finally, you can schedule the task. This might be useful in certain scenarios where you're adding new hosts into the existing cluster where there are already some hosts.
That is it. Last page of the assistant ask you about scheduling the task. Click the change > and select the Run this action now radio button.
This assistant had seven pages. At any moment you can click on the right top corner, where are the two small black triangles. By clicking that it will interrupt the assistant and sends it with a cool animation to the Works in Progress window on the right hand side. You just added the host to your cluster. Do the same for the other host(s), knowing that minimum two hosts are necessary to form a HA cluster.
By clicking the propriety of the cluster you can configure the Host Monitoring, enable Admission Control and also use VM monitoring. I'm going to return back to this article, and complete the explications for those options.
This article does not mean to have all details about HA and clustering, and there are many books and websites which goes much deeper. For the sake of simplicity, this article is here to help people which are new to VMware, new to clustering, new to this terminology. vSphere 5.1 brought new vSphere Web client, and so the screenshosts done through the new vSphere Web client are different.
The time necessary to configure vSphere cluster depends on many things, but it an be done quite fast when all prerequisites are met and all components and hosts are already installed and configured.
TIP: Â VMware vSphere 6.5 â HA and DRS Improvements.
Also from ESX Virtualization
- Free Tools
- How to create a USB media with ESXi 6.5 Installation
- vSphere 6.5 page with ALL How-to, videos and blog articles for vSphere 6.5, ESXi 6.5
- How-to Create a Security Banner for ESXi
- What is VMware DRS (Distributed Resource Scheduler)?
- Three Ways to Enable ESXi Shell and Timeout
Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)
Gunnar says
Hi Vladan, Thank you for this article. Do you know, if there is a way to disable the automatic fdm Agent deployment, which is carried out by vCenter Server. When installing a new vCenter, there is an option that can be set, although can this option be disabled afterwards?
Thank you.
Regards,
Gunnar
Vladan SEGET says
The moment you check the HA option (at the cluster level) it gets activated/deployed…. Hope this asks your question.
Gunnar says
Thanks Vladan for your quick response. I am planning a major upgrade of ESXi Hosts, which requires to have the vCenter upgraded first. When I disable HA in the specific Cluster, the fdm will not be upgraded before I use VUM to carry out the Major upgrade. That saves me one restart of the Hosts.
Cheers mate.
Vladan SEGET says
I see. There is VUM. So basically as you just said, you should upgrade VC, then VUM and then ESXi hosts. The upgrade can be orchestrated in the VUM where you got a choice to evacuate VMs and putting hosts into maintenance mode, automatically.
Gunnar says
Hi Vladan,
I’m going to test the following in a testing environment, to see how many restarts are mandatory:
Disable HA in the Cluster to upgrade
â
Upgrade vCenter Server
â
Upgrade VUM
â
Create esxi image with fdm vib
â
Upgrade the Hosts
â
Enable HA again
I am trying to avoid this problem:
Upgrading an ESXi 5.x host through Update Manager fails with an error (2034945)
http://kb.vmware.com/kb/2034945
Regards,
Gunnar
Vladan SEGET says
I see…. It should work, but why don’t you open a ticket with VMware. The folks know their job, you know… đ
Gunnar says
I was working there, in the Cork Office đ
Varun Tiwari says
Hi Vladan,
I am new for VMware VSphere, and started working from last 6 Months. Since i have not full control on environment i am not able to explore as i want.
Thanks for your blogs these are very useful for me as i am started loving VMware.
If you can give some idias about how to start learning and some beasic documents , It will be great for me.
Vladan SEGET says
I’d suggest going through the VCP6-DCV training materials: http://www.vladan.fr/vcp6-dcv/
I know it’s perhaps a too fast as a start. Build a lab environment if you can…
LĂȘ Ngá»c ThĂ nh says
Hi Vladan
I have a question,
I have 2 server Dell R730, and 1 storage IBM V3700 SAS connectivity
Can i configure HA on VMware is installed on 2 Server DELL?
thanks.
Vladan SEGET says
I think that you can configure HA with iSCSI or NFS. As for SAS, you might want to check with VMware.
Kind regards,
Vladan
Suraj Godar says
Can we create the vcenter cluster if the ESXi host is having different license. (3 host is having enterprise and 1 host is having Enterprise plus.
Vladan SEGET says
As long as you have vCenter Standard (not essential) for managing those 4 hosts, you can. But you’ll lose a possibility to have the advanced features present in Ent. Plus.
Kannan G says
Hi Vladan,
Please help me…
Q1:I want to upgrade a VM from windows 2008R2 to Windows 2012 R2, which is in VMware HA cluster.
Q2: Also My Vcenter running in VM (Windows 2008R2) , I want to upgrade the same VM to 2012R2.
Is there any best practice or proceedure for the above.
Vladan SEGET says
Yes, just google it.
SIVA says
Hi Vladan,
I Configured in HA for my citrix data center server, after configuration minimum 3 time per day fully restarted or showdown. why this problem coming, what the solution. after this problem accrued i am disabled in HA setting
please give me a any solution
Vladan SEGET says
This post is by not ANY mean destined for Citrix clusters…. So as a result I have no solution on your problem. Yes, migrate to VMware…
JM says
Hi Vladan,
I’ve just configured HA on my cluster but I can see a warning in both ESXi who says that “The number of heartbeat datastores for host is 1, which is less than required: 2”
Any suggestion?
Thanks.
Vladan SEGET says
Well, you should have 2 datastores for the hearbeat. Will your installation works like this? Probbably yes. But when you’ll create a second LUN and second datastore, you can just go back to the configuration and check the box for the second datastore, to be compliant.
Thanks for your comment.
Piet says
Hi Vladan,
is there a way to automatically restart VM’s in HA cluster after an Power Failure?
Or ist it really an unsupportet Feature in Vsphere HA?
Thanks!
Reagrds, Piet!
Vladan SEGET says
I don’t think there is unless we deactivate HA on the cluster before the failure.-:)
No, the way HA was designed is to deal with hardware failures, and as such, you could place the servers not on the same power socket, with the same Power supply. (to have double power supply). In this case the surviving host would be the one where those VMs are restarted.
Bony says
What do you use for DNS Resolving?
I’m struggling for a good DNS setup, currently using Unifi and just doesn’t suffice. Moving to PfSense soon should i use the pfsense dns options available or setup a Win server VM for dns needs? my ESXi hostnames currently does not resolve to an IP
Vladan SEGET says
Hi Bony, It was a simple lab setup with Windows Server and DNS role installed, altogether with a DC role.
pablo says
Hi Vladan, I have 2 servers DELL R740 and a DAS Storage MD1420. I can see both Esxi Hosts but with differents storage, I don’t know how to share the same datastore for the hosts. Could you help me? Or maybe you can show me a link explaining that? I purchased licenses VMware vSphere 6 Essentials Plus Kit for 3 hosts. Thanks!