]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/VZDump/QemuServer.pm
Revert "fix #1071: VMs with IOThread enabled disks can now be backed up"
[qemu-server.git] / PVE / VZDump / QemuServer.pm
index 70abe994b67dc1b4d4985e19b30356d9af80e7cc..b8d8fa9b44db11a4272721b143c0a33a285c2da1 100644 (file)
@@ -396,7 +396,7 @@ sub archive {
                'config-file' => $conffile,
                devlist => $devlist
            };
-           
+
            $params->{'firewall-file'} = $firewall if -e $firewall;
            $qmpclient->queue_cmd($vmid, $backup_cb, 'backup', %$params);
        };
@@ -439,7 +439,13 @@ sub archive {
        $self->loginfo("started backup task '$uuid'");
 
        if ($resume_on_backup) {
-           $self->loginfo("resume VM");
+           if (my $stoptime = $task->{vmstoptime}) {
+               my $delay = time() - $task->{vmstoptime};
+               $task->{vmstoptime} = undef; # avoid printing 'online after ..' twice
+               $self->loginfo("resuming VM again after $delay seconds");
+           } else {
+               $self->loginfo("resuming VM again");
+           }
            PVE::QemuServer::vm_mon_cmd($vmid, 'cont');
        }