[pve-devel] [PATCH qemu-server 3/5] vzdump: increase timeout for attaching drives to 60 seconds

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


The default timeout for HMP commands is 5 seconds and while it should
be rather fast to attach a new drive to QEMU, a system can be very
busy during backup, so future-proof and increase to 60 seconds.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 8c97ee62..6f0656fe 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -461,7 +461,7 @@ my $attach_tpmstate_drive = sub {
 
     my $drive = "file=$task->{tpmpath},if=none,read-only=on,id=drive-tpmstate0-backup";
     $drive =~ s/\\/\\\\/g;
-    my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\"");
+    my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\"", 60);
     die "attaching TPM drive failed - $ret\n" if $ret !~ m/OK/s;
 };
 
@@ -606,7 +606,7 @@ my sub attach_fleecing_images {
 	    # fleecing image when allocating.
 	    $drive .= ",size=$di->{size}" if $format eq 'raw';
 	    $drive =~ s/\\/\\\\/g;
-	    my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\"");
+	    my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\"", 60);
 	    die "attaching fleecing image $volid failed - $ret\n" if $ret !~ m/OK/s;
 	}
     }
-- 
2.39.2





More information about the pve-devel mailing list