From 57649c8bc46c1cf9cf23ee985b35168fc40632ee Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Mon, 25 Aug 2025 15:04:41 +0000 Subject: [PATCH] fix: correct the misinformation about PVE 9 VM disk monitoring Previous advice was completely wrong. The facts: - VM.Monitor permission doesn't exist in PVE 9 (was removed) - It was replaced with VM.GuestAgent.Audit - But even with correct permissions, API tokens CANNOT access guest agent data on PVE 9 - This is Proxmox bug #1373 with NO working workaround for API tokens - Users must accept 0% VM disk usage on PVE 9 until Proxmox fixes it upstream Updated all documentation and error messages to reflect this reality instead of giving false hope about non-existent workarounds. --- docs/FAQ.md | 7 ++++--- internal/api/config_handlers.go | 9 +++++---- internal/monitoring/monitor.go | 8 ++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 4084e6f40..529ede763 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -91,9 +91,10 @@ Reduce `metricsRetentionDays` in settings and restart ### Why do VMs show 0% disk usage? This is usually one of these issues: -**Proxmox 9**: API tokens may have issues accessing guest agent data in some configurations. Workarounds: -- Ensure your API token has VM.Monitor permission (re-run setup script if needed) -- Accept that VM disk will show 0% if permissions aren't sufficient +**Proxmox 9**: API tokens cannot access guest agent data due to a Proxmox bug (#1373). Unfortunately there's no workaround: +- VM.Monitor permission was removed in PVE 9 (replaced with VM.GuestAgent.Audit) +- Even with correct permissions, API tokens are blocked from accessing VM disk info +- You'll have to accept that VM disk usage will show 0% until Proxmox fixes this - Note: Container (LXC) disk usage works fine **Proxmox 8**: Check that: diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go index 731a2e90a..9050a8c59 100644 --- a/internal/api/config_handlers.go +++ b/internal/api/config_handlers.go @@ -2172,10 +2172,11 @@ else echo "is not accessible to API tokens, even with correct permissions." echo "Proxmox's own web UI also shows 0% for VM disk usage (bug #1373)." echo "" - echo "Workarounds:" - echo " 1. Ensure VM.Monitor permission is granted (should be done by this script)" - echo " 2. Container (LXC) disk usage works correctly with tokens" - echo " 3. If still not working, check Pulse logs for specific errors" + echo "Unfortunately, there are NO working workarounds for API tokens:" + echo " 1. VM.Monitor was removed in PVE 9 (replaced with VM.GuestAgent.Audit)" + echo " 2. Even with correct permissions, tokens can't access guest agent data" + echo " 3. Container (LXC) disk usage works correctly with tokens" + echo " 4. You'll have to accept 0% VM disk usage until Proxmox fixes this" echo "" echo "Note: qemu-guest-agent must be installed in VMs for any disk" echo "monitoring to work. The data exists but token access is restricted." diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go index c30750b64..1965885da 100644 --- a/internal/monitoring/monitor.go +++ b/internal/monitoring/monitor.go @@ -992,11 +992,11 @@ func (m *Monitor) pollVMsAndContainersEfficient(ctx context.Context, instanceNam log.Info(). Str("instance", instanceName). Str("vm", res.Name). - Msg("• Proxmox 8: If you added this node before v4.7, re-run the setup script to add VM.Monitor permission") + Msg("• Proxmox 8: Re-run setup script to add VM.Monitor permission if added before v4.7") log.Info(). Str("instance", instanceName). Str("vm", res.Name). - Msg("Workaround: Grant VM.Monitor permission to your API token user or accept that VM disk usage will show 0%") + Msg("Unfortunately, there's no working workaround for API tokens on PVE 9 - VM disk will show 0%") } else { log.Debug(). Err(err). @@ -1374,11 +1374,11 @@ func (m *Monitor) pollVMsWithNodes(ctx context.Context, instanceName string, cli log.Info(). Str("instance", instanceName). Str("vm", vm.Name). - Msg("• Proxmox 8: If you added this node before v4.7, re-run the setup script to add VM.Monitor permission") + Msg("• Proxmox 8: Re-run setup script to add VM.Monitor permission if added before v4.7") log.Info(). Str("instance", instanceName). Str("vm", vm.Name). - Msg("Workaround: Grant VM.Monitor permission to your API token user or accept that VM disk usage will show 0%") + Msg("Unfortunately, there's no working workaround for API tokens on PVE 9 - VM disk will show 0%") } else { log.Debug(). Err(err).