Pulse/pkg/proxmox
rcourtman 9199892115 Fix Windows VM disk accumulation bug by normalizing drive letters
Related to #656

Windows guest agents can return multiple directory mountpoints (C:\, C:\Users,
C:\Windows) all on the same physical drive. When the QEMU guest agent omits
disk[] metadata, commit 5325ef481 falls back to using the mountpoint string
as the disk identifier. This causes every Windows directory to be treated as
a separate disk, accumulating to inflated totals (e.g., 1TB reported for a
250GB drive).

Root cause:
The fallback logic in pkg/proxmox/client.go:1585-1594 assigns fs.Disk =
fs.Mountpoint when disk[] is missing. On Windows, every directory path is
unique, so the deduplication guard in internal/monitoring/monitor_polling.go:
619-635 never triggers, causing all directories to be summed.

Changes:
- Detect Windows-style mountpoints (drive letter + colon + backslash)
- Normalize to drive root when disk[] is missing (e.g., C:\Users → C:)
- Preserve existing behavior for Linux/BSD and VMs with disk[] metadata
- Add debug logging for synthesized Windows drive identifiers

This fix maintains backward compatibility with commit 5325ef481 while
preventing the Windows directory accumulation issue. LXC containers are
unaffected as they use a different code path.
2025-11-07 12:27:11 +00:00
..
ceph.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
client.go Fix Windows VM disk accumulation bug by normalizing drive letters 2025-11-07 12:27:11 +00:00
client_test.go Add replication monitoring plumbing and UI 2025-10-22 16:10:15 +00:00
cluster_client.go Fix inflated RAM usage reporting for LXC containers 2025-11-06 00:16:18 +00:00
cluster_client_test.go security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
replication.go Add replication monitoring plumbing and UI 2025-10-22 16:10:15 +00:00
zfs.go Fix false ZFS log/cache warnings 2025-10-14 20:57:43 +00:00
zfs_test.go Expand monitoring and discovery test coverage 2025-10-16 08:17:08 +00:00