public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu-server 5/5] vzdump: don't use dirty bitmap when VM was off
Date: Wed, 19 Aug 2020 17:02:04 +0200	[thread overview]
Message-ID: <20200819150204.9178-6-s.reiter@proxmox.com> (raw)
In-Reply-To: <20200819150204.9178-1-s.reiter@proxmox.com>

There can't be a dirty bitmap when the VM was off, and if it was off we
will also shut it down after the backup, so no point in creating one.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index c919aa9..f390344 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -513,7 +513,8 @@ sub archive_pbs {
 	    $params->{encrypt} = JSON::false;
 	}
 
-	$params->{'use-dirty-bitmap'} = JSON::true if $qemu_support->{'pbs-dirty-bitmap'};
+	$params->{'use-dirty-bitmap'} = JSON::true
+	    if $qemu_support->{'pbs-dirty-bitmap'} && $self->{vm_was_running};
 
 	$params->{timeout} = 60; # give some time to connect to the backup server
 
-- 
2.20.1





  parent reply	other threads:[~2020-08-19 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 15:01 [pve-devel] [PATCH v2 0/5] improve logging for dirty bitmap PBS backups Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu 1/5] PVE: add query-pbs-bitmap-info QMP call Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 2/5] vzdump: improve logging output with dirty bitmaps Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 3/5] vzdump: display actually uploaded chunks as 'write' speed Stefan Reiter
2020-08-19 15:02 ` [pve-devel] [PATCH v2 qemu-server 4/5] vzdump: log 100% percent in case $target is 0 Stefan Reiter
2020-08-19 15:02 ` Stefan Reiter [this message]
2020-08-19 17:35 ` [pve-devel] applied-series: [PATCH v2 0/5] improve logging for dirty bitmap PBS backups Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200819150204.9178-6-s.reiter@proxmox.com \
    --to=s.reiter@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal