From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v3 qemu master+stable-bookworm] savevm-async: reuse migration blocker check for snapshots/hibernation
Date: Thu, 17 Jul 2025 09:50:19 +0200 [thread overview]
Message-ID: <bdf0349d-8dcd-4852-a37a-84c16c2a923a@proxmox.com> (raw)
In-Reply-To: <20250618102531.57444-1-f.ebner@proxmox.com>
Am 18.06.25 um 12:25 schrieb Fiona Ebner:
> Same rationale as with upstream QEMU commit 5aaac46793 ("migration:
> savevm: consult migration blockers"), migration and (async) snapshot
> are essentially the same operation and thus snapshot also needs to
> check for migration blockers. For example, this catches passed-through
> PCI devices, where the driver does not support migration and VirtIO-GL
> display, which also does not support migration yet.
>
> In the case of VirtIO-GL, there were crashes [0].
>
> However, the commit notes:
>
>> There is really no difference between live migration and savevm, except
>> that savevm does not require bdrv_invalidate_cache to be implemented
>> by all disks. However, it is unlikely that savevm is used with anything
>> except qcow2 disks, so the penalty is small and worth the improvement
>> in catching bad usage of savevm.
>
> and for Proxmox VE, suspend-to-disk with VMDK does use savevm-async
> and would be broken by simply using migration_is_blocked(). To keep
> this working, introduce a new helper that filters blockers with the
> prefix used by the VMDK migration blocker.
>
> The function qemu_savevm_state_blocked() is called as part of
> savevm_async_is_blocked() so no check is lost with this
> patch. The helper is declared in migration/migration.c to be able to
> access the 'migration_blockers'.
>
> The VMDK blocker message is declared via a '#define', because using a
> 'const char*' led to the linker to complain about multiple
> declarations. The message does not include the reference to the block
> node anymore, but users can still easily find a VMDK disk in the VM
> configuration.
>
> Note, this also "breaks" snapshot and hibernate with VNC clipboard by
> preventing it. Previously, this would "work", because the Proxmox VE
> API has no check yet, but the clipboard will be broken after rollback,
> in the sense that it cannot be used anymore, not just lost contents.
> So some users might consider adding the check here a breaking change
> even if it's technically correct to prevent snapshot and hibernate
> with VNC clipboard. But other users might rightfully complain about
> broken clipboard. And again, the check also prevents blockers from
> passed-through PCI devices, etc. so it seems worth tolerating that
> breakage.
>
> [0]: https://forum.proxmox.com/threads/136976/
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> It's still worth adding a front-end check for more things to catch
> failure early, but there should be a full check in the backend to
> prevent crashes and for future-proofing.
>
> Previous iteration:
> https://lore.proxmox.com/pve-devel/20240911140910.190670-1-f.ebner@proxmox.com/
>
> Changes in v3:
> * Rebase.
Ping
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-17 7:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 10:25 Fiona Ebner
2025-07-17 7:50 ` Fiona Ebner [this message]
2025-07-17 21:28 ` [pve-devel] applied: " 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=bdf0349d-8dcd-4852-a37a-84c16c2a923a@proxmox.com \
--to=f.ebner@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