[pve-devel] [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM

Fiona Ebner f.ebner at proxmox.com
Wed Oct 22 12:41:15 CEST 2025


As reported in the community forum [0], Proxmox Datacenter Manager
will fail to handle the result of the status API call for a shut down
VM. The reason is that the return schema requires having an integer
return value for disk{read,write}, so an explicit undef is not
allowed. However, the properties are optional and are not relevant for
a shut down guest, so just don't set them at all if no value was
queried. This also makes sure that bug #6207 does not reappear. Note
that pvestatd would already not consider the value for shut down VMs
and treats the value not being present and the value being an explicit
undef the same, see update_qemu_status() in pvestatd.pm.

[0]: https://forum.proxmox.com/threads/160166/post-809901

Fixes: 528df523 ("fix #6207: vm status: return undef values when disk{read, write} cannot be queried")
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/QemuServer.pm | 3 ---
 1 file changed, 3 deletions(-)

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





More information about the pve-devel mailing list