Note: This tutorial involves setting up Clustering for two ESX hosts. One host is ESX4 and the other is ESXi4.
1. Login to your vCenter server. As you can see i’ve already connected to two hosts, vmcluster1 and vmcluster2. I have one virtual machine currently sitting under vmcluster1 which is my VMware Data Recovery appliance.
2. To create a new Cluster, right click on your Datacenter object and click New Cluster.
3. On this screen we’ll give our cluster a name and turn on VMware HA and VMware DRS. For more information on HA and DRS please check out the Resources area.
4. For DRS i’m going to select Fully automated, which means i’ll leave it up to DRS to decide which host to place Virtual Machines on at start up, and to VMotion Virtual Machines to other hosts based on resource utilization. For example if a Virtual Machine is heavily using it’s CPU and Memory resources on a cluster host that already has a high CPU and Memory utilization rate, DRS will determine if there is another host available in the Cluster that has resources available. If there is, DRS will vmotion the Virtual Machine to this host. You can also set the threshold and sensitivity of DRS. The higher the aggressiveness the more sensitive DRS is to balancing the load among clusters, which means more vmotion activity.
5. Here I will turn DRS Power Management (DPM) off. This feature allows hosts to be powered off when the host resources are under utilized (VM’s are VMotioned before the host is powered off). Once resources are needed again in the cluster, the host can be automatically powered on by DPM. The Manual setting will let you see the recommendations DPM makes without actually applying them. The Automatic setting will cause DPM to make recommendations and apply them without your acknowledgement. Once again you can adjust the sensitivity of DPM by sliding the DPM threshold slider towards Conservative or Aggressive.
6. I’m going to tick “Enable Host Monitoring”. This will enable a heartbeat between hosts. Once the heartbeats are not received, the host is considered down and a failover situation will occur.
I’m going to disable admission control as I want to be able to turn on virtual machines even if they don’t adhere to the clusters admission control policy. If you want to strictly control your cluster in regards to how many virtual machines can be turned on, how much resources can be used, etc then you can Enable this feature. If a virtual machine is deemed to constrain the failover capacity (based on the Admission Control Policy), it will not be allowed to power on.
7. Here we can set the VM restart priority and host isolation response. The VM restart priority is set to Medium by default. This mean all Virtual Machines are set to Medium. We can set individual virtual machines with a higher or lower restart priority when a fail over condition occurs (an ESX host fails in a cluster). For example you may want your domain controllers to be powered on no matter what, and you may give your WSUS (Windows Update Services) server a lower priority. This means that as Virtual Machines are powered on, they are checked against the Admission Control Policy earlier on (if it’s enabled). As soon as the policy becomes violated, virtual machines with a lower restart priority are not powered on. Basically higher priority VM’s are powered on first, medium priority VM’s are powered on next and low priority VM’s are powered on last.
Host Isolation response means that a hosts heartbeat has not been received and the host becomes isolated from the Cluster. Even though the host may be still running, the default option is to Shut Down virtual machines. Other options are Leave powered on or Power Off.
8. I have disabled VM Monitoring in this tutorial. As it states in the windows below “VM Monitoring restart individual VMs if their VMware tools heartbeats are not received within a set time”. You can adjust the sensitivity from High to Low. A High setting will reboot the VM if the heartbeat is not received within 30 seconds. A Low setting will reboot the VM if the heartbeat has not been received within a 2 minute period.
9. When you setup a VMware Cluster, it is a good idea to have all the hardware exactly the same for compatibility reasons. However this is not always the case. In vSphere 4, EVC will take into account all the CPU feature sets of each Host in the cluster and determine common feature set among all hosts. It will then present this common CPU feature set to share among all hosts and virtual machines. As you can see in the window below you have the option to select AMD or Intel. As we are using the same CPU feature set among hosts, we will disable this feature in this tutorial.
Note: It is essential to have a common CPU feature set when using VMotion.
10. We will be storing the Virtual Machine swapfile with the Virtual Machine. (in the same datastore as the VM). You do have the option to seperate it, however you may suffer a performance hit if you do so. Click Next.
11. The Summary screen is presented to you. Check that all the settings are correct. If not click Back and make changes. If you are happy with the settings, click Finish to setup the Cluster.
12. Now that we have our cluster created, our next step is to add hosts to the cluster. As you can see below our cluster VMLAB Cluster is created and I have two hosts vmcluster1 and vmcluster2 that need to be added to the cluster. To add a host into the cluster, simply drag it to your cluster. In this case I want to add vmcluster1 to VMLAB Cluster, I’ll click on vmcluster1 and drag it to VMLAB Cluster.
13. The Add Host Wizard window pops up. You are asked what you would like to do with Virtual Machines and resources that belong to the host you are adding into the cluster. First option is to “Put all of this host’s virtual machines in the cluster’s root resource pool. Resource pools currently present on the host will be deleted”. If your host does not contain any resource pools or you don’t wish to place your virtual machines in a seperate resource pool, select this option.
The second option “Create a new resource pool for this host’s virtual machines and resource pools. This preserves the hot’s current resource pool hieracrchy”. As the description explains, use this option if you wish to maintain the current resource pool struture.
14. You are now ready to add the host into the cluster. Click Finish.
15. As you can see in the Recent Tasks below, the HA agent is enabled on the host vmcluster1.
16. I have now added both my hosts into the cluster. Currently I have a yellow warning triangle on my cluster, this is due to not setting up a redundant network management on my hosts.
17. If we click on VMLAB Cluster and select the summary tab, we can see why we are getting a yellow warning triangle on the cluster. If you simply add a second management interface to both hosts, this warning message will disappear.
Disclaimer: All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.