[pve-devel] [PATCH qemu-server 2/5] api: human monitor: increase timeout to 25 seconds

Fiona Ebner f.ebner at proxmox.com
Fri May 3 13:19:51 CEST 2024


The default timeout is 5 seconds, but some HMP commands (e.g.
disk-related ones) might take longer than that. The API call is
synchronous, so has to complete within 30 seconds, and since there is
no other costly operation, use 25 seconds.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 2a349c8c..8127ec02 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -4919,7 +4919,7 @@ __PACKAGE__->register_method({
 
 	my $res = '';
 	eval {
-	    $res = PVE::QemuServer::Monitor::hmp_cmd($vmid, $param->{command});
+	    $res = PVE::QemuServer::Monitor::hmp_cmd($vmid, $param->{command}, 25);
 	};
 	$res = "ERROR: $@" if $@;
 
-- 
2.39.2





More information about the pve-devel mailing list