From 96f00fd866e7691dee7b315af165595c7bd23a50 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 8 May 2019 17:32:37 +0000 Subject: [PATCH] fix #503: print correct offline time for stop mode backups Signed-off-by: Thomas Lamprecht --- PVE/VZDump/QemuServer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 70abe99..8dd2fa4 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -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'); } -- 2.39.2