How to Set Up Clustering and High Availability in Proxmox
Proxmox Virtual Environment (Proxmox VE) is an open-source server virtualization platform that combines KVM (virtual machines) and LXC (containers) for efficient resource utilization. Clustering in Proxmox pools multiple physical servers (nodes) into a single logical entity, enabling resource sharing, load balancing, and High Availability (HA). HA ensures services (VMs/containers) remain accessible during node failures by automatically migrating workloads to healthy nodes using watchdog-based fencing. This guide walks you through setting up a Proxmox cluster and configuring HA, with practical steps and best practices.
At least 3 physical servers (nodes) for reliable quorum (a 2-node cluster requires an additional QDevice for the third vote; see the Proxmox Administration Guide). Nodes should have compatible CPUs (for live migration) and sufficient CPU/RAM/storage.
A dedicated network for cluster communication (recommended) and VM traffic (if needed).
Shared storage (NFS, Ceph, iSCSI) accessible by all nodes (required for HA).
A hardware watchdog timer (optional but recommended; the Linux kernel software watchdog softdog is used as fallback).
HA groups restrict VMs to specific nodes (affinity/anti-affinity):
Note: In Proxmox VE 9, HA groups are deprecated in favor of HA rules (ha-manager rules), which support both node-affinity and resource-affinity rules. The ha-manager groupadd command still works but is considered legacy.
Fencing ensures a failed node is guaranteed to be offline before its services are recovered elsewhere, preventing split-brain scenarios where the same VM could run on two nodes simultaneously.
Modern Proxmox VE uses software watchdog-based fencing out of the box — no external fencing device configuration is required. Here is how it works:
The HA stack (pve-ha-lrm) regularly resets a watchdog timer on each node.
If a node loses quorum or the HA daemon stops responding, the watchdog elapses and triggers an automatic reboot of the node.
Once fenced, the CRM recovers the failed node's services on remaining healthy nodes.
By default, Proxmox uses the Linux kernel software watchdog (softdog). For higher reliability, you can configure a hardware watchdog module. Edit /etc/default/pve-ha-manager on each node:
# Select watchdog module (default is softdog)WATCHDOG_MODULE=iTCO_wdt
Common hardware watchdog modules include iTCO_wdt (Intel), hpwdt (HP), and ipmi_watchdog (IPMI). The watchdog-mux service loads the specified module at startup.
Odd Number of Nodes: Use 3/5 nodes to avoid split-brain.
QDevice: For 2-node clusters, add a quorum device (e.g., a Raspberry Pi) with pvecm qdevice setup <QDEVICE-IP>. See the Proxmox Administration Guide for QDevice setup details.
Backups: Use vzdump to back up VMs to external storage. Proxmox Backup Server (PBS) provides a dedicated, enterprise-grade backup solution with deduplication and incremental backups.
Monitoring: Use the built-in Proxmox VE web dashboard, pveperf (storage benchmarking), or integrate with Prometheus/Grafana for cluster-wide monitoring.
HA Simulator: Test HA behavior without a real cluster by installing pve-ha-simulator (apt install pve-ha-simulator). It simulates a 3-node cluster with sample VMs for learning and testing.
Proxmox clustering and HA provide a robust virtualization environment with redundancy and failover capabilities. By following this guide—from cluster setup to HA configuration and testing—you can build a reliable infrastructure. Remember to follow best practices (network redundancy, quorum management, backups) to ensure long-term stability.