[pve-devel] [PATCH qemu-server 1/1] snapshot: prohibit snapshot with ram if vm has a passthrough pci device

Fiona Ebner f.ebner at proxmox.com
Tue May 14 16:08:04 CEST 2024


Am 14.05.24 um 15:03 schrieb Fiona Ebner:
> That said, looking into this and wondering why QEMU doesn't check it,
> there's an issue in that our savevm-async code does not properly check
> for all migration blockers (only some of them)! I'll work out a patch
> for that. 

Well...you can't live-migrate with VMDK:

> VM 105 qmp command 'migrate' failed - The vmdk format used by node '#block185' does not support live migration
This also means that improving the check for blockers for savevm-async
would prohibit suspend-to-disk for VMs with a VMDK image (snapshots are
already not supported on the storage layer).

>From QEMU commit 5aaac46793 ("migration: savevm: consult migration
blockers"):

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

VMDK does not implement bdrv_co_invalidate_cache() and sets a migration
blocker, so the penalty would be prohibiting suspend-to-disk for them
:(. Note that other drivers we care about, i.e. RBD/iSCSI/file-posix all
do implement bdrv_co_invalidate_cache() and do not set a migration blocker.

Still, it seems dangerous to ignore other migration blockers, leading to
issues like the one motivating the patch. I'll see if filtering that
special blocker or introducing special handling is not too
difficult/hacky. Otherwise, I'm not sure if it'd be tolerable to break
suspend-to-disk with VMDK (maybe for an upcoming release)?




More information about the pve-devel mailing list