[pve-devel] [PATCH v2 qemu-server 1/2] fix #6207: vm status: return undef values when disk{read, write} cannot be queried

Fiona Ebner f.ebner at proxmox.com
Thu Sep 25 14:25:08 CEST 2025


If disk read/write cannot be queried because of QMP timeout, they
should not be reported as 0, because a consumer of the RRD stats
cannot distinguish between 0 being an actual 0 value and 0 being an
indicator for the absence of the real value. The RRD graphs in the UI
will already show this correctly.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

Changes in v2:
* New approach, return undef instead of caching previous value.

 src/PVE/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index f7f85436..d6d0cb13 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -2731,8 +2731,8 @@ sub vmstatus {
         $d->{netout} = 0;
         $d->{netin} = 0;
 
-        $d->{diskread} = 0;
-        $d->{diskwrite} = 0;
+        $d->{diskread} = undef;
+        $d->{diskwrite} = undef;
 
         $d->{template} = 1 if PVE::QemuConfig->is_template($conf);
 
-- 
2.47.3





More information about the pve-devel mailing list