From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 539946B4C5 for ; Tue, 16 Mar 2021 20:52:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 42D5527079 for ; Tue, 16 Mar 2021 20:51:32 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 1DC672706A for ; Tue, 16 Mar 2021 20:51:31 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9E3B14643F for ; Tue, 16 Mar 2021 20:51:30 +0100 (CET) Message-ID: <49f560cb-6b9a-78f9-aa46-7d680ca6e030@proxmox.com> Date: Tue, 16 Mar 2021 20:51:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Thunderbird/87.0 Content-Language: en-US To: Proxmox VE development discussion , Stefan Reiter References: <20210316163023.24534-1-s.reiter@proxmox.com> <20210316163023.24534-2-s.reiter@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210316163023.24534-2-s.reiter@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.047 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [snapshot-test.pm, qemuconfig.pm, qemuserver.pm] Subject: [pve-devel] applied: [PATCH qemu-server 2/2] snapshot: set migration caps before savevm-start X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 19:52:02 -0000 On 16.03.21 17:30, Stefan Reiter wrote: > A "savevm" call (both our async variant and the upstream sync one) use > migration code internally. As such, they both expect migration > capabilities to be set. > > This is usually not a problem, as the default set of capabilities is ok, > however, it leads to differing snapshot settings if one does a snapshot > after a machine has been live-migrated (as the capabilities will persist > from that), which could potentially lead to discrepencies in snapshots > (currently it seems to be fine, but it still makes sense to set them to > safeguard against future changes). > > Note that we do set the "dirty-bitmaps" capability now (if > query-proxmox-support reports true), which has three effects: > > 1) PBS dirty-bitmaps are preserved in snapshots, enabling > fast-incremental backups to work after rollback (as long as no newer > backups exist), including for hibernate/resume > 2) snapshots taken from now on, with a QEMU version supporting bitmap > migration, *might* lead to incompatibility of these snapshots with > QEMU versions that don't know about bitmaps at all (i.e. < 5.0 IIRC?) > - forward compatibility is still given, and all other capabilities we > set go back to very old versions not an issue, in practice starting a snapshot made with a newer QEMU with and older one did not work often due to the running machine version not being available anyway... > 3) since we now explicitly disable bitmap saving if the version doesn't > report support, we avoid crashes even with not-updated QEMU versions > > Signed-off-by: Stefan Reiter > --- > PVE/QemuConfig.pm | 1 + > PVE/QemuServer.pm | 8 ++++++-- > test/snapshot-test.pm | 2 ++ > 3 files changed, 9 insertions(+), 2 deletions(-) > > applied, thanks! Albeit it feels like this could have been two patches and a short comment for the set_migration_caps calls, as they can be slightly unexpected for someone not knowing that half the things QEMU can do base on the migrate code.