public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 4/4] migrate: enable dirty-bitmap migration
Date: Thu, 22 Oct 2020 17:34:20 +0200	[thread overview]
Message-ID: <20201022153420.16971-5-s.reiter@proxmox.com> (raw)
In-Reply-To: <20201022153420.16971-1-s.reiter@proxmox.com>

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 | 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





  parent reply	other threads:[~2020-10-22 15:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 15:34 [pve-devel] [PATCH 0/4] Keep dirty-bitmaps for PBS during migration Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH qemu 1/4] migration/block-dirty-bitmap: fix larger granularity bitmaps Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH qemu 2/4] PVE: Migrate dirty bitmap state via savevm Stefan Reiter
2020-10-22 15:34 ` [pve-devel] [PATCH proxmox-backup-qemu 3/4] add state serializing and loading functions Stefan Reiter
2020-10-28 21:51   ` [pve-devel] applied: " Thomas Lamprecht
2020-10-22 15:34 ` Stefan Reiter [this message]
2020-10-29 18:13 ` [pve-devel] applied-series: [PATCH 0/4] Keep dirty-bitmaps for PBS during migration Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022153420.16971-5-s.reiter@proxmox.com \
    --to=s.reiter@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal