Proxmox VE 9 high availability: HA rules, fencing and a failover you have actually tested
High availability is the feature most people build a Proxmox VE cluster for: a node dies at 3 a.m. and its important guests are running again on another node before anyone wakes up. Proxmox VE does this with two daemons, a watchdog and a set of rules. This post explains how those pieces fit together, adds guests to HA, writes placement rules (which changed in Proxmox VE 9), walks through a node…
High availability (HA) in Proxmox VE is designed to automatically restart virtual machines (guests) on another node when a node fails. This is accomplished through two daemons: pve-ha-lrm, the local resource manager, and pve-ha-crm, the cluster resource manager. Both rely on locks in the cluster file system and a watchdog.
Configuring HA requires a minimum of three cluster nodes or two nodes plus a QDevice for reliable quorum, shared storage for guests (or replicated storage), hardware redundancy, and a watchdog. A common warning is to avoid treating HA as a backup solution, as it merely restarts a guest, not the underlying issue.
There are two primary ways to add guests to HA: directly using the command line with ha-manager, or through the web interface. When adding a guest, specify its type and ID, desired state (e.g., started), and maximum retries for restarting or relocating the resource. By default, HA will attempt to start and relocate resources only once. Command-line options allow stopping resources, live migration, relocation to another node, and removal from HA management.
Proxmox VE 9 introduced HA rules, replacing the older HA groups. Rules are defined in /etc/pve/ha/rules.cfg and can specify node affinity (preferred nodes for a guest) and resource affinity (keeping certain guests together or apart). Node affinity rules can be strict, restricting a guest to only the listed nodes, or non-strict, allowing relocation to other nodes when none of the preferred nodes are available.
Resource affinity rules default to strict enforcement, preventing conflicts such as having two DNS servers on the same node. Any conflicts in rules are automatically disabled to maintain HA functionality.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.