Proxmox VEXII · High AvailabilityHA operations
HA operational procedures: enable, monitor, disarm
What you'll learn
- Enable HA for a VM or container
- Monitor HA state in real time
- Disarm HA safely during maintenance
- Recover from HA error state
- Choose between node maintenance mode and a cluster-wide disarm
Prerequisites
Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12
Why this matters in production
HA needs day-2 operations: enabling HA on VMs, monitoring it, and disarming it deliberately during maintenance. Each operation has gotchas.
Enabling HA on a VM
GUI: VM → HA → Activate. CLI:
ha-manager add vm:100 --state started
Configuring HA state
ha-manager set vm:100 --state started
ha-manager set vm:100 --state stopped
ha-manager set vm:100 --state disabled
ha-manager set vm:100 --state ignored
The requested states you set, and what each means:
| State | Behaviour |
|---|---|
started | HA keeps the VM running, restarting and relocating it as needed |
stopped | HA keeps the VM stopped, but still relocates it on node failure |
disabled | Stopped, and not relocated on failure |
ignored | Removed from HA management entirely while the resource entry stays |
The distinction between stopped and disabled is the one that surprises
people. A stopped resource is still HA’s business: if its node fails, HA
moves the resource’s ownership to a survivor and keeps it stopped there. A
disabled resource is left alone. If you are stopping a guest for a week and
do not want the HA stack tracking it through a node failure, disabled is the
one you want.
Separately, the CRM maintains internal states you will see in
ha-manager status and cannot set directly:
| State | Meaning |
|---|---|
fence | Waiting for the node holding this resource to be fenced |
recovery | Node fenced; waiting for a viable target |
error | The LRM reported a failure. Manual intervention required. |
Reading those three correctly during an incident is most of the diagnosis. A
service sitting in fence for minutes means fencing is not completing - see
anatomy of a bad fence.
A service in recovery that does not progress means no node can run it, which
is usually storage - see
what HA requires.
set -euo pipefail
VMID=100
ha-manager set "vm:$VMID" \
--max_restart 2 \
--max_relocate 1 \
--failback 0 \
--auto-rebalance 0 \
--comment 'payments-db: pinned, do not auto-move'
ha-manager config --type vm| Option | Default | Reach for it when |
|---|---|---|
max_restart | 1 | A guest that sometimes fails its first start on a cold node |
max_relocate | 1 | You want HA to try more than one alternative before giving up |
failback | 1 | A guest should stay where it was recovered rather than moving back |
auto-rebalance | 1 | The guest must not be moved by the CRS rebalancer |
comment | — | Always. It is the only place the why survives. |
failback 0 is under-used. With the default, a guest recovered onto a
survivor migrates back to its preferred node as soon as that node returns -
which means a node failure costs you two service interruptions rather than
one, the second at an unpredictable time when the node happens to come back.
Removing HA from a VM
ha-manager remove vm:100
Moving HA-managed guests by hand
Ask the CRM to do it, rather than migrating behind its back. ha-manager migrate and ha-manager relocate are aliases for the corresponding
crm-command forms.
# Online migration, guest keeps running (VMs).
ha-manager migrate vm:100 pve-02
# Stop on the old node, start on the new one.
ha-manager relocate vm:100 pve-02
Node maintenance
For work on one node - firmware, a reboot, a NIC swap - PVE has a purpose- built mode. It marks the node unavailable for placement and migrates its HA resources away, while leaving HA fully armed everywhere else.
set -euo pipefail
NODE=pve-03
ha-manager crm-command node-maintenance enable "$NODE"
# Wait until nothing HA-managed is still assigned to that node.
ha-manager status | grep -E "service .*\($NODE," || echo 'node is clear'
# ... perform the maintenance, reboot as needed ...
ha-manager crm-command node-maintenance disable "$NODE"
ha-manager statusServices that were on the node migrate back when maintenance mode is disabled.
If you do not want that, set --failback 0 on the resources concerned before
you start.
Disarming the whole stack
For work that affects every node - a corosync network change, replacing the switch that carries all cluster links - there is a documented cluster-wide disarm. It releases the watchdogs everywhere, so there is no automatic failover at all while it is in effect.
set -euo pipefail
# freeze: leave services running and untouched.
# ignore: release HA's claim on them entirely.
ha-manager crm-command disarm-ha freeze
ha-manager status | grep -iE 'fencing|watchdog|disarm'
# ... the disruptive work ...
ha-manager crm-command arm-ha
ha-manager statusMonitoring HA state
ha-manager status --verbose
# ha-manager statusquorum OK
master pve-01 (active, Wed Aug 12 09:41:02 2026)
lrm pve-01 (active, Wed Aug 12 09:41:05 2026)
lrm pve-02 (active, Wed Aug 12 09:41:04 2026)
lrm pve-03 (idle, Wed Aug 12 09:41:03 2026)
service ct:210 (pve-02, started)
service vm:100 (pve-01, started)
service vm:104 (pve-03, error)Illustrative output
Reading it:
quorum- anything other thanOKand nothing else on the page matters.master- which node holds the manager lock. A timestamp that is not advancing, or a master that changes repeatedly, is a cluster problem.lrm-activemeans it is managing resources;idlemeans it has none assigned, which is normal on a node with no HA guests and abnormal on one that should have some.old timestamp - dead?is a node the cluster has lost.service- the node it is assigned to, and its state.
The watchdog state appears in the verbose output as armed, standby,
disarming or disarmed. There is no ha-manager watchdog command; to check
that a node has a watchdog device at all - which is a different and more
important question - test for the device:
for NODE in pve-01 pve-02 pve-03; do
printf '%-10s ' "$NODE"
ssh -o BatchMode=yes "root@$NODE" \
'test -c /dev/watchdog && echo present || echo "MISSING - cannot self-fence"'
done
Recovering from error state
If a resource enters error state, HA has stopped trying and is waiting for a
human. The recovery is three steps and the middle one is the whole job.
set -euo pipefail
VMID=100
# 1. Find out WHY before touching anything. The CRM master's log names it.
ha-manager status | grep "vm:$VMID"
journalctl -u pve-ha-crm --since '1 hour ago' --no-pager | grep -i "vm:$VMID"
journalctl -u pve-ha-lrm --since '1 hour ago' --no-pager | grep -i "vm:$VMID"
# 2. Fix the cause: storage offline, no capacity, missing bridge, an
# unsatisfiable strict rule, a guest config referring to a device this
# node does not have.
# 3. Only then clear the flag and re-enable.
ha-manager set "vm:$VMID" --state disabled
ha-manager set "vm:$VMID" --state started
ha-manager status | grep "vm:$VMID"Production considerations
Common mistakes
- Enabling HA without verifying the prerequisites.
- Forgetting to disarm HA before maintenance.
- Leaving VMs in
disabledstate after recovery.
Key takeaways
- Use
ha-manager addto enable,ha-manager setto change state,ha-manager removeto disable. - Disarm HA before node maintenance.
- Watch the master election.
Knowledge check
Knowledge check · 5 questions
Q1. You need to reboot one node for a firmware update, with the rest of the cluster staying protected. Which command?
Q2. Removing a VM from HA management leaves it running exactly where it is; only the automatic recovery stops.
Q3. Which HA state should a VM in error be set to before manual recovery?
Q4. An HA resource is set to state "stopped". Its node fails. What does the CRM do?
Q5. Which are good reasons to set failback=0 on an HA resource? Select all that apply.
Passing score: 75%. Answers are checked in this browser.