]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #503: print correct offline time for stop mode backups
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 May 2019 17:32:37 +0000 (17:32 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 May 2019 14:28:15 +0000 (16:28 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/VZDump/QemuServer.pm

index 70abe994b67dc1b4d4985e19b30356d9af80e7cc..8dd2fa4684ae732a01fc2fc4fb8889b95616efe9 100644 (file)
@@ -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');
        }