]> git.proxmox.com Git - qemu-server.git/commitdiff
migrate: enable dirty-bitmap migration
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 22 Oct 2020 15:34:20 +0000 (17:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Oct 2020 17:18:02 +0000 (18:18 +0100)
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@proxmox.com>
PVE/QemuServer.pm

index 20e284cc1f2b58c228aedcdfc9f0c81aa6a2e988..a282449005a0fe1d904673fadcf341cc704d2c62 100644 (file)
@@ -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");