VMware VSphere 5.1 High Availability
?
? ? In this section, we mainly talk about some functions and configurations of the cluster, and there is not much change compared to the 5.0 setting. VMware Vsphere provides virtualized infrastructure for virtual machines, transforms existing physical resources into virtual resources, divides physical resources into resources, and provides virtual resources, including CPU and memory, for each virtual machine. To allocate these resources well, you must use a resource pool. Resource pools are logical abstractions that manage resources flexibly. Resource pools can be grouped into hierarchies that are used to partition the available CPU and memory resources hierarchically. Resource pools in a cluster are more important than on a single ESXi host, because after the resources are created in the cluster, the entire resource pool manages all of the ESXi host resources. The managed resources are the sum of the CPU and memory resources on all ESXi hosts.
?
??????? High availability and dual-machine hot standby is the most important part of VMware vsphere 5.1, high availability is not unique to vsphere, enterprise use is high availability for service continuity and data security, HA is a group of ESXi server-based clustering features, The main purpose is to transfer the host in a timely manner to avoid prolonged downtime when the host machine running the VM fails. While the FT dual standby is to ensure that the maximum time the virtual machine does not stop, the virtual machine in a dual-machine hot-standby mode at the same time in two host operations, greatly enhancing the business continuity.
??????? This section focuses on what to say:
?
I. Building a cluster
Second, set ha high availability
Iii. testing ha High Availability
Iv. Setting up DRS
V. Establishment of FT dual-machine hot standby
?
??????? Whether it's planned downtime or unplanned downtime, it's going to cost a great amount of time. However, traditional solutions to ensure higher levels of availability require significant overhead and are difficult to implement and manage. VMware software provides a higher level of availability for critical applications, with simpler operations and lower costs. With VSphere, organizations can easily increase the baseline level offered to all applications and achieve higher levels of availability at lower cost and simpler operations. With vsphere, you can provide higher availability independent of hardware, operating systems, and applications, reducing planned downtime for common maintenance operations and providing automatic recovery in the event of a failure. VSphere can reduce planned downtime, prevent unplanned outages, and quickly recover from power outages.
??
- Building a Cluster
?
??????? A collection of multiple computers is called a cluster, and the purpose of the cluster is to allocate the burden of the computer to multiple hosts, or to let another server take over these services when the physical server that runs one of the services pops up the problem. In VMware vsphere, multiple ESX physical servers are formed into a cluster in which the virtual machines running on this server can be automatically migrated to other available ESX servers to ensure uninterrupted business operations when one of the servers fails.
??????? The cluster is to organize all the esx/esxi to form a large pool of resources, all the virtual machines can be free to move on any host in the pool, and cluster can achieve rapid expansion and HA fault redundancy, so cluster is a necessary function of server virtualization to the data center.
??????? vsphere clusters include DRS clusters, ha clusters, and DPM clusters.
1, DRS: Distributed resource scheduling, used to dynamically adjust the cluster in the ESX host load, automatically load the host on the heavy machine through the vmotion migration to the less-loaded host, and ultimately achieve the overall cluster of the host resource consumption balance.
2, HA: High availability, for accidental failover, when monitoring to cluster in the host unexpected failure, will automatically start on the other host on the failed host before the virtual machine hosted.
3, DPM: Distributed power management, used in the light of the load, the virtual machine dynamic "centralized" to cluster in the small part of the host, and then put other Esx/esxi host standby to save power consumption, such as load, and then wake up before the standby host.
??????? When the cluster is understood, the following is the time to build the cluster
1. In the vsphere Client, right-click the Datacenter or folder and select New Cluster from the popup shortcut menu
2. Name the cluster in the names text box. The name is displayed in the Vsphere Client inventory panel.
?
3. If applicable, enable enhanced vmotion compatibility (EVC) and select the mode in which it should run. Here you can see the types of CPUs supported by EVC for AMD and Inter. However, it is important to note that even with EVC, you cannot migrate virtual machines on Intel servers to AMD hosts. So eVC has only three options: Disable, Intel or AMD
4. Select the swap file location for the virtual machine. The swap file can be stored in the same directory as the virtual machine itself, or the swap file is stored in a host-local exchange in the specified data store. Click "Next"
5. Click the Finish button to complete the cluster creation, and the new cluster does not include any hosts or virtual machines.
6. When the cluster is complete, the name is displayed in the Vsphere Client inventory panel.
7. To add an ESXi host, you can select a host from the inventory or List view or drag the host to the target cluster object.
8. Drag all hosts to the target cluster object.
??
??
Second, set ha high availability
??????? VSphere HA leverages multiple ESXi hosts configured as a cluster to provide fast outage recovery and cost-effective high availability for applications running in virtual machines. VSphere ha prevents server failures by restarting virtual machines on other hosts within the cluster. Continuously monitor the virtual machine and reset it when a failure is detected to prevent application failure. Unlike other cluster solutions, VSphere HA provides the infrastructure and uses that infrastructure to protect all workloads. There is no need to install special software within an application or virtual machine. All workloads are protected by VSphere HA. After you configure VSphere HA, you do not need to take action to protect the new virtual machine. They are automatically protected.
??????? VSphere HA provides high availability for virtual machines by centralizing the virtual machines and the hosts they reside in the cluster. The hosts in the cluster are monitored and if a failure occurs, the virtual machines on the failed host will be restarted on the standby host. When you create a vSphere HA cluster, a host is automatically selected as the preferred host. The preferred host can communicate with VCenter Server and monitor the status of all protected virtual machines and subordinate hosts. Different types of host failures may occur, and the preferred host must detect and handle the failure accordingly. The preferred host must be able to differentiate between a failed host and a host that is in a network partition or is isolated from the network. The preferred host uses the network and data store heartbeat to determine the type of failure.
??????? Before you set up Ha, ensure that each ESXI host has management network redundancy and that the vsphere ha heartbeat data store number is 1, with a few requirements of 2. If its requirements are not met, configuration issues are prompted during the configuration of Ha, such as:
??????? To ensure management of network redundancy, you can also use multiple management networks to manage network redundancy such as:
??????? Verify that all virtual machines and their configuration files reside on the shared storage. Verify that the host is configured to have access to the shared storage so that you can use different hosts in the cluster to open the virtual electromechanical source. Once the management network and storage are set up, we will open the HA cluster configuration below.
1. Right-click the cluster, and then click Edit Settings.
2. In the cluster's Settings dialog box, you can modify the VSphere HA (and other) settings for the cluster. On the cluster Features page, select Open VSphere HA.
3. Configure VSphere HA for the cluster to set host monitoring status, access control, virtual machine options, virtual machine monitoring, and data storage heartbeat, as needed.
4. The default virtual machine settings control the restart order (virtual machine restart priority) of the virtual machine and how VSphere HA responds to loss of network connectivity between hosts (host isolation response). These settings apply to all virtual machines in the cluster when a host failure or host isolation occurs. Additionally, you can configure exceptions for specific virtual machines.
5. If the VMware Tools heartbeat for a single virtual machine is not received within the set time, virtual machine monitoring restarts the virtual machine. Similarly, if you do not receive a heartbeat for the application that the virtual machine is running, application monitoring can also restart the virtual machine. You can enable the Virtual machine monitoring feature and configure the sensitivity of VSphere HA monitoring when it is unresponsive.
??????? The level of monitoring sensitivity can be configured in the default cluster settings. High-sensitivity monitoring can quickly draw conclusions that have failed. However, if a monitored virtual machine or application is actually still running, but a heartbeat is not received due to resource constraints, high sensitivity monitoring may mistakenly assume that the virtual machine has failed. Low-sensitivity monitoring extends the time between actual failures and service outages between virtual machine resets. When a failure is detected, VSphere HA resets the virtual machine. Resetting ensures that these services are still available. To avoid resetting the virtual machine repeatedly due to non-transient errors, the virtual machine will be reset only three times over a configurable time interval by default. After three resets to the virtual machine, VSphere HA does not attempt to reset the virtual machine further after a subsequent failure occurs until the specified time has ended. You can configure the number of resets by using the maximum number of resets per virtual machine custom setting.
??????? When monitoring sensitivity is high, the failure interval is 30 (seconds) and the reset period is 1 hours. When monitoring sensitivity, the failure interval is 60 (seconds) and the reset period is 24 hours. When monitoring sensitivity is low, the fault interval is 120 (seconds), the reset period is 7 days, in the default cluster settings, the left and right adjustment buttons to control the monitoring sensitivity
6. When the preferred host in the VSphere HA cluster is unable to communicate with the subordinate host through the management network, the preferred host uses the data store heartbeat to determine whether the subordinate host is faulted, is in a network partition, or is isolated from the network. The number of heartbeat data stores selected by VCenter Server for each host.
7. The HA feature is being configured for each esxi.
8. After the configuration is complete, the ESXi host will be in the cluster.
??
??
Iii. testing ha High Availability
??????? When a vSphere HA cluster is set up, all virtual machines in the cluster can receive failover support without additional configuration. Reduce hardware costs and set up a virtual machine to act as a mobile container for applications that can move between hosts. The administrator avoids duplicate configuration on multiple computers. When using vsphere ha, you must have sufficient resources to fail over the number of hosts you want to protect through vsphere ha. However, the VCenter Server system automatically manages resources and configures the cluster. Increases the availability of any application that runs within the virtual machine for an application to become more available. A virtual machine can recover from a hardware failure, increasing the availability of all applications launched during the boot cycle and without additional computing requirements, even if the application itself is not a clustered application. By monitoring and responding to VMware
??????? Tools to detect signals and restart unresponsive virtual machines to prevent the client operating system from crashing.
1, first we see that the new virtual machine 1 and the new virtual machine 2 are running on the ESXi02, now we imitate the occurrence of the accident, will be forced to close the ESXI02.
2. When our vsphere ha detects a esxi02 failure, the HA function is automatically activated and all virtual opportunities on the esxi02 are started on the esxi01.
3, when the virtual machine successfully switched to ESXi, this time, ha failure, because only 1 ESXi hosts in the cluster is functioning properly, so in the future formal environment, to configure the HA function, the host in the cluster must not be less than 3 units. This ensures the safe operation of the virtual machine.
??
??
Iv. Setting up DRS
??????? A DRS cluster is a set of ESXi hosts and associated virtual machines that have shared resources and shared management interfaces. You must create a DRS cluster to benefit from cluster-level resource management. DRS is the dynamic allocation and balancing of compute capacity across a collection of hardware resources that are aggregated into logical resource pools. VMware DRS is a continuous monitoring of utilization across resource pools and intelligently allocates available resources across multiple virtual machines based on predefined rules that reflect business needs and changing priorities. When the virtual machine load increases, VMWare DRS automatically allocates additional resources by redistributing the virtual machines between the physical servers in the resource pool.
??????? DRS enables resources to take precedence over the most important applications in order to align resources with business objectives, automatically and uninterrupted to optimize hardware utilization to respond to changing circumstances, and to provide a dedicated (virtual) infrastructure for the business, while enabling it to centralize. Complete control of hardware, capable of performing 0 downtime server maintenance. In automatic mode, DRS determines the best way to distribute virtual machines between different physical servers and automatically migrates the virtual machines to the most appropriate physical servers. In manual mode, Vmware DRS will provide a recommendation to put the virtual machine in the best location and provide it to the system administrator to decide whether to make changes.
??????? VMware DRS allows users to customize rules and scenarios to determine how virtual machines share resources and to determine the priority between them. When the workload of a virtual machine increases, VMware DRS evaluates the priority of the virtual machine based on the previously defined allocation rules. If the virtual machine passes the evaluation, then DRS allocates additional resources to it, and when the host resources are low, DRS looks for the host with the extra resources available in the cluster and vmotion the VM to the top to invoke more resources for its heavy load business.
??????? DRS allocates resources in two ways: by migrating a virtual machine to another server with more appropriate resources, or by migrating other virtual machines on that server, freeing up more "space" for that virtual machine.
??????? In fact, VMware DRS is primarily an ESXi server in a load-balanced cluster. VMware DRS will continuously monitor all hosts in the cluster, monitoring the distribution and usage of the CPU, memory resources of the virtual machine. DRS compares these metrics to the resource utilization in the ideal state, given the attributes, current requirements, and unbalanced targets of the resource pools and virtual machines within the cluster. It then performs the virtual machine migration accordingly.
??????? Second, when the power management vsphere distributed Power Management (DPM) feature is enabled, DRS compares the cluster-level and host-level capacity to the virtual machine requirements of the cluster, including recent historical requirements. If sufficient additional capacity is found, DPM puts the host (or suggests) to standby power mode, or if capacity is required, it is recommended to turn on the host power supply, depending on the proposed host power condition, you may need to migrate the virtual machine to another server with more appropriate resources. Or migrate other virtual machines on the server.
1. Select the cluster in the VMware client, right-click Edit settings, open the Cluster Settings window, click the Open vsphere DRS box to enable the DRS feature. This way, the DRS opens, and then we use DRS to manage the cluster resources.
2. Select the default automation level of DRS, when this cluster's DRS Automation parameters are configured manually, and each time the virtual machine on the ESXi host in the cluster is activated, the system will prompt you to activate the virtual machine on which ESXi is available, and when activated, the system will provide the available hosts. and ranked in order of priority recommendation. The most appropriate ESXi host will be at the front. When a semi-automatic DRS is selected, the system automatically chooses the best time for the virtual machine and does not allow the user to select the host, but before the transfer action is actually made, the user is asked to type Enter. When a fully automatic DRS is selected, it finds the best ESXi host itself when the virtual machine is activated and activates the vmotion based on the configured values to transfer the host. There are 5 fully automatic DRS configurations: Conservative, relatively conservative, medium, relatively aggressive, aggressive.
3. By using this host DRS group, you can create an affinity (or anti-affinity) relationship with the appropriate virtual machine DRS group by creating an affinity rule between the virtual machine and the host. In the host DRS Group section, click Add.
4, to use the rules. Controls where the virtual machines are placed on hosts in the cluster. You can create two types of rules. One is used to specify the affinity or anti-affinity between the virtual group and the host groups. The affinity rule specifies that members of the selected virtual machine DRS group can or must run on a specific host DRS group member. The anti-affinity rule stipulates that members of the selected virtual machine DRS Group cannot run on a specific host DRS group member. The other is used to specify the affinity or anti-affinity between individual virtual machines. Specifying rules for affinity causes DRS to attempt to keep the specified virtual machines on the same host (for example, for performance reasons).
5, in the virtual machine option, you can do some virtual machine automation level of personality settings.
6. With vsphere Distributed Power Management (DPM) capabilities, DRS clusters can turn on and off host power based on cluster resource utilization to reduce their power consumption. VSphere DPM monitors the cumulative requirements for all virtual machines in the cluster of memory and CPU resources and compares them to the total available resources for all hosts in the cluster. If sufficient additional capacity is found, vsphere DPM places one or more hosts in standby mode, migrates their virtual machines to other hosts, and then shuts down their power. Conversely, when the capacity is considered insufficient, DRS causes the hosts to exit Standby mode (turn them on) and use Vmotion to migrate the virtual machines to those hosts. When these calculations are made, VSphere DPM takes into account not only the current requirements, but also all virtual machine resource reservations that are specified by the user.
7. You can also set power management options separately for a single host in a cluster
8. The details of vsphere DRS can be seen in the summary of the cluster at this time.
??
??
??
V. Establishment of FT dual-machine hot standby
??????? VSphere HA provides a basic level of protection for virtual machines by restarting virtual machines in the event of a host failure. VSphere Fault Tolerance provides a higher level of availability, allowing users to protect any virtual machine from loss of data, transactions, or connections in the event of a host failure. Fault tolerance provides continuous availability by ensuring that the state of the primary and secondary virtual machines is the same at any point in time when the virtual machine's instructions are executed. Use VMware Vlockstep technology on the ESXi host platform to complete this process. Vlockstep completes this process by making the primary and secondary VMS perform the same sequence of x86 instructions. The primary virtual machine captures all inputs and events (from the processor to the virtual I/O device) and replays on the secondary virtual machine. The secondary virtual machine executes the same sequence of instructions as the primary virtual machine, and only a single virtual machine image (the primary virtual machine) performs the workload. If the host running the primary virtual machine or the host running the secondary virtual machine fails, an immediate and transparent failover occurs. A functioning ESXi host seamlessly becomes the host of the primary virtual machine without disconnecting the network or interrupting transactions that are being processed. With transparent failover, there is no data loss and you can maintain network connectivity. After a transparent failover, a new secondary virtual machine is regenerated and redundancy is re-established. The entire process is transparent and fully automated, and can occur even if the VCenter Server is unavailable.
??????? In fact, in the daily use of virtualization, rarely use the FT function, one is more serious waste of resources, the second is a single virtual CPU can not meet the needs of the business, three is only a few applications require low configuration, but require high availability requirements.
1, before establishing the FT dual-machine hot standby, to ensure that virtual machine virtual CPU is 1 1 cores.
2, the second is to establish the FT function of the host must have Vmlernel network for FT.
3. In cluster setup, meet FT's cluster requirements, create and enable vsphere ha cluster, tick "open vsphere ha" in cluster settings
4. Check whether the ESXi host CPU supports the FT instruction, and if not, it will turn on the FT-times error, 8-17 as shown.
5. Right-click on a virtual machine and select Fault tolerance > Open Fault Tolerance from the popup shortcut menu.
6. Enabling FT requires a thinly provisioned disk, so vcenter automatically converts the virtual machine disk before powering on Ft.
7. After the conversion, the specific virtual machine will be designated as the primary virtual machine and the last time the virtual machine is to be secondary on another host. The primary virtual machine is now enabled for fault tolerance. Virtual machine running on esxi01, FT protected copy running on ESXI02
?
?
?
?
vmware-vsphere-5.1--------cluster, HA, DRS, FT