Professional Documents
Culture Documents
Vsphere Esxi Vcenter Server 55 Availability Guide
Vsphere Esxi Vcenter Server 55 Availability Guide
This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
EN-001254-00
vSphere Availability
You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com
Copyright 20092013 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
Contents
How Fault Tolerance Works 38 Using Fault Tolerance with DRS 39 Fault Tolerance Use Cases 39 Fault Tolerance Checklist 40 Fault Tolerance Interoperability 41 Preparing Your Cluster and Hosts for Fault Tolerance 42 Providing Fault Tolerance for Virtual Machines 45 Viewing Information About Fault Tolerant Virtual Machines in the vSphere Web Client Best Practices for Fault Tolerance 50 vSphere Fault Tolerance Configuration Recommendations 52
49
Index
53
VMware, Inc.
vSphere Availability
VMware, Inc.
vSphere Availability describes solutions that provide business continuity, including how to establish vSphere High Availability (HA) and vSphere Fault Tolerance.
Intended Audience
This information is for anyone who wants to provide business continuity through the vSphere HA and Fault Tolerance solutions. The information in this book is for experienced Windows or Linux system administrators who are familiar with virtual machine technology and datacenter operations.
VMware, Inc.
vSphere Availability
VMware, Inc.
Downtime, whether planned or unplanned, brings with it considerable costs. However, solutions to ensure higher levels of availability have traditionally been costly, hard to implement, and difficult to manage. VMware software makes it simpler and less expensive to provide higher levels of availability for important applications. With vSphere, organizations can easily increase the baseline level of availability provided for all applications as well as provide higher levels of availability more easily and cost effectively. With vSphere, you can:
n n n
Provide higher availability independent of hardware, operating system, and applications. Reduce planned downtime for common maintenance operations. Provide automatic recovery in cases of failure.
vSphere makes it possible to reduce planned downtime, prevent unplanned downtime, and recover rapidly from outages. This chapter includes the following topics:
n n n n
Reducing Planned Downtime, on page 7 Preventing Unplanned Downtime, on page 8 vSphere HA Provides Rapid Recovery from Outages, on page 8 vSphere Fault Tolerance Provides Continuous Availability, on page 9
Eliminate downtime for common maintenance operations. Eliminate planned maintenance windows. Perform maintenance at any time without disrupting users and services.
VMware, Inc.
vSphere Availability
The vSphere vMotion and Storage vMotion functionality in vSphere makes it possible for organizations to reduce planned downtime because workloads in a VMware environment can be dynamically moved to different physical servers or to different underlying storage without service interruption. Administrators can perform faster and completely transparent maintenance operations, without being forced to schedule inconvenient maintenance windows.
Shared storage. Eliminate single points of failure by storing virtual machine files on shared storage, such as Fibre Channel or iSCSI SAN, or NAS. The use of SAN mirroring and replication features can be used to keep updated copies of virtual disk at disaster recovery sites. Network interface teaming. Provide tolerance of individual network card failures. Storage multipathing. Tolerate storage path failures.
n n
In addition to these capabilities, the vSphere HA and Fault Tolerance features can minimize or eliminate unplanned downtime by providing rapid recovery from outages and continuous availability, respectively.
It protects against a server failure by restarting the virtual machines on other hosts within the cluster. It protects against application failure by continuously monitoring a virtual machine and resetting it in the event that a failure is detected.
Unlike other clustering solutions, vSphere HA provides the infrastructure to protect all workloads with the infrastructure:
n
You do not need to install special software within the application or virtual machine. All workloads are protected by vSphere HA. After vSphere HA is configured, no actions are required to protect new virtual machines. They are automatically protected. You can combine vSphere HA with vSphere Distributed Resource Scheduler (DRS) to protect against failures and to provide load balancing across the hosts within a cluster.
vSphere HA has several advantages over traditional failover solutions: Minimal setup Reduced hardware cost and setup After a vSphere HA cluster is set up, all virtual machines in the cluster get failover support without additional configuration. The virtual machine acts as a portable container for the applications and it can be moved among hosts. Administrators avoid duplicate configurations on multiple machines. When you use vSphere HA, you must have sufficient resources to fail over the number of hosts you want to protect with vSphere HA. However, the vCenter Server system automatically manages resources and configures clusters.
VMware, Inc.
Any application running inside a virtual machine has access to increased availability. Because the virtual machine can recover from hardware failure, all applications that start at boot have increased availability without increased computing needs, even if the application is not itself a clustered application. By monitoring and responding to VMware Tools heartbeats and restarting nonresponsive virtual machines, it protects against guest operating system crashes. If a host fails and virtual machines are restarted on other hosts, DRS can provide migration recommendations or migrate virtual machines for balanced resource allocation. If one or both of the source and destination hosts of a migration fail, vSphere HA can help recover from that failure.
VMware, Inc.
vSphere Availability
10
VMware, Inc.
vSphere HA clusters enable a collection of ESXi hosts to work together so that, as a group, they provide higher levels of availability for virtual machines than each ESXi host can provide individually. When you plan the creation and usage of a new vSphere HA cluster, the options you select affect the way that cluster responds to failures of hosts or virtual machines. Before you create a vSphere HA cluster, you should know how vSphere HA identifies host failures and isolation and how it responds to these situations. You also should know how admission control works so that you can choose the policy that fits your failover needs. After you establish a cluster, you can customize its behavior with advanced attributes and optimize its performance by following recommended best practices. NOTE You might get an error message when you try to use vSphere HA. For information about error messages related to vSphere HA, see the VMware knowledge base article at http://kb.vmware.com/kb/1033634. This chapter includes the following topics:
n n n n n n
How vSphere HA Works, on page 11 vSphere HA Admission Control, on page 19 vSphere HA Checklist, on page 25 Creating a vSphere HA Cluster, on page 26 Customizing vSphere HA Behavior, on page 30 Best Practices for vSphere HA Clusters, on page 33
VMware, Inc.
11
vSphere Availability
Monitoring the state of slave hosts. If a slave host fails or becomes unreachable, the master host identifies which virtual machines need to be restarted. Monitoring the power state of all protected virtual machines. If one virtual machine fails, the master host ensures that it is restarted. Using a local placement engine, the master host also determines where the restart should be done. Managing the lists of cluster hosts and protected virtual machines. Acting as vCenter Server management interface to the cluster and reporting the cluster health state.
n n
The slave hosts primarily contribute to the cluster by running virtual machines locally, monitoring their runtime states, and reporting state updates to the master host. A master host can also run and monitor virtual machines. Both slave hosts and master hosts implement the VM and Application Monitoring features. One of the functions performed by the master host is to orchestrate restarts of protected virtual machines. A virtual machine is protected by a master host after vCenter Server observes that the virtual machine's power state has changed from powered off to powered on in response to a user action. The master host persists the list of protected virtual machines in the cluster's datastores. A newly elected master host uses this information to determine which virtual machines to protect. NOTE If you disconnect a host from a cluster, all of the virtual machines registered to that host are unprotected by vSphere HA.
A host stops functioning (that is, fails). A host becomes network isolated. A host loses network connectivity with the master host.
The master host monitors the liveness of the slave hosts in the cluster. This communication is done through the exchange of network heartbeats every second. When the master host stops receiving these heartbeats from a slave host, it checks for host liveness before declaring the host to have failed. The liveness check that the master host performs is to determine whether the slave host is exchanging heartbeats with one of the datastores. See Datastore Heartbeating, on page 16. Also, the master host checks whether the host responds to ICMP pings sent to its management IP addresses.
12
VMware, Inc.
If a master host is unable to communicate directly with the agent on a slave host, the slave host does not respond to ICMP pings, and the agent is not issuing heartbeats it is considered to have failed. The host's virtual machines are restarted on alternate hosts. If such a slave host is exchanging heartbeats with a datastore, the master host assumes that it is in a network partition or network isolated and so continues to monitor the host and its virtual machines. See Network Partitions, on page 15. Host network isolation occurs when a host is still running, but it can no longer observe traffic from vSphere HA agents on the management network. If a host stops observing this traffic, it attempts to ping the cluster isolation addresses. If this also fails, the host declares itself as isolated from the network. The master host monitors the virtual machines that are running on an isolated host and if it observes that they power off, and the master host is responsible for the virtual machines, it restarts them. NOTE If you ensure that the network infrastructure is sufficiently redundant and that at least one network path is available at all times, host network isolation should be a rare occurrence.
VM Restart Priority
VM restart priority determines the relative order in which virtual machines are placed on new hosts after a host failure. Such virtual machines are restarted, with the highest priority virtual machines attempted first and continuing to those with lower priority until all virtual machines are restarted or no more cluster resources are available. Note that if vSphere HA fails to power on a high-priority virtual machine, it does proceed to try any lower-priority virtual machines. Because of this, the VM restart priority cannot be used to enforce a restart priority for a multiple virtual machine application. Also, if the number of hosts failures exceeds what admission control permits, the virtual machines with lower priority might not be restarted until more resources become available. Virtual machines are restarted on the failover hosts, if specified. The values for this setting are: Disabled, Low, Medium (the default), and High. If you select Disabled, vSphere HA is disabled for the virtual machine, which means that it is not restarted on other ESXi hosts if its host fails. The Disabled setting is ignored by the vSphere HA VM/Application monitoring feature since this feature protects virtual machines against operating system-level failures and not virtual machine failures. When an operating system-level failure occurs, the operating system is rebooted by vSphere HA and the virtual machine is left running on the same host. You can change this setting for individual virtual machines. NOTE A virtual machine reset causes a hard guest operating system reboot but does not power cycle the virtual machine. The restart priority settings for virtual machines vary depending on user needs. Assign higher restart priority to the virtual machines that provide the most important services. For example, in the case of a multitier application you might rank assignments according to functions hosted on the virtual machines.
n n n
High. Database servers that will provide data for applications. Medium. Application servers that consume data in the database and provide results on web pages. Low. Web servers that receive user requests, pass queries to application servers, and return results to users.
VMware, Inc.
13
vSphere Availability
14
VMware, Inc.
Occasionally, virtual machines or applications that are still functioning properly stop sending heartbeats. To avoid unnecessary resets, the VM Monitoring service also monitors a virtual machine's I/O activity. If no heartbeats are received within the failure interval, the I/O stats interval (a cluster-level attribute) is checked. The I/O stats interval determines if any disk or network activity has occurred for the virtual machine during the previous two minutes (120 seconds). If not, the virtual machine is reset. This default value (120 seconds) can be changed using the advanced attribute das.iostatsinterval. To enable Application Monitoring, you must first obtain the appropriate SDK (or be using an application that supports VMware Application Monitoring) and use it to set up customized heartbeats for the applications you want to monitor. After you have done this, Application Monitoring works much the same way that VM Monitoring does. If the heartbeats for an application are not received for a specified time, its virtual machine is restarted. You can configure the level of monitoring sensitivity. Highly sensitive monitoring results in a more rapid conclusion that a failure has occurred. While unlikely, highly sensitive monitoring might lead to falsely identifying failures when the virtual machine or application in question is actually still working, but heartbeats have not been received due to factors such as resource constraints. Low sensitivity monitoring results in longer interruptions in service between actual failures and virtual machines being reset. Select an option that is an effective compromise for your needs. The default settings for monitoring sensitivity are described in Table 2-1. You can also specify custom values for both monitoring sensitivity and the I/O stats interval by selecting the Custom checkbox. Table 21. VM Monitoring Settings
Setting High Medium Low Failure Interval (seconds) 30 60 120 Reset Period 1 hour 24 hours 7 days
After failures are detected, vSphere HA resets virtual machines. The reset ensures that services remain available. To avoid resetting virtual machines repeatedly for nontransient errors, by default, virtual machines will be reset only three times during a certain configurable time interval. After virtual machines have been reset three times, vSphere HA makes no further attempts to reset the virtual machines after subsequent failures until after the specified time has elapsed. You can configure the number of resets using the Maximum per-VM resets custom setting. NOTE The reset statistics are cleared when a virtual machine is powered off then back on, or when it is migrated using vMotion to another host. This causes the guest operating system to reboot, but is not the same as a 'restart' in which the power state of the virtual machine is changed.
Network Partitions
When a management network failure occurs for a vSphere HA cluster, a subset of the cluster's hosts might be unable to communicate over the management network with the other hosts. Multiple partitions can occur in a cluster. A partitioned cluster leads to degraded virtual machine protection and cluster management functionality. Correct the partitioned cluster as soon as possible.
n
Virtual machine protection. vCenter Server allows a virtual machine to be powered on, but it can be protected only if it is running in the same partition as the master host that is responsible for it. The master host must be communicating with vCenter Server. A master host is responsible for a virtual machine if it has exclusively locked a system-defined file on the datastore that contains the virtual machine's configuration file.
VMware, Inc.
15
vSphere Availability
Cluster management. vCenter Server can communicate with only some of the hosts in the cluster, and it can connect to only one master host. As a result, changes in configuration that affect vSphere HA might not take effect until after the partition is resolved. This failure could result in one of the partitions operating under the old configuration, while another uses the new settings.
If a vSphere HA cluster contains pre-ESXi 5.0 hosts and a partition occurs, vSphere HA might incorrectly power on a virtual machine that was powered off by the user or it might fail to restart a virtual machine that failed.
Datastore Heartbeating
When the master host in a vSphere HA cluster can not communicate with a slave host over the management network, the master host uses datastore heartbeating to determine whether the slave host has failed, is in a network partition, or is network isolated. If the slave host has stopped datastore heartbeating, it is considered to have failed and its virtual machines are restarted elsewhere. vCenter Server selects a preferred set of datastores for heartbeating. This selection is made to maximize the number of hosts that have access to a heartbeating datastore and minimize the likelihood that the datastores are backed by the same LUN or NFS server. You can use the advanced attribute das.heartbeatdsperhost to change the number of heartbeat datastores selected by vCenter Server for each host. The default is two and the maximum valid value is five. vSphere HA creates a directory at the root of each datastore that is used for both datastore heartbeating and for persisting the set of protected virtual machines. The name of the directory is .vSphere-HA. Do not delete or modify the files stored in this directory, because this can have an impact on operations. Because more than one cluster might use a datastore, subdirectories for this directory are created for each cluster. Root owns these directories and files and only root can read and write to them. The disk space used by vSphere HA depends on several factors including which VMFS version is in use and the number of hosts that use the datastore for heartbeating. With vmfs3, the maximum usage is approximately 2GB and the typical usage is approximately 3MB. With vmfs5 the maximum and typical usage is approximately 3MB. vSphere HA use of the datastores adds negligible overhead and has no performance impact on other datastore operations. vSphere HA limits the number of virtual machines that can have configuration files on a single datastore. See Configuration Maximums for updated limits. If you place more than this number of virtual machines on a datastore and power them on, vSphere HA protects a number of virtual machines only up to the limit. NOTE A Virtual SAN datastore cannot be used for datastore heartbeating. Therefore, if no other shared storage is accessible to all hosts in the cluster, there can be no heartbeat datastores in use. However, if you have storage that can be reached by an alternate network path that is independent of the Virtual SAN network, you can use it to set up a heartbeat datastore.
vSphere HA Security
vSphere HA is enhanced by several security features. Select firewall ports opened Configuration files protected using file system permissions vSphere HA uses TCP and UDP port 8182 for agent-to-agent communication. The firewall ports open and close automatically to ensure they are open only when needed. vSphere HA stores configuration information on the local storage or on ramdisk if there is no local datastore. These files are protected using file system permissions and they are accessible only to the root user. Hosts without local storage are only supported if they are managed by Auto Deploy.
16
VMware, Inc.
Detailed logging
The location where vSphere HA places log files depends on the version of host.
n
For ESXi 5.x hosts, vSphere HA writes to syslog only by default, so logs are placed where syslog is configured to put them. The log file names for vSphere HA are prepended with fdm, fault domain manager, which is a service of vSphere HA. For legacy ESXi 4.x hosts, vSphere HA writes to /var/log/vmware/fdm on local disk, as well as syslog if it is configured. For legacy ESX 4.x hosts, vSphere HA writes to /var/log/vmware/fdm.
vSphere HA logs onto the vSphere HA agents using a user account, vpxuser, created by vCenter Server. This account is the same account used by vCenter Server to manage the host. vCenter Server creates a random password for this account and changes the password periodically. The time period is set by the vCenter Server VirtualCenter.VimPasswordExpirationInDays setting. Users with administrative privileges on the root folder of the host can log in to the agent. All communication between vCenter Server and the vSphere HA agent is done over SSL. Agent-to-agent communication also uses SSL except for election messages, which occur over UDP. Election messages are verified over SSL so that a rogue agent can prevent only the host on which the agent is running from being elected as a master host. In this case, a configuration issue for the cluster is issued so the user is aware of the problem. vSphere HA requires that each host have a verified SSL certificate. Each host generates a self-signed certificate when it is booted for the first time. This certificate can then be regenerated or replaced with one issued by an authority. If the certificate is replaced, vSphere HA needs to be reconfigured on the host. If a host becomes disconnected from vCenter Server after its certificate is updated and the ESXi or ESX Host agent is restarted, then vSphere HA is automatically reconfigured when the host is reconnected to vCenter Server. If the disconnection does not occur because vCenter Server host SSL certificate verification is disabled at the time, verify the new certificate and reconfigure vSphere HA on the host.
Secure communication
The cluster's ESXi hosts all must be version 5.5 or later. The cluster must have a minimum of three ESXi hosts.
VMware, Inc.
17
vSphere Availability
Networking Differences
Virtual SAN has its own network. When Virtual SAN and vSphere HA are enabled for the same cluster, the HA interagent traffic flows over this storage network rather than the management network. The management network is used by vSphere HA only when Virtual SAN is disabled. vCenter Server chooses the appropriate network when vSphere HA is configured on a host. NOTE Virtual SAN can only be enabled when vSphere HA is disabled. If you change the Virtual SAN network configuration, the vSphere HA agents do not automatically pick up the new network settings. So to make changes to the Virtual SAN network, you must take the following steps in the vSphere Web Client: 1 2 3 4 Disable Host Monitoring for the vSphere HA cluster. Make the Virtual SAN network changes. Right-click all hosts in the cluster and select Reconfigure HA. Re-enable Host Monitoring for the vSphere HA cluster.
Table 2-2 shows the differences in vSphere HA networking when Virtual SAN is used or not. Table 22. vSphere HA networking differences
Virtual SAN Enabled Network used by vSphere HA Heartbeat datastores Host declared isolated Virtual SAN storage network Any datastore mounted to > 1 host, but not Virtual SAN datastores Isolation addresses not pingable and Virtual SAN storage network inaccessible Virtual SAN Disabled Management network Any datastore mounted to > 1 host Isolation addresses not pingable and management network inaccessible
18
VMware, Inc.
HA admission control is disabled and Distributed Power Management (DPM) is enabled. This can result in DPM consolidating virtual machines onto fewer hosts and placing the empty hosts in standby mode leaving insufficient powered-on capacity to perform a failover. VM-Host affinity (required) rules might limit the hosts on which certain virtual machines can be placed. There might be sufficient aggregate resources but these can be fragmented across multiple hosts so that they can not be used by virtual machines for failover.
n n
In such cases, vSphere HA can use DRS to try to adjust the cluster (for example, by bringing hosts out of standby mode or migrating virtual machines to defragment the cluster resources) so that HA can perform the failovers. If DPM is in manual mode, you might need to confirm host power-on recommendations. Similarly, if DRS is in manual mode, you might need to confirm migration recommendations. If you are using VM-Host affinity rules that are required, be aware that these rules cannot be violated. vSphere HA does not perform a failover if doing so would violate such a rule. For more information about DRS, see the vSphere Resource Management documentation.
Admission control imposes constraints on resource usage and any action that would violate these constraints is not permitted. Examples of actions that could be disallowed include the following:
n
VMware, Inc.
19
vSphere Availability
n n
Migrating a virtual machine onto a host or into a cluster or resource pool. Increasing the CPU or memory reservation of a virtual machine.
Of the three types of admission control, only vSphere HA admission control can be disabled. However, without it there is no assurance that the expected number of virtual machines can be restarted after a failure. Do not disable admission control, however you might need to do so temporarily, for the following reasons:
n
If you need to violate the failover constraints when there are not enough resources to support them--for example, if you are placing hosts in standby mode to test them for use with Distributed Power Management (DPM). If an automated process needs to take actions that might temporarily violate the failover constraints (for example, as part of an upgrade directed by vSphere Update Manager). If you need to perform testing or maintenance operations.
Admission control sets aside capacity, but when a failure occurs vSphere HA uses whatever capacity is available for virtual machine restarts. For example, vSphere HA places more virtual machines on a host than admission control would allow for user-initiated power ons. NOTE When vSphere HA admission control is disabled, vSphere HA ensures that there are at least two powered-on hosts in the cluster even if DPM is enabled and can consolidate all virtual machines onto a single host. This is to ensure that failover is possible.
vSphere HA calculates the CPU component by obtaining the CPU reservation of each powered-on virtual machine and selecting the largest value. If you have not specified a CPU reservation for a virtual machine, it is assigned a default value of 32MHz. You can change this value by using the das.vmcpuminmhz advanced attribute.)
20
VMware, Inc.
vSphere HA calculates the memory component by obtaining the memory reservation, plus memory overhead, of each powered-on virtual machine and selecting the largest value. There is no default value for the memory reservation.
If your cluster contains any virtual machines that have much larger reservations than the others, they will distort slot size calculation. To avoid this, you can specify an upper bound for the CPU or memory component of the slot size by using the das.slotcpuinmhz or das.slotmeminmb advanced attributes, respectively. See vSphere HA Advanced Attributes, on page 31. You can also determine the risk of resource fragmentation in your cluster by viewing the number of virtual machines that require multiple slots. This can be calculated in the admission control section of the vSphere HA settings in the vSphere Web Client. Virtual machines might require multiple slots if you have specified a fixed slot size or a maximum slot size using advanced options.
Slot size. Total slots in cluster. The sum of the slots supported by the good hosts in the cluster. Used slots. The number of slots assigned to powered-on virtual machines. It can be more than the number of powered-on virtual machines if you have defined an upper bound for the slot size using the advanced options. This is because some virtual machines can take up multiple slots. Available slots. The number of slots available to power on additional virtual machines in the cluster. vSphere HA reserves the required number of slots for failover. The remaining slots are available to power on new virtual machines. Failover slots. The total number of slots not counting the used slots or the available slots. Total number of powered on virtual machines in cluster. Total number of hosts in cluster. Total good hosts in cluster. The number of hosts that are connected, not in maintenance mode, and have no vSphere HA errors.
n n n n
VMware, Inc.
21
vSphere Availability
The cluster is comprised of three hosts, each with a different amount of available CPU and memory resources. The first host (H1) has 9GHz of available CPU resources and 9GB of available memory, while Host 2 (H2) has 9GHz and 6GB and Host 3 (H3) has 6GHz and 6GB. There are five powered-on virtual machines in the cluster with differing CPU and memory requirements. VM1 needs 2GHz of CPU resources and 1GB of memory, while VM2 needs 2GHz and 1GB, VM3 needs 1GHz and 2GB, VM4 needs 1GHz and 1GB, and VM5 needs 1GHz and 1GB. The Host Failures Cluster Tolerates is set to one.
Figure 21. Admission Control Example with Host Failures Cluster Tolerates Policy
22
VMware, Inc.
The CPU component by summing the CPU reservations of the powered-on virtual machines. If you have not specified a CPU reservation for a virtual machine, it is assigned a default value of 32MHz (this value can be changed using the das.vmcpuminmhz advanced attribute.) The memory component by summing the memory reservation (plus memory overhead) of each powered-on virtual machine.
The total host resources available for virtual machines is calculated by adding the hosts' CPU and memory resources. These amounts are those contained in the host's root resource pool, not the total physical resources of the host. Resources being used for virtualization purposes are not included. Only hosts that are connected, not in maintenance mode, and have no vSphere HA errors are considered. The Current CPU Failover Capacity is computed by subtracting the total CPU resource requirements from the total host CPU resources and dividing the result by the total host CPU resources. The Current Memory Failover Capacity is calculated similarly.
The cluster is comprised of three hosts, each with a different amount of available CPU and memory resources. The first host (H1) has 9GHz of available CPU resources and 9GB of available memory, while Host 2 (H2) has 9GHz and 6GB and Host 3 (H3) has 6GHz and 6GB.
VMware, Inc.
23
vSphere Availability
There are five powered-on virtual machines in the cluster with differing CPU and memory requirements. VM1 needs 2GHz of CPU resources and 1GB of memory, while VM2 needs 2GHz and 1GB, VM3 needs 1GHz and 2GB, VM4 needs 1GHz and 1GB, and VM5 needs 1GHz and 1GB. The Configured Failover Capacity for CPU and Memory are both set to 25%.
Figure 22. Admission Control Example with Percentage of Cluster Resources Reserved Policy
total resource requirements 7GHz, 6GB H1 9GHz 9GB H2 9GHz 6GB H3 6GHz 6GB
Green. The host is connected, not in maintenance mode, and has no vSphere HA errors. No powered-on virtual machines reside on the host. Yellow. The host is connected, not in maintenance mode, and has no vSphere HA errors. However, powered-on virtual machines reside on the host.
24
VMware, Inc.
Heterogeneity of Cluster
Clusters can be heterogeneous in terms of virtual machine resource reservations and host total resource capacities. In a heterogeneous cluster, the Host Failures Cluster Tolerates policy can be too conservative because it only considers the largest virtual machine reservations when defining slot size and assumes the largest hosts fail when computing the Current Failover Capacity. The other two admission control policies are not affected by cluster heterogeneity. NOTE vSphere HA includes the resource usage of Fault Tolerance Secondary VMs when it performs admission control calculations. For the Host Failures Cluster Tolerates policy, a Secondary VM is assigned a slot, and for the Percentage of Cluster Resources policy, the Secondary VM's resource usage is accounted for when computing the usable capacity of the cluster.
vSphere HA Checklist
The vSphere HA checklist contains requirements that you need to be aware of before creating and using a vSphere HA cluster.
All hosts must be licensed for vSphere HA. You need at least two hosts in the cluster. All hosts need to be configured with static IP addresses. If you are using DHCP, you must ensure that the address for each host persists across reboots. There should be at least one management network in common among all hosts and best practice is to have at least two. Management networks differ depending on the version of host you are using.
n
VMware, Inc.
25
vSphere Availability
n n
ESXi hosts earlier than version 4.0 - VMkernel network. ESXi hosts version 4.0 and later ESXi hosts - VMkernel network with the Management traffic checkbox enabled.
To ensure that any virtual machine can run on any host in the cluster, all hosts should have access to the same virtual machine networks and datastores. Similarly, virtual machines must be located on shared, not local, storage otherwise they cannot be failed over in the case of a host failure. NOTE vSphere HA uses datastore heartbeating to distinguish between partitioned, isolated, and failed hosts. Accordingly, if there are some datastores that are more reliable in your environment, configure vSphere HA to give preference to them.
For VM Monitoring to work, VMware tools must be installed. See VM and Application Monitoring, on page 14. vSphere HA supports both IPv4 and IPv6. A cluster that mixes the use of both of these protocol versions, however, is more likely to result in a network partition.
26
VMware, Inc.
Verify that hosts are configured to have access to the virtual machine network. NOTE Use redundant management network connections for vSphere HA. For information about setting up network redundancy, see Network Path Redundancy, on page 36. You should also configure hosts with at least two datastores to provide redundancy for vSphere HA datastore heartbeating. Procedure 1 2 3 In the vSphere Web Client browse to the Datacenter where you want the cluster to reside. Click Create a Cluster . Complete the New Cluster wizard. Do not turn on vSphere HA (or DRS). 4 Click OK to close the wizard and create the cluster. You have created an empty cluster. 5 6 7 8 9 10 Based on your plan for the resources and networking architecture of the cluster, use the vSphere Web Client to add hosts to the cluster. Browse to the cluster. Click the Manage tab and click Settings. Select vSphere HA and click Edit. Select Turn ON vSphere HA. Configure the vSphere HA settings as appropriate for your cluster.
n n n n n
11
Click OK.
You have a configured vSphere HA cluster, populated with hosts. See Configuring vSphere HA Cluster Settings in the vSphere Web Client, on page 28. NOTE A vSphere HA-enabled cluster is a prerequisite for Fault Tolerance.
VMware, Inc.
27
vSphere Availability
Host monitoring is enabled and your virtual machine restart priority and host isolation response settings take effect.
28
VMware, Inc.
Click OK.
Admission control is enabled and the policy that you chose takes effect.
VMware, Inc.
29
vSphere Availability
Click OK.
In the Available heartbeat datastores pane, select the datastores that you want to use for heartbeating. The datastores listed are those shared by more than one host in the vSphere HA cluster. When a datastore is selected, the lower pane displays all the hosts in the vSphere HA cluster that can access it.
Click OK.
30
VMware, Inc.
Click Add and type the name of the advanced option in the text box. You can set the value of the option in the text box in the Value column.
Repeat step 5 for each new option that you want to add and click OK.
das.usedefaultisolationaddress
das.isolationshutdowntimeout
das.slotmeminmb
das.slotcpuinmhz
das.vmmemoryminmb
das.vmcpuminmhz
das.iostatsinterval
das.ignoreinsufficienthbdatastore
VMware, Inc.
31
vSphere Availability
das.respectvmvmantiaffinityrules
NOTE If you change the value of any of the following advanced attributes, you must disable and then reenable vSphere HA before your changes take effect.
n n n
das.consoleUser das.consoleNode das.consolePerm das.primaryCount das.checkVmStateDelay das.trace das.traceLevel das.traceOutput das.preferredPrimaries das.disableUWSwapRequirement das.sensorPollingFreq das.bypassNetCompatCheck das.defaultfailoverhost das.failureDetectionTime das.failureDetectionInterval
If you attempt to set one of the unsupported options, vCenter Server reports that the option is not valid. Also, if you upgrade to vCenter Server 5.x from a previous version with any of these options defined, they are deleted and are no longer in effect.
32
VMware, Inc.
The virtual machines behavior now differs from the cluster defaults for each setting that you changed.
Insufficient failover resources (a cluster alarm) Cannot find master (a cluster alarm) Failover in progress (a cluster alarm) Host HA status (a host alarm) VM monitoring error (a virtual machine alarm) VM monitoring action (a virtual machine alarm) Failover failed (a virtual machine alarm)
NOTE The default alarms include the feature name, vSphere HA.
VMware, Inc.
33
vSphere Availability
A cluster enabled for vSphere HA becomes invalid when the number of virtual machines powered on exceeds the failover requirements, that is, the current failover capacity is smaller than configured failover capacity. If admission control is disabled, clusters do not become invalid. In the vSphere Web Client, select vSphere HA from the cluster's Monitor tab and then select Configuration Issues. A list of current vSphere HA issues appears. DRS behavior is not affected if a cluster is red because of a vSphere HA issue.
Select the Percentage of Cluster Resources Reserved admission control policy. This policy offers the most flexibility in terms of host and virtual machine sizing. When configuring this policy, choose a percentage for CPU and memory that reflects the number of host failures you want to support. For example, if you want vSphere HA to set aside resources for two host failures and have ten hosts of equal capacity in the cluster, then specify 20% (2/10). Ensure that you size all cluster hosts equally. For the Host Failures Cluster Tolerates policy, an unbalanced cluster results in excess capacity being reserved to handle failures because vSphere HA reserves capacity for the largest hosts. For the Percentage of Cluster Resources Policy, an unbalanced cluster requires that you specify larger percentages than would otherwise be necessary to reserve enough capacity for the anticipated number of host failures. If you plan to use the Host Failures Cluster Tolerates policy, try to keep virtual machine sizing requirements similar across all configured virtual machines. This policy uses slot sizes to calculate the amount of capacity needed to reserve for each virtual machine. The slot size is based on the largest reserved memory and CPU needed for any virtual machine. When you mix virtual machines of different CPU and memory requirements, the slot size calculation defaults to the largest possible, which limits consolidation. If you plan to use the Specify Failover Hosts policy, decide how many host failures to support and then specify this number of hosts as failover hosts. If the cluster is unbalanced, the designated failover hosts should be at least the same size as the non-failover hosts in your cluster. This ensures that there is adequate capacity in case of failure.
34
VMware, Inc.
When making changes to the networks that your clustered ESXi hosts are on, suspend the Host Monitoring feature. Changing your network hardware or networking settings can interrupt the heartbeats that vSphere HA uses to detect host failures, and this might result in unwanted attempts to fail over virtual machines. When you change the networking configuration on the ESXi hosts themselves, for example, adding port groups, or removing vSwitches, suspend Host Monitoring. After you have made the networking configuration changes, you must reconfigure vSphere HA on all hosts in the cluster, which causes the network information to be reinspected. Then re-enable Host Monitoring.
NOTE Because networking is a vital component of vSphere HA, if network maintenance needs to be performed inform the vSphere HA administrator.
On legacy ESX hosts in the cluster, vSphere HA communications travel over all networks that are designated as service console networks. VMkernel networks are not used by these hosts for vSphere HA communications. On ESXi hosts in the cluster, vSphere HA communications, by default, travel over VMkernel networks, except those marked for use with vMotion. If there is only one VMkernel network, vSphere HA shares it with vMotion, if necessary. With ESXi 4.x and ESXi, you must also explicitly enable the Management traffic checkbox for vSphere HA to use this network.
NOTE To keep vSphere HA agent traffic on the networks you have specified, configure hosts so vmkNICs used by vSphere HA do not share subnets with vmkNICs used for other purposes. vSphere HA agents send packets using any pNIC that is associated with a given subnet if there is also at least one vmkNIC configured for vSphere HA management traffic. Consequently, to ensure network flow separation, the vmkNICs used by vSphere HA and by other features must be on different subnets.
VMware, Inc.
35
vSphere Availability
After you have added a NIC to a host in your vSphere HA cluster, you must reconfigure vSphere HA on that host.
36
VMware, Inc.
You can enable vSphere Fault Tolerance for your virtual machines to ensure business continuity with higher levels of availability and data protection than is offered by vSphere HA. Fault Tolerance is built on the ESXi host platform (using the VMware vLockstep technology), and it provides continuous availability by having identical virtual machines run in virtual lockstep on separate hosts. To obtain the optimal results from Fault Tolerance you should be familiar with how it works, how to enable it for your cluster and virtual machines, and the best practices for its usage. NOTE You might encounter error messages when trying to use Fault Tolerance. For information on error messages related to Fault Tolerance, see the VMware knowledge base article at http://kb.vmware.com/kb/1033634. This chapter includes the following topics:
n n n n n n n n
How Fault Tolerance Works, on page 38 Using Fault Tolerance with DRS, on page 39 Fault Tolerance Use Cases, on page 39 Fault Tolerance Checklist, on page 40 Fault Tolerance Interoperability, on page 41 Preparing Your Cluster and Hosts for Fault Tolerance, on page 42 Providing Fault Tolerance for Virtual Machines, on page 45 Viewing Information About Fault Tolerant Virtual Machines in the vSphere Web Client, on page 49 Best Practices for Fault Tolerance, on page 50 vSphere Fault Tolerance Configuration Recommendations, on page 52
n n
VMware, Inc.
37
vSphere Availability
logging traffic
The Primary and Secondary VMs continuously exchange heartbeats. This exchange allows the virtual machine pair to monitor the status of one another to ensure that Fault Tolerance is continually maintained. A transparent failover occurs if the host running the Primary VM fails, in which case the Secondary VM is immediately activated to replace the Primary VM. A new Secondary VM is started and Fault Tolerance redundancy is reestablished within a few seconds. If the host running the Secondary VM fails, it is also immediately replaced. In either case, users experience no interruption in service and no loss of data. A fault tolerant virtual machine and its secondary copy are not allowed to run on the same host. This restriction ensures that a host failure cannot result in the loss of both virtual machines. You can also use VMHost affinity rules to dictate which hosts designated virtual machines can run on. If you use these rules, be aware that for any Primary VM that is affected by such a rule, its associated Secondary VM is also affected by that rule. For more information about affinity rules, see the vSphere Resource Management documentation. Fault Tolerance avoids "split-brain" situations, which can lead to two active copies of a virtual machine after recovery from a failure. Atomic file locking on shared storage is used to coordinate failover so that only one side continues running as the Primary VM and a new Secondary VM is respawned automatically. NOTE The anti-affinity check is performed when the Primary VM is powered on. It is possible that the Primary and Secondary VMs can be on the same host when they are both in a powered-off state. This is normal behavior and when the Primary VM is powered on, the Secondary VM is started on a different host at that time.
38
VMware, Inc.
Applications that need to be available at all times, especially those that have long-lasting client connections that users want to maintain during hardware failure. Custom applications that have no other way of doing clustering. Cases where high availability might be provided through custom clustering solutions, which are too complicated to configure and maintain.
n n
VMware, Inc.
39
vSphere Availability
At least two FT-certified hosts running the same Fault Tolerance version or host build number. The Fault Tolerance version number appears on a host's Summary tab in the vSphere Web Client. NOTE For legacy hosts prior to ESX/ESXi 4.1, this tab lists the host build number instead. Patches can cause host build numbers to vary between ESX and ESXi installations. To ensure that your legacy hosts are FT compatible, do not mix legacy ESX and ESXi hosts in an FT pair.
ESXi hosts have access to the same virtual machine datastores and networks. See Best Practices for Fault Tolerance, on page 50. Fault Tolerance logging and VMotion networking configured. See Configure Networking for Host Machines in the vSphere Web Client, on page 43. vSphere HA cluster created and enabled. See Creating a vSphere HA Cluster, on page 26. vSphere HA must be enabled before you can power on fault tolerant virtual machines or add a host to a cluster that already supports fault tolerant virtual machines.
Hosts must have processors from the FT-compatible processor group. It is also highly recommended that the hosts' processors are compatible with one another. See the VMware knowledge base article at http://kb.vmware.com/kb/1008027 for information on supported processors. Hosts must be licensed for Fault Tolerance. Hosts must be certified for Fault Tolerance. See http://www.vmware.com/resources/compatibility/search.php and select Search by Fault Tolerant Compatible Sets to determine if your hosts are certified. The configuration for each host must have Hardware Virtualization (HV) enabled in the BIOS.
n n
To confirm the compatibility of the hosts in the cluster to support Fault Tolerance, you can also run profile compliance checks as described in Create Cluster and Check Compliance in the vSphere Web Client, on page 45.
No unsupported devices attached to the virtual machine. See Fault Tolerance Interoperability, on page 41.
40
VMware, Inc.
Virtual machines must be stored in virtual RDM or virtual machine disk (VMDK) files that are thick provisioned. If a virtual machine is stored in a VMDK file that is thin provisioned and an attempt is made to enable Fault Tolerance, a message appears indicating that the VMDK file must be converted. To perform the conversion, you must power off the virtual machine. vSphere Fault Tolerance is not supported with a 2TB+ VMDK. Incompatible features must not be running with the fault tolerant virtual machines. See Fault Tolerance Interoperability, on page 41. Virtual machine files must be stored on shared storage. Acceptable shared storage solutions include Fibre Channel, (hardware and software) iSCSI, NFS, and NAS. Only virtual machines with a single vCPU are compatible with Fault Tolerance. Virtual machines must be running on one of the supported guest operating systems. See the VMware knowledge base article at http://kb.vmware.com/kb/1008027 for more information.
n n
n n
Snapshots. Snapshots must be removed or committed before Fault Tolerance can be enabled on a virtual machine. In addition, it is not possible to take snapshots of virtual machines on which Fault Tolerance is enabled. Storage vMotion. You cannot invoke Storage vMotion for virtual machines with Fault Tolerance turned on. To migrate the storage, you should temporarily turn off Fault Tolerance, and perform the storage vMotion action. When this is complete, you can turn Fault Tolerance back on. Linked clones. You cannot enable Fault Tolerance on a virtual machine that is a linked clone, nor can you create a linked clone from an FT-enabled virtual machine. Virtual Machine Backups. You cannot back up an FT-enabled virtual machine using Storage API for Data Protection, vSphere Data Protection, or similar backup products that require the use of a virtual machine snapshot, as performed by ESXi. To back up a fault tolerant virtual machine in this manner, you must first disable FT, then re-enable FT after performing the backup. Storage array-based snapshots do not affect FT. Virtual SAN.
VMware, Inc.
41
vSphere Availability
Table 31. Features and Devices Incompatible with Fault Tolerance and Corrective Actions (Continued)
Incompatible Feature or Device CD-ROM or floppy virtual devices backed by a physical or remote device. Paravirtualized guests. USB and sound devices. N_Port ID Virtualization (NPIV). NIC passthrough. vlance networking drivers. Corrective Action Remove the CD-ROM or floppy virtual device or reconfigure the backing with an ISO installed on shared storage. If paravirtualization is not required, reconfigure the virtual machine without a VMI ROM. Remove these devices from the virtual machine. Disable the NPIV configuration of the virtual machine. This feature is not supported by Fault Tolerance so it must be turned off. Fault Tolerance does not support virtual machines that are configured with vlance virtual NIC cards. However, vmxnet2, vmxnet3, and e1000 are fully supported. When you turn on Fault Tolerance, the conversion to the appropriate disk format is performed by default. You must power off the virtual machine to trigger this conversion. The hot plug feature is automatically disabled for fault tolerant virtual machines. To hot plug devices (either adding or removing), you must momentarily turn off Fault Tolerance, perform the hot plug, and then turn on Fault Tolerance. NOTE When using Fault Tolerance, changing the settings of a virtual network card while a virtual machine is running is a hot-plug operation, since it requires "unplugging" the network card and then "plugging" it in again. For example, with a virtual network card for a running virtual machine, if you change the network that the virtual NIC is connected to, FT must be turned off first. EPT/RVI is automatically disabled for virtual machines with Fault Tolerance turned on. Remove these devices from the virtual machine. Use IPv4 addresses with the FT logging NIC. Fault Tolerance does not support video devices that have 3D enabled. Ensure that the virtual machine is configured to use BIOS firmware before installing the guest operating system.
Virtual disks backed with thin-provisioned storage or thick-provisioned disks that do not have clustering features enabled. Hot-plugging devices.
Extended Page Tables/Rapid Virtualization Indexing (EPT/RVI). Serial or parallel ports IPv6 Video devices that have 3D enabled. Virtual EFI firmware
Configure networking for each host. Create the vSphere HA cluster, add hosts, and check compliance.
After your cluster and hosts are prepared for Fault Tolerance, you are ready to turn on Fault Tolerance for your virtual machines. See Turn On Fault Tolerance for Virtual Machines in the vSphere Web Client, on page 47.
42
VMware, Inc.
After you create both a vMotion and Fault Tolerance logging virtual switch, you can create other virtual switches, as needed. Add the host to the cluster and complete any steps needed to turn on Fault Tolerance. What to do next NOTE If you configure networking to support FT but subsequently disable the Fault Tolerance logging port, pairs of fault tolerant virtual machines that are powered on remain powered on. If a failover situation occurs, when the Primary VM is replaced by its Secondary VM a new Secondary VM is not started, causing the new Primary VM to run in a Not Protected state.
VMware, Inc.
43
vSphere Availability
NIC Teaming policies are configured on the vSwitch (vSS) Port Groups (or Distributed Virtual Port Groups for vDS) and govern how the vSwitch will handle and distribute traffic over the physical NICs (vmnics) from virtual machines and vmkernel ports. A unique Port Group is typically used for each traffic type with each traffic type typically assigned to a different VLAN.
Distribute each NIC team over two physical switches ensuring L2 domain continuity for each VLAN between the two physical switches. Use deterministic teaming policies to ensure particular traffic types have an affinity to a particular NIC (active/standby) or set of NICs (for example, originating virtual port-id). Where active/standby policies are used, pair traffic types to minimize impact in a failover situation where both traffic types will share a vmnic. Where active/standby policies are used, configure all the active adapters for a particular traffic type (for example, FT Logging) to the same physical switch. This minimizes the number of network hops and lessens the possibility of oversubscribing the switch to switch links.
VLAN A: Virtual Machine Network Port Group-active on vmnic2 (to physical switch #1); standby on vmnic0 (to physical switch #2.) VLAN B: Management Network Port Group-active on vmnic0 (to physical switch #2); standby on vmnic2 (to physical switch #1.) VLAN C: vMotion Port Group-active on vmnic1 (to physical switch #2); standby on vmnic3 (to physical switch #1.) VLAN D: FT Logging Port Group-active on vmnic3 (to physical switch #1); standby on vmnic1 (to physical switch #2.)
vMotion and FT Logging can share the same VLAN (configure the same VLAN number in both port groups), but require their own unique IP addresses residing in different IP subnets. However, separate VLANs might be preferred if Quality of Service (QoS) restrictions are in effect on the physical network with VLAN based QoS. QoS is of particular use where competing traffic comes into play, for example, where multiple physical switch hops are used or when a failover occurs and multiple traffic types compete for network resources.
44
VMware, Inc.
VLAN A
VLAN B
VLAN D
VLAN C
vmnic2 VLAN Trunks on uplinks Physical switch ports configured as VLAN trunks and carry VLANs A, B, C, and D
vmnic0
vmnic3
vmnic1
vSwitch (vSS or vDS) in Virtual Switch Trunking (VST) ModeVLAN tagged frames passed on uplinks to/from vmnics physical switch 1 physical switch 2
The results of the compliance test appear, and the compliance or noncompliance of each host is shown.
The virtual machine resides on a host that does not have a license for the feature. The virtual machine resides on a host that is in maintenance mode or standby mode. The virtual machine is disconnected or orphaned (its .vmx file cannot be accessed). The user does not have permission to turn the feature on.
VMware, Inc.
45
vSphere Availability
If the option to turn on Fault Tolerance is available, this task still must be validated and can fail if certain requirements are not met.
SSL certificate checking must be enabled in the vCenter Server settings. The host must be in a vSphere HA cluster or a mixed vSphere HA and DRS cluster. The host must have ESX/ESXi 4.0 or greater installed. The virtual machine must not have multiple vCPUs. The virtual machine must not have snapshots. The virtual machine must not be a template. The virtual machine must not have vSphere HA disabled. The virtual machine must not have a video device with 3D enabled.
Several additional validation checks are performed for powered-on virtual machines (or those that are in the process of being powered on).
n
The BIOS of the hosts where the fault tolerant virtual machines reside must have Hardware Virtualization (HV) enabled. The host that supports the Primary VM must have a processor that supports Fault Tolerance. The host that supports the Secondary VM must have a processor that supports Fault Tolerance and is the same CPU family or model as the host that supports the Primary VM. Your hardware should be certified as compatible with Fault Tolerance. To confirm that it is, use the VMware Compatibility Guide at http://www.vmware.com/resources/compatibility/search.php and select Search by Fault Tolerant Compatible Sets. The combination of the virtual machine's guest operating system and processor must be supported by Fault Tolerance (for example, 32-bit Solaris on AMD-based processors is not currently supported). See the VMware knowledge base article at http://kb.vmware.com/kb/1008027 for information on supported combinations of processors and guest operating systems. The configuration of the virtual machine must be valid for use with Fault Tolerance (for example, it must not contain any unsupported devices).
n n
When your effort to turn on Fault Tolerance for a virtual machine passes the validation checks, the Secondary VM is created. The placement and immediate status of the Secondary VM depends upon whether the Primary VM was powered-on or powered-off when you turned on Fault Tolerance. If the Primary VM is powered on:
n
The entire state of the Primary VM is copied and the Secondary VM is created, placed on a separate compatible host, and powered on if it passes admission control. The Fault Tolerance Status displayed for the virtual machine is Protected.
The Secondary VM is immediately created and registered to a host in the cluster (it might be reregistered to a more appropriate host when it is powered on.) The Secondary VM is not powered on until after the Primary VM is powered on. The Fault Tolerance Status displayed for the virtual machine is Not Protected, VM not Running.
n n
46
VMware, Inc.
When you attempt to power on the Primary VM after Fault Tolerance has been turned on, the additional validation checks listed above are performed. To power on properly, the virtual machine must not use paravirtualization (VMI). After these checks are passed, the Primary and Secondary VMs are powered on and placed on separate, compatible hosts. The virtual machine's Fault Tolerance Status is tagged as Protected.
Turn On Fault Tolerance for Virtual Machines in the vSphere Web Client
You can turn on vSphere Fault Tolerance through the vSphere Web Client. When Fault Tolerance is turned on, vCenter Server resets the virtual machine's memory limit and sets the memory reservation to the memory size of the virtual machine. While Fault Tolerance remains turned on, you cannot change the memory reservation, size, limit, or shares. When Fault Tolerance is turned off, any parameters that were changed are not reverted to their original values. Connect vSphere Web Client to vCenter Server using an account with cluster administrator permissions. Procedure 1 2 3 In the vSphere Web Client, browse to the virtual machine for which you want to turn on Fault Tolerance. Right-click the virtual machine and select All vCenter Actions > Fault Tolerance > Turn On Fault Tolerance. Click Yes.
The specified virtual machine is designated as a Primary VM, and a Secondary VM is established on another host. The Primary VM is now fault tolerant.
Setting Options for Fault Tolerant Virtual Machines in the vSphere Web Client
After you turn on vSphere Fault Tolerance for a virtual machine, new options are added to the Fault Tolerance section of its context menu. In the vSphere Web Client there are options for turning off or disabling Fault Tolerance, migrating the secondary virtual machine, testing failover, and testing restart of the secondary virtual machine.
Fault Tolerance is turned off for the selected virtual machine. The history and the secondary virtual machine for the selected virtual machine are deleted.
VMware, Inc.
47
vSphere Availability
The Secondary VM associated with the selected fault tolerant virtual machine is migrated to the specified host.
Fault Tolerance is disabled for the selected virtual machine. Any history and the Secondary VM for the selected virtual machine are preserved and will be used if the feature is re-enabled. What to do next After you disable Fault Tolerance, the menu option becomes Enable Fault Tolerance. Select this option to re-enable the feature.
This task induces failure of the Primary VM to ensure that the Secondary VM replaces it. A new Secondary VM is also started placing the Primary VM back in a Protected state.
48
VMware, Inc.
This task results in the termination of the Secondary VM that provided Fault Tolerance protection for the selected Primary VM. A new Secondary VM is started, placing the Primary VM back in a Protected state.
Viewing Information About Fault Tolerant Virtual Machines in the vSphere Web Client
You can view fault tolerant virtual machines in the vCenter Server inventory using the vSphere Web Client. NOTE You cannot disable Fault Tolerance from the Secondary VM. A vSphere Fault Tolerance section (pane) appears in the Summary tab for the Primary VM and includes information about the virtual machine. Fault Tolerance Status Indicates the Fault Tolerance status of the virtual machine.
n
Protected. The Primary and Secondary VMs are powered on and running as expected. Not Protected. The Secondary VM is not running. Possible reasons are listed in the table. Table 32. Reasons for Primary VM Not Protected Status
Reason for Not Protected Status Starting Description Fault Tolerance is in the process of starting the Secondary VM. This message is only visible for a short period of time. The Primary VM is running without a Secondary VM, so the Primary VM is currently not protected. This occurs when no compatible host in the cluster is available for the Secondary VM. Correct this by bringing a compatible host online. If a compatible host is online in the cluster, you might need to investigate further. Under certain circumstances, disabling Fault Tolerance and then re-enabling it corrects this problem.
Need Secondary VM
VMware, Inc.
49
vSphere Availability
VM not Running
Secondary location Total Secondary CPU Total Secondary Memory vLockstep Interval
Displays the ESXi host on which the Secondary VM is hosted. The CPU usage of the Secondary VM, displayed in MHz. The memory usage of the Secondary VM, displayed in MB. The time interval (displayed in seconds) needed for the Secondary VM to match the current execution state of the Primary VM. Typically, this interval is less than one-half of one second. No state is lost during a failover, regardless of the vLockstep Interval value. The amount of network capacity being used for sending vSphere Fault Tolerance log information from the host running the Primary VM to the host running the Secondary VM.
Log Bandwidth
Host Configuration
Consider the following best practices when configuring your hosts.
n
Hosts running the Primary and Secondary VMs should operate at approximately the same processor frequencies, otherwise the Secondary VM might be restarted more frequently. Platform power management features that do not adjust based on workload (for example, power capping and enforced low frequency modes to save power) can cause processor frequencies to vary greatly. If Secondary VMs are being restarted on a regular basis, disable all power management modes on the hosts running fault tolerant virtual machines or ensure that all hosts are running in the same power management modes. Apply the same instruction set extension configuration (enabled or disabled) to all hosts. The process for enabling or disabling instruction sets varies among BIOSes. See the documentation for your hosts' BIOSes about how to configure instruction sets.
Homogeneous Clusters
vSphere Fault Tolerance can function in clusters with nonuniform hosts, but it works best in clusters with compatible nodes. When constructing your cluster, all hosts should have the following configuration:
n
50
VMware, Inc.
n n n n n
Common access to datastores used by the virtual machines. The same virtual machine network configuration. The same ESXi version. The same Fault Tolerance version number (or host build number for hosts prior to ESX/ESXi 4.1). The same BIOS settings (power management and hyperthreading) for all hosts.
Performance
To increase the bandwidth available for the logging traffic between Primary and Secondary VMs use a 10Gbit NIC, and enable the use of jumbo frames.
VMware, Inc.
51
vSphere Availability
In addition to non-fault tolerant virtual machines, you should have no more than four fault tolerant virtual machines (primaries or secondaries) on any single host. The number of fault tolerant virtual machines that you can safely run on each host is based on the sizes and workloads of the ESXi host and virtual machines, all of which can vary. If you are using NFS to access shared storage, use dedicated NAS hardware with at least a 1Gbit NIC to obtain the network performance required for Fault Tolerance to work properly. Ensure that a resource pool containing fault tolerant virtual machines has excess memory above the memory size of the virtual machines. The memory reservation of a fault tolerant virtual machine is set to the virtual machine's memory size when Fault Tolerance is turned on. Without this excess in the resource pool, there might not be any memory available to use as overhead memory. Use a maximum of 16 virtual disks per fault tolerant virtual machine. To ensure redundancy and maximum Fault Tolerance protection, you should have a minimum of three hosts in the cluster. In a failover situation, this provides a host that can accommodate the new Secondary VM that is created.
n n
52
VMware, Inc.
Index
A
admission control configuring 29 policy 29 types 19 vSphere HA 19 admission control policy choosing 25 Host Failures Cluster Tolerates 20 Percentage of Cluster Resources Reserved 23 Specify Failover Hosts 24 advanced attributes, vSphere HA 30 Advanced Runtime Info 20 affinity rules 38, 39 anti-affinity rules 38 Application Monitoring 12, 14 Auto Deploy 33
das.respectvmvmantiaffinityrules 31 das.slotcpuinmhz 20, 31 das.slotmeminmb 20, 31 das.usedefaultisolationaddress 31 das.vmcpuminmhz 20, 23, 31 das.vmmemoryminmb 31 datastore heartbeating 12, 16 default gateway 35 disabling, Fault Tolerance 48 Distributed Power Management (DPM) 19 Distributed Resource Scheduler (DRS) and Fault Tolerance 41 using with vSphere Fault Tolerance 39 using with vSphere HA 19 DNS lookup 25 downtime planned 7 unplanned 8
B
best practices Fault Tolerance 50 vSphere HA clusters 33 vSphere HA networking 35 business continuity 7
E
Enhanced vMotion Compatibility 39 error messages Fault Tolerance 37 vSphere HA 11 errors, Fault Tolerance 51 EVC 39 events and alarms, setting 33 Extended Page Tables (EPT) 41
C
Cluster Operational Status 33 cluster settings 26 cluster validity 33 compliance check, Fault Tolerance 45 Configured Failover Capacity 20, 23 configuring vSphere HA advanced options 30 creating a vSphere HA cluster 26 Current Failover Capacity 20, 23 Current Failover Hosts 24 customizing vSphere HA 30
F
failover hosts 24 Fault Tolerance anti-affinity rules 38 best practices 50 checklist 40 compliance check 45 configuration recommendations 52 continuous availability 9 disabling 48 enabling 42 error messages 37 errors 51 interoperability 41 Log Bandwidth 49 logging 43
D
das.heartbeatdsperhost 16, 31 das.ignoreinsufficienthbdatastore 31 das.iostatsinterval 14, 31 das.isolationaddress 31, 35 das.isolationshutdowntimeout 13, 31 das.maxftvmsperhost 39
VMware, Inc.
53
vSphere Availability
migrate secondary 48 networking configuration 43 options 47 overview 38 prerequisites 40 restrictions for turning on 45 secondary location 49 test failover 48 test restart secondary 49 Total Secondary CPU 49 Total Secondary Memory 49 turning off 47 turning on 47 use cases 39 validation checks 45 version 40 vLockstep Interval 49 vSphere configuration 40 Fault Tolerance status Disabled 49 Need Secondary VM 49 Starting 49 VM not Running 49 fdm.isolationpolicydelaysec 31 firewall ports 16, 35 FT logging 38
M
management network 25, 35 master host election 12 Maximum per-VM resets 14 migrate secondary, Fault Tolerance 48 minimizing downtime 7 modifying cluster settings 26 monitoring sensitivity 14 monitoring vSphere HA 33
N
N_Port ID Virtualization (NPIV) 41 network isolation address 35 network labels 35 network partition 12, 15, 16, 50 networking configuration, Fault Tolerance 43 NIC teaming 36, 43
O
On-Demand Fault Tolerance 39
P
paravirtualization 41 Percentage of Cluster Resources Reserved 23, 33 planned downtime 7 planning a vSphere HA cluster 11 port group names 35 PortFast 35 prerequisites, Fault Tolerance 40
H
Hardware Virtualization (HV) 40, 45 Host Failures Cluster Tolerates 20, 33 host isolation response 28 Host Isolation Response setting 13 host monitoring, enabling 28 Host Monitoring feature 35 hosts maintenance mode 12, 19 network isolation 12
R
Rapid Virtualization Indexing (RVI) 41 RDM 40, 41 resource fragmentation 25
S
slot 20 slot size calculation 20 snapshots 41 Specify Failover Hosts 24 SSL Certificates 16 storage iSCSI 40 NAS 40, 52 NFS 40, 52 Storage DRS 33 Storage vMotion 7, 33, 41 Symmetric multiprocessor (SMP) 41
I
I/O stats interval 14 intended audience 5 interoperability, Fault Tolerance 41 IPv4 25, 41 IPv6 25, 41, 43 iSCSI SAN 40 ISO images 50 isolation response, host 28
L
load balancing 39 log files 16
54
VMware, Inc.
Index
T
TCP port 16 test failover, Fault Tolerance 48 test restart secondary, Fault Tolerance 49 tolerating host failures 20 transparent failover 9, 38 turning off, Fault Tolerance 47
master host 12, 15 planning 11 slave host 12 vSphere HA datastore heartbeating 30 vSphere HA networking best practices 35 path redundancy 36
U
UDP port 16 unplanned downtime 8 upgrading hosts with FT virtual machines 52 use cases, Fault Tolerance 39
V
validation checks 45 virtual machine monitoring 29 virtual machine options, vSphere HA 28 virtual machine overrides 13, 33 virtual machine protection 12, 15 Virtual Machine Startup and Shutdown feature 26 virtual machines, restart priority 28 Virtual SAN 16, 17, 33, 41 VLAN 43 VM Monitoring 12, 14 VM Restart Priority setting 13 VM-VM affinity rules 24 VMDK 40 VMFS 16, 35 VMware Tools 14 VMware vLockstep 9, 37, 38 vpxuser user account 16 vSphere HA advanced attributes 30 advantages 8 checklist 25 cluster settings 26 configuring cluster settings 28 customizing 30 error messages 11 monitoring 33 recovery from outages 8 suspending 33 virtual machine monitoring 29 virtual machine options 28 vSphere HA architecture 11 vSphere HA cluster admission control 19 best practices 33 creating 26, 45 heterogeneity 25
VMware, Inc.
55
vSphere Availability
56
VMware, Inc.