fix #503: print correct offline time for stop mode backups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-05-08 17:32:37 +00:00
parent 460fd91560
commit 96f00fd866

View 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');
}