Reader small image

You're reading from  Mastering Proxmox. - Second Edition

Product typeBook
Published inMay 2016
PublisherPackt
ISBN-139781785888243
Edition2nd Edition
Tools
Right arrow
Author (1)
Wasim Ahmed
Wasim Ahmed
author image
Wasim Ahmed

Wasim Ahmed, born in Bangladesh and now a citizen of Canada, is a veteran of the IT world. He first came into close contact with computers in 1992 and never looked back. Wasim has a deep understanding of networks, virtualization, big data storage, and network security. By profession, Wasim is the CEO of a global IT support and cloud service provider based in Calgary, Alberta. He serves many companies and organizations through his company on a daily basis. Wasim's strength comes from his experience, which comes from learning and serving continually. Wasim strives to find the most effective solution at the most competitive price. He has built over 20 enterprise production virtual infrastructures using Proxmox and the Ceph storage system. Wasim and his team are notorious for not simply accepting a technology based on its description alone, but putting it through rigorous testing to check its validity. Any new technology that his company provides goes through months of continuous testing before it is accepted. Proxmox made the cut superbly.
Read more about Wasim Ahmed

Right arrow

Chapter 9. Proxmox High Availability

In this chapter, we are going to see one of the most prominent features that makes Proxmox an enterprise-class hypervisor. Proxmox High Availability or Proxmox HA allows the cluster to move or migrate virtual machines from a faulty node to a healthy node without any user interaction. We will take a look at the following topics:

  • Understanding High Availability

  • Requirements for HA

  • Configuring Proxmox HA

  • Configuring the Proxmox HA simulator

Understanding High Availability


High Availability is a combination of components and configurations that allow continuous operation of a computational environment for a length of time on a regular basis. Basically, it means that even when unattended server hardware goes bad in a live environment, High Availability can manage the remaining servers on its own and keep a virtual environment running by automatically moving or migrating virtual machines from one node to another. A properly configured HA requires very little actual user interaction during a hardware failure. Without HA in place, all nodes will require constant monitoring by a network manager in order to manually move virtual machines to healthy nodes when a node goes bad.

In a small environment, manually moving VMs is not a major issue, but in a large environment of hundreds of virtual machines and nodes, constant monitoring can be very time consuming. Although there can be monitoring software in place to automatically alert administrators...

Requirements for HA setup


From Proxmox 4.0 and later, the High Availability feature has been completely redesigned from the ground up making it much simpler to configure and use. There are a few requirements that the environment must meet before configuring Proxmox HA. They are as follows:

  • Minimum three nodes

  • Shared storage

  • Fencing

Minimum three nodes

HA must be configured in a cluster with a minimum of three nodes because with three nodes or more, achieving a Quorum is possible. A Quorum is the minimum number of votes required for a Proxmox cluster operation. This minimum number is the total vote by a majority of the nodes. For example, in a cluster of three Proxmox nodes, a minimum vote of two Proxmox nodes is required to form a Quorum. Or, in a cluster with eight nodes, a minimum vote of five Proxmox nodes is required to form a Quorum. With just two nodes, the ratio of vote remains at 1:1, so no Quorum is possible.

Shared storage

During a node failure, VMs are moved to the next member node in...

Configuring Proxmox HA


All configurations of Proxmox HA can be done from the GUI. Thanks to the new version of HA in Proxmox. The HA feature is available by navigating to Datacenter | HA. This is the menu where we will perform all HA-related configurations and management. The following screenshot shows the Proxmox HA management interface:

As we can see, in the preceding screenshot, the HA interface has four submenus.

Status menu

This menu shows the Status of the HA configuration. There are no management options in this menu. A clean installed Proxmox cluster will show only one line item for a healthy quorum. Once the new member nodes are added to the HA configuration, this status menu will show the running states of all the nodes and the virtual machines that have HA enabled.

Groups menu

This menu is to used create and manage different groups of Proxmox for HA. The most relevant use of groups is some software solutions, or infrastructure VMs should always be running together for continuous functionality...

Testing Proxmox HA configuration


To test whether the HA is really working, we will disconnect the network connectivity for the node pm4-1 and observe the Status window for HA changes. The Status window displays the states of resources in real time as they occur. The following screenshot shows the HA status after interrupting the network connectivity:

In the preceding screenshot, we can see that our example node pm4-1 is no longer connected to the cluster, and HA does not get any acknowledgement from the node. After 60 seconds, Proxmox HA promotes the next available node in the HA group as the master, as shown in the following screenshot:

After Proxmox HA promotes a new master for the HA group, it then starts fencing the VM resources to prepare them in order to move them to another node. During fencing, all services related to the VM are fenced, which means that even if the failed node comes back online at this stage, the VM will not be able to resume its normal operation. The following screenshot...

The Proxmox HA simulator


Although Proxmox HA has become far easier to configure and manage, it is still a complex topic to grasp. With the use of software-based watchdog, it is entirely possible to configure, test, and learn Proxmox HA in a virtualized environment before implementing it in a production cluster. There is also a simulator for Proxmox HA that we can use to see HA in action without setting up a cluster. The simulator allows us to see the HA configuration in action and see how the states change at different stages.

Configuring the Proxmox HA simulator

The Proxmox HA simulator is not shipped with the distribution that it needs to be manually installed. Along with the simulator package, we also need xorg and xuath because the simulator requires X11 redirection, which is also known as X11 forwarding. We can use the following commands to install the packages:

# apt-get install pve-ha-simulator
# apt-get install xorg
# apt-get install xauth

We can access the simulator from both the...

Summary


In this chapter, we learned the different aspects of the recently redesigned and enhanced Proxmox High Availability feature and how it can benefit a virtual environment. By leveraging HA, we can automate the response to a failure by auto migrating VMs, thus reducing the down time during the node or network failure of a node. We explained the requirements the infrastructure must meet in order to implement a fully functional High Availability feature. We walked you through the process of HA configuration and finally tested HA by creating a simulating device failure. We also learned how to install and use the Proxmox HA simulator to see HA in action without setting up a cluster.

Due to the nature of Proxmox HA it is highly recommended to test this feature to its full extent before diving into implementing it in production cluster. HA can limit user interaction during some operations. The need for HA should be evaluated and if used it should be thoroughly tested before implementing it...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Proxmox. - Second Edition
Published in: May 2016Publisher: PacktISBN-13: 9781785888243
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Wasim Ahmed

Wasim Ahmed, born in Bangladesh and now a citizen of Canada, is a veteran of the IT world. He first came into close contact with computers in 1992 and never looked back. Wasim has a deep understanding of networks, virtualization, big data storage, and network security. By profession, Wasim is the CEO of a global IT support and cloud service provider based in Calgary, Alberta. He serves many companies and organizations through his company on a daily basis. Wasim's strength comes from his experience, which comes from learning and serving continually. Wasim strives to find the most effective solution at the most competitive price. He has built over 20 enterprise production virtual infrastructures using Proxmox and the Ceph storage system. Wasim and his team are notorious for not simply accepting a technology based on its description alone, but putting it through rigorous testing to check its validity. Any new technology that his company provides goes through months of continuous testing before it is accepted. Proxmox made the cut superbly.
Read more about Wasim Ahmed