From 0e587291d6529dcfd9a9c1404d2959f99722d223 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Fri, 25 Sep 2026 07:15:08 +0200 Subject: [PATCH] fix #7224: ui: utils: show memory usage above 100% correctly render_mem_usage_percent() treated any value above 1 as a byte count and recalculated the percentage from 'mem' and 'maxmem'. But the memory usage ratio of a guest can legitimately exceed 1, for example when the reported usage is the host-side memory of the QEMU process, which includes its own overhead. In the reported case, 'mem' was 2222472192 with a 'maxmem' of 2147483648, so the ratio of about 1.035 got taken as bytes and the search and resource grids showed 0.0 % instead of 103.5 %. All users of the renderer now pass the usage as a ratio, so drop the bytes fallback and always render the value as percentage. Signed-off-by: Michal Fox --- www/manager6/Utils.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 8b99371..91dfd6e 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1207,16 +1207,6 @@ Ext.define('PVE.Utils', { if (!Ext.isNumeric(value) || value === -1) { return ''; } - if (value > 1) { - // we got no percentage but bytes - let mem = value; - let maxmem = record.data.maxmem; - if (!record.data.uptime || maxmem === 0 || !Ext.isNumeric(mem)) { - return ''; - } - - return ((mem * 100) / maxmem).toFixed(1) + ' %'; - } return (value * 100).toFixed(1) + ' %'; },