[pve-devel] [PATCH qemu-server 4/4] migrate: enable dirty-bitmap migration
    Stefan Reiter 
    s.reiter at proxmox.com
       
    Thu Oct 22 17:34:20 CEST 2020
    
    
  
We query QEMU if it's safe before enabling it, as on versions without
the necessary patches it not only would be useless, but can actually
lead to hangs.
PBS state is always migrated, as it's a small amount of data anyway, so
we don't need to set a specific flag for it.
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 PVE/QemuServer.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 20e284c..a282449 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4247,6 +4247,8 @@ sub qemu_volume_snapshot_delete {
 sub set_migration_caps {
     my ($vmid) = @_;
 
+    my $qemu_support = eval { mon_cmd($vmid, "query-proxmox-support") };
+
     my $cap_ref = [];
 
     my $enabled_cap = {
@@ -4254,7 +4256,8 @@ sub set_migration_caps {
 	"xbzrle" => 1,
 	"x-rdma-pin-all" => 0,
 	"zero-blocks" => 0,
-	"compress" => 0
+	"compress" => 0,
+	"dirty-bitmaps" => $qemu_support->{'pbs-dirty-bitmap-migration'} ? 1 : 0,
     };
 
     my $supported_capabilities = mon_cmd($vmid, "query-migrate-capabilities");
-- 
2.20.1
    
    
More information about the pve-devel
mailing list