[pve-devel] [PATCH qemu-server] Fix races with suspended VMs that can wake up

Fiona Ebner f.ebner at proxmox.com
Mon Oct 16 13:43:02 CEST 2023


I'd add a bit to the commit message, but changes look good to me:

Am 13.10.23 um 15:50 schrieb Filip Schauer:
> Fix races with ACPI-suspended VMs which could wake up during migration
> or during a suspend-mode backup.
> 
> Revert prevention, of ACPI-suspended VMs automatically resuming after
> migration, introduced by 7ba974a6828d. The commit introduced a potential
> problem that causes a suspended VM that wakes up during migration to
> remain paused after the migration finishes.
> 

This can be fixed once QEMU preserves the 'suspended' runstate during
migration (current patch on the qemu-devel list [0]) by checking for
the 'suspended' runstate on the target after migration.

> Furthermore the commit increased the race window during the preparation
> of a suspend-mode backup, when a suspended VM wakes up between the
> vm_is_paused check in PVE::VZDump::QemuServer::prepare and
> PVE::VZDump::QemuServer::qga_fs_freeze. This causes the code to skip
> fs-freeze even if the VM has woken up, potentially leaving the file
> system in an inconsistent state.
> 
> To prevent this, do not treat the suspended runstate as paused when
> migrating or archiving a VM.
> 

[0]: https://lists.nongnu.org/archive/html/qemu-devel/2023-08/msg05260.html

> Signed-off-by: Filip Schauer <f.schauer at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>





More information about the pve-devel mailing list