|
Objective 7.1 – Create and Configure VMware Clusters |
|
|
|
Written by Matthijs van den Berg
|
|
Tuesday, 10 November 2009 00:27 |
Knowledge
- Create new cluster
A cluster is an entity that exists within a Data center. You can create multiple clusters to segment ESX hosts due to version, proc type, etc. or to to counter cluster configuration maximums. To create a cluster:
- Open the vCenter client
- Go to the view “Hosts and Clusters”
- Right click you Data Center in the left pane, en select “New Cluster”
- Follow the wizard that appears to create a new cluster. In the above example we enabled HA and DRS. Those are only available with the correct licenses.
- Add ESX/ESXi hosts to a cluster
When you have created a cluster you need to add ESX(i) hosts.
- Right click on you cluster and select “Add Host…”

- Fill in the FQDN hostname, user name and password of the local ESX host user (password created during setup)
- Follow the rest of th wizard to add the host to the cluster.
- Configure High Availability basic/advanced settings
High Availability is technique that automatically start VMs that crashed. This can be due to failures of an ESX host or failures within the VM (VM Tools heartbeat monitoring). To configure this:
- Edit the settings of you cluster (right click, “Edit Settings…”)
- Click “VMware HA”. The following screen appears

- Edit the settings to your needs.
- Host Monitoring Status
This should be enabled for default operation of HA. When you expect network downtime you can temporary disable this. Be aware that when disabled HA will not work.
- Admission Control
This controls whether VMs can be powered on when there are not enough resources available. It reserved the capacity of the number of resources reserved for HA. For example when set to prevent; when you have three VMs you have 300% of resources. When you specify that HA tolerates 1 host failure (equal to 100%) this means that admission control reserves 100% of 300% (1/3th) of the resources for just in case. When you try to power on a VM that would take the number of resources over 200% this VM will fail to power on.
- Admission Control Policy
This controls how many (or what percentage) of host failures capacity is reserved for. Idea, but not officially meant for this purpose: You can increase the number that the cluster tolerates if you have a second site that is being replicated to the first and would like to make sure that you have sufficient capacity for the VMs on the second site.
- Click Advanced to change advanced settings. Advanced Settings can only be added manually.
- Enable/Configure VM Monitoring
VM Monitoring allows you to monitor the availability of the VMware Tools within a VM. When the VMware Tools heart beat is not received for a certain period of time the VM will be reset. You can specify a default value for the monitoring times of specify this by hand:
- Failure Interval
This value determines the period of time that no heart beats are received and the VM will be reset.
- Minimum Up-time
Number of seconds that a VM is not being monitors after it’s power on.
- Maximum per VM resets
The maximum number of times a VM is reset during a certain time frame. By setting this you can prevent infinite reboots, but it most likely will reboot multiple times every time frame. Pay attention!
- Maximum resets time windows
The time frame to what the “Maximum per VM Resets” setting apply.
- Configure Distributed Resource Scheduler basic/advanced settings
Distributed Resource Scheduler or DRS is the technique VMware uses to level the load of all VMs across the ESX hosts. When creating a cluster this is disables by default and you need the right licenses before you can use this. There are three basic levels:
- Manual
VMware DRS make the load level recommendation only; you need to apply the recommendations manually.
- Partially Automated
This will start a VM when being powered on the host with the most resources available. You still need to apply the recommendations to VMotion a VM to level the load manually
- Fully Automated
This will place VMs when being powered on and migrate VMs to level the load fully automated. You can select how aggressive this is being handled.
Advanced option van be entered manually. VMware recommends this only to use in conjunction with their support desk. I could not find a complete comprehensive list of all the DRS advanced options on the Internet.
- Configure Distributed Power Management
This is where VMware continues on their Green IT promise. DPM allows you to consolidate all VMs on the minimum number of hosts required. All other hosts are being shutdown until their resources are needed within the cluster. A host is than turned on fully automatic by the vCenter Server. To configure DPM:
- Right Click you cluster
- Click “Edit Settings…”
- Click “Power Management”
- Change the settings to your needs
- Click “Host Options” to change per ESX host DPM settings when you would like those to be different from the cluster settings.
- Configure Enhanced VMotion Compatibility
Enhanced VMotion Compatibility allows hosts with CPU’s from different families to be used in the same Cluster for VMotion. From ESX 4.0 this allows an easier use of ESX hosts: you can mix older and newer CPU families (from one vendor!) with each other. To do so you must select an EVC mode that supports the oldest CPU in the cluster. To configure:
- Right Click you cluster
- Click “Edit Settings…”
- Click “VMware EVC”
- Click the button “Change…”
- Choose Enable for your CPU vendor
- Click the “VMware EVC mode” for you servers.
- Note: to enable none of you VMs must use technology from a newer processor type. For example, when you build a cluster from ESX hosts with Core i7 processors, create VMs and add a Core 2 due processor host later on you VMs are using Core i7 functionality. You cannot enable the EVC mode for anything less that Core i7 mode. You have to change the VM CPU details to allow this.
- Configure swap file location
Each VM comes with a default created swap file. These swap files are stored with the VM files on the VMFS data store. You can change this default behaviour to another location, for example the local disk of the ESX host. To to so:
- Select an ESX host
- Select the tab “Configuration”
- Select “Virtual Machines Swapfile Location” in the menubox “Software”
- Click “Edit” in the upper right corner
- Select a local or remote VMFS data store that this ESX host will use as default
You can also change this per VM
- Edit the settings of a VM
- Select the tab “Options”
- Select the item “Swapfile Location”
- Change the settings to your needs.
- Analyze HA host failure capacity requirements
You can calculate the amount of CPU and memory resources that are needed for a host failure. When doing so you need to take the following into account:
- Resources in use
- Total amount of resources available
- Amount of CPU resources available on the host with the largest amount of Mhz
- Amount of CPU resources available on the host with the most RAM
-
When you account for 1 host failure this can be the host with the most RAM, CPU etc. So you need to make sure that you always have the largest amount of RAM and the largest mount of CPU resources available in the cluster to accommodate for a host failure. This can be calculated bu using the total amount of resources minus the amount of resources in use. Read more here on page 13 – 19.
- Analyze HA admission control
Admission control checks if there are sufficient resources within:
- Host (checks to ensure reservations, shares and limits)
- Resource Pool (checks to ensure reservations, shares and limits)
- VMware HA (checks to ensure VM recovery as specifies in the HA settings)
Those settings can prevent a VM from starting up or can prevent settings new reservations, limits or shares on a VM. Only HA admission control can be disabled. You can choose your HA admission control policy based on your needs. You can account for fragmentation (the total amount of resources in the cluster can be sufficient for one large VM but it might not fit on any of the hosts) and flexibility. Read more here on page 19.
Important: In addition to the user-specified memory reservation, for each virtual machine there is also an amount of overhead memory. This extra memory commitment is included in the admission control calculation and can provide readings that you might not anticipate. It can even prevent you from powering on a VM that, when calculated on paper before, should fit!
- Determine use cases for DRS automation levels and migration thresholds
DRS is a very powerful technology that automatically distributes resources. This is typically used in environments where resources used by VMs vary and can lead to performance bottlenecks or uneven distributed ESX hosts. When turning on DRS the resources are load balanced automatically giving you the best performance. How aggressive you set your DRM depends on the type of VMs. When you have VMs that have a very volatile CPU / MEM usage setting it to conservative might prevent many VMotions that need to be undone some minutes later. When you need the best performance asap you mijght set this to aggressive. Be aware that VMotion uses system resources.
- Determine use cases for DPM policies
I my opinion this should be “allways-on”. It consolidates you VMs on the least amount of ESX hosts needed to accommodate the resources needed savinf energy. If however you expect that VMs need CPU of memory in large amounts faster that you ESX hosts can power on you might disable this. Also HA can be a reason the be conservative on those settings. And last but not least, you hardware must support the shutting down / powering on of the ESX hosts. Technologies like HP iLO can help you make sure you can turn your hosts back on.
Tools
|