]> git.proxmox.com Git - qemu-server.git/commitdiff
qmp client: increase timeout for thaw
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 2 Mar 2022 13:21:07 +0000 (14:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 3 Mar 2022 11:12:14 +0000 (12:12 +0100)
Using a loop of freeze, sleep 5, thaw, sleep 5, an idling Windows 11
VM with 4 cores and 8GiB RAM once took 54 seconds for thawing. It took
less than a second about 90% of the time and maximum of a few seconds
for the majortiy of other cases, but there can be outliers where 10
seconds is not enough.

And there can be hookscripts executed upon thaw, which might also not
complete instantly.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QMPClient.pm

index ea4dc0ba0d08046d93f7ff934c400659d2d40b70..8af28e80ef6d713f8d806633fd14354072c0464c 100644 (file)
@@ -113,9 +113,10 @@ sub cmd {
            # locked state with high probability, so use an generous timeout
            $timeout = 60*60; # 1 hour
        } elsif ($cmd->{execute} eq 'guest-fsfreeze-thaw') {
-           # thaw has no possible long blocking actions, either it returns
-           # instantly or never (dead locked)
-           $timeout = 10;
+           # While it should return instantly or never (dead locked) for Linux guests,
+           # the variance for Windows guests can be big. And there might be hook scripts
+           # that are executed upon thaw, so use 3 minutes to be on the safe side.
+           $timeout = 3 * 60;
        } elsif ($cmd->{execute} eq 'savevm-start' ||
                 $cmd->{execute} eq 'savevm-end' ||
                 $cmd->{execute} eq 'query-backup' ||