pve_ha_rule_create
Create a Proxmox VE HA rule to constrain resource placement by node-affinity or resource-affinity. Dry-run returns a plan; confirm=True to execute.
Instructions
MUTATION: create an HA rule (the PVE 9 replacement for HA groups). Dry-run by default — the
PLAN shows the rule type, resources, and placement effect. rule_type is 'node-affinity'
(needs nodes; optional strict) or 'resource-affinity' (needs affinity positive|negative).
confirm=True to execute. Synchronous (pmxcfs config write, no UPID). RISK_MEDIUM — constrains
CRM placement. View rules with pve_ha_rules_list; change one with pve_ha_rule_update.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | New HA rule ID (name used to reference this rule). | |
| nodes | No | Comma-separated node list with optional priority, e.g. 'pve1:2,pve2' — required for rule_type='node-affinity'. | |
| strict | No | node-affinity only: if True, resources may run ONLY on the listed nodes (availability risk if all are down). | |
| comment | No | Free-text comment stored with the rule. | |
| confirm | No | False (default) returns a dry-run PLAN only; True executes the change. | |
| disable | No | If True, the rule is created disabled (no effect until enabled). | |
| affinity | No | 'positive' (keep resources together) or 'negative' (keep resources apart) — required for rule_type='resource-affinity'. | |
| resources | Yes | Comma-separated HA resource SIDs the rule applies to, e.g. 'vm:100,ct:101'. | |
| rule_type | Yes | Rule type: 'node-affinity' (requires nodes) or 'resource-affinity' (requires affinity). | |
| proximo_target | No | Which configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |