migrate: enable dirty-bitmap migration

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>
This commit is contained in:
Stefan Reiter 2020-10-22 17:34:20 +02:00 committed by Thomas Lamprecht
parent 31655cbb7f
commit acc10e5159

View 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");