Skip to content

update-HA.sh

Manages Proxmox High Availability (HA) and ZFS replication for a TAPPaaS module based on its JSON configuration.

Usage

update-HA.sh <module-name>

What it does

Based on the module's HANode field in <module>.json:

  1. If HANode is "NONE" or not present:
  2. Removes VM from any HA group
  3. Deletes any existing replication jobs

  4. If HANode is set to a valid node (e.g., "tappaas2"):

  5. Validates the HA node is reachable
  6. Verifies storage exists on both nodes
  7. Adds VM to HA resources with node-affinity rule
  8. Sets up ZFS replication using replicationSchedule (default: */15)

JSON fields used

Field Description Default
vmid VM ID (required) -
node Primary node tappaas1
HANode Secondary node for HA NONE
replicationSchedule Cron-style replication interval */15
storage ZFS storage pool tanka1

Examples

# Configure HA for nextcloud module
update-HA.sh nextcloud

# After removing HANode from JSON, remove HA config
update-HA.sh nextcloud

Requirements

  • SSH access to all Proxmox nodes as root
  • Same storage pool must exist on both primary and HA nodes
  • Proxmox HA services must be enabled (pve-ha-lrm, pve-ha-crm, corosync)

See Also