I'm looking for an API call or a qm command to set HA on a new VM in Proxmox.
I've looked in the qm man page and API guide.
AI sites tell me this:
But that doesn't work, I get the error " "ha": "property is not defined in schema and the schema does not allow additional properties""
I've looked in the qm man page and API guide.
AI sites tell me this:
Code:
$body = 'ha=started,group=PXGroup,max_restarts=3,max_relocate=1'
$apiUrl = "https://$pxhost/api2/json/nodes/$node/qemu/$vmid/config"
Invoke-RestMethod -Uri $apiUrl -Headers $headers -Body $body -Method POST -ContentType 'application/x-www-form-urlencoded'
But that doesn't work, I get the error " "ha": "property is not defined in schema and the schema does not allow additional properties""