Skip to content

Set-PveClusterHaResources

Update resource configuration.

API: PUT /cluster/ha/resources/{sid}, Proxmox VE API viewer

Set-PveClusterHaResources
[-PveTicket <PveTicket>]
[-AutoRebalance <bool>]
[-Comment <string>]
[-Delete <string>]
[-Digest <string>]
[-Failback <bool>]
[-Group <string>]
[-MaxRelocate <int>]
[-MaxRestart <int>]
-Sid <string>
[-State <string>]
[<CommonParameters>]
Parameter Type Required Description
-PveTicket PveTicket No Ticket data connection.
-AutoRebalance bool No HA resource may be migrated during automatic rebalancing.
-Comment string No Description.
-Delete string No A list of settings you want to delete.
-Digest string No Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
-Failback bool No Automatically migrate HA resource to the node with the highest priority according to their node affinity rules, if a node with a higher priority than the current node comes online.
-Group string No The HA group identifier.
-MaxRelocate int No Maximal number of resource relocate tries when a resource fails to start.
-MaxRestart int No Maximal number of tries to restart the resource on a node after its start failed. When reached, the HA manager will try to relocate the resource to an eligible node.
-Sid string Yes HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).
-State string No Requested resource state. Values: started, stopped, enabled, disabled, ignored.

Every parameter also binds by property name from the pipeline, so an object with node and vmid properties (the output of Get-PveGuest, for one) fills -Node and -Vmid. Without -PveTicket the cmdlet uses the last connection, see Connection.

A PveResponse: the data returned by Proxmox VE is in .Response.data, the outcome in .IsSuccessStatusCode. See Results and Errors.