[pve-devel] [PATCH qemu-server 4/7] vzdump: use dirty bitmap for not running VMs too

Stefan Reiter s.reiter at proxmox.com
Thu Sep 3 10:58:48 CEST 2020


Now that VMs can be started during a backup, it makes sense to create a
dirty bitmap in these cases too, since the VM might be resumed and thus
continue running normally even after the backup is done.

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

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 196739d..074a5f4 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -299,8 +299,7 @@ my $bitmap_action_to_human = sub {
     my $action = $info->{action};
 
     if ($action eq "not-used") {
-	return "disabled (no support)" if $self->{vm_was_running};
-	return "disabled (VM not running)";
+	return "disabled (no support)";
     } elsif ($action eq "not-used-removed") {
 	return "disabled (old bitmap cleared)";
     } elsif ($action eq "new") {
@@ -546,7 +545,7 @@ sub archive_pbs {
 
 	my $is_template = PVE::QemuConfig->is_template($self->{vmlist}->{$vmid});
 	$params->{'use-dirty-bitmap'} = JSON::true
-	    if $qemu_support->{'pbs-dirty-bitmap'} && $self->{vm_was_running} && !$is_template;
+	    if $qemu_support->{'pbs-dirty-bitmap'} && !$is_template;
 
 	$params->{timeout} = 60; # give some time to connect to the backup server
 
-- 
2.20.1






More information about the pve-devel mailing list