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>
sub set_migration_caps {
my ($vmid) = @_;
+ my $qemu_support = eval { mon_cmd($vmid, "query-proxmox-support") };
+
my $cap_ref = [];
my $enabled_cap = {
"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");