Skip to main content
RunBook Academy

Proxmox VEXII · High AvailabilityHA operations

HA operational procedures: enable, monitor, disarm

Intermediate⏱ ~22 minha-manager

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

Not yet marked complete on this device.

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:

StateBehaviour
startedHA keeps the VM running, restarting and relocating it as needed
stoppedHA keeps the VM stopped, but still relocates it on node failure
disabledStopped, and not relocated on failure
ignoredRemoved 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:

StateMeaning
fenceWaiting for the node holding this resource to be fenced
recoveryNode fenced; waiting for a viable target
errorThe 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.

Configuration changethe other resource options, and when they matter
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
OptionDefaultReach for it when
max_restart1A guest that sometimes fails its first start on a cold node
max_relocate1You want HA to try more than one alternative before giving up
failback1A guest should stay where it was recovered rather than moving back
auto-rebalance1The guest must not be moved by the CRS rebalancer
commentAlways. 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.

Service impact possiblenode maintenance mode
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 status

Services 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.

Cluster-wide riskdisarm and re-arm HA cluster-wide
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 status

Monitoring HA state

ha-manager status --verbose
Read-only / Safewhat a healthy cluster looks like, and where to look when it is not
# ha-manager status
quorum 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 than OK and 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 - active means it is managing resources; idle means 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.

Service impact possibleclear an error state - after fixing the cause
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 disabled state after recovery.

Key takeaways

  • Use ha-manager add to enable, ha-manager set to change state, ha-manager remove to disable.
  • Disarm HA before node maintenance.
  • Watch the master election.

Knowledge check

Knowledge check · 5 questions

  1. Q1. You need to reboot one node for a firmware update, with the rest of the cluster staying protected. Which command?

  2. Q2. Removing a VM from HA management leaves it running exactly where it is; only the automatic recovery stops.

  3. Q3. Which HA state should a VM in error be set to before manual recovery?

  4. Q4. An HA resource is set to state "stopped". Its node fails. What does the CRM do?

  5. 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.