[pve-devel] applied: [PATCH qemu-server 2/2] snapshot: set migration caps before savevm-start

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Mar 16 20:51:29 CET 2021


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 <s.reiter at proxmox.com>
> ---
>  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.





More information about the pve-devel mailing list