From f421fe5a7721f07f0d9443477e85f081bc48095b Mon Sep 17 00:00:00 2001 From: kamaji Date: Tue, 24 Feb 2026 22:11:12 -0600 Subject: [PATCH] Fix VMs without guest stats showing 0 MB usage Don't fall back to allocated RAM for memory_total_mb when there's no guest-side data. Keeps both used and total at 0 so the frontend shows just the allocated amount instead of "0 MB / 16.0 GB". Co-Authored-By: Claude Opus 4.6 --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 7683ef0..a02408a 100644 --- a/app.py +++ b/app.py @@ -356,7 +356,7 @@ def get_vms(): cpu_pct = round(max(0, min(100, cpu_pct)), 1) vm["cpu_percent"] = cpu_pct vm["memory_used_mb"] = stats["memory_used_mb"] - vm["memory_total_mb"] = stats["memory_total_mb"] or vm["memory_mb"] + vm["memory_total_mb"] = stats["memory_total_mb"] else: vm["cpu_percent"] = 0.0 vm["memory_used_mb"] = 0