Fix Proxmox 9.x VM status endpoint incompatibility

Proxmox VE 9.x removed support for the "full" parameter in the
/nodes/{node}/qemu/{vmid}/status/current endpoint. When Pulse sent
GetVMStatus() requests with ?full=1, Proxmox responded with:

  API error 400: {"errors":{"full":"property is not defined in schema..."}}

This caused the cluster client to mark ALL endpoints as unhealthy, which
cascaded into multiple failures:
- VM status checks failed
- Guest agent queries were blocked
- Filesystem data collection stopped working
- All Windows VMs showed disk:-1 (unknown) instead of actual disk usage

The fix removes the ?full=1 parameter since Proxmox 9.x returns all data
by default without needing this parameter. This maintains backward
compatibility with older Proxmox versions while fixing the issue in 9.x.

After this fix:
- Cluster endpoints are correctly marked as healthy
- Guest agent queries work properly
- Windows VMs report actual disk usage (e.g., 26% on C:\ drive)
- VM monitoring functions normally on Proxmox 9.x
This commit is contained in:
rcourtman 2025-11-13 11:22:36 +00:00
parent c1d076db0c
commit 67b3b2ff84

View file

@ -1664,8 +1664,9 @@ func (c *Client) GetVMNetworkInterfaces(ctx context.Context, node string, vmid i
// GetVMStatus returns detailed VM status including balloon info
func (c *Client) GetVMStatus(ctx context.Context, node string, vmid int) (*VMStatus, error) {
// full=1 ensures Proxmox returns guest meminfo/agent data when available
resp, err := c.get(ctx, fmt.Sprintf("/nodes/%s/qemu/%d/status/current?full=1", node, vmid))
// Note: Proxmox 9.x removed support for the "full" parameter
// The endpoint now returns all data by default
resp, err := c.get(ctx, fmt.Sprintf("/nodes/%s/qemu/%d/status/current", node, vmid))
if err != nil {
return nil, err
}