[PATCH] qemu: snapshot: Collect 'query-named-block-nodes' prior to memory migration

Eric Blake eblake at redhat.com
Fri Jul 31 14:19:02 UTC 2020


On 7/31/20 9:13 AM, Peter Krempa wrote:
> When doing an external snapshot we migrate memory to a file as a form of
> taking the memory state. This creates a problem as qemu deactivates all
> active bitmaps after a successful migration. This means that calling
> 'query-named-block-nodes' will return an empty list of bitmaps for
> devices. We use the bitmap list to propagate the active bitmaps into the
> overlay files being created which is required for backups to work after
> a snapshot. Since we wouldn't propagate anythign a subsequent backup

anything

> will fail with:
> 
> invalid argument: missing or broken bitmap 'testchck' for disk 'vda'
> 
> To fix this, we can simply collect the bitmap list prior to the
> migration.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1862472
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> 
> Note that with current qemu the above steps will still fail as qemu
> fails to 'cont' after a migration if backing images contain bitmaps
> which is the case here.
> 
> See: https://lists.nongnu.org/archive/html/qemu-block/2020-07/msg01833.html

But that is on track to be fixed in 5.1-rc3, so that shouldn't be a 
show-stopper.

> 
>   src/qemu/qemu_driver.c | 17 +++++++++++------
>   1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 0ad6359102..b655df8c98 100644
> --- a/src/qemu/qemu_driver.c

Reviewed-by: Eric Blake <eblake at redhat.com>

I'll leave it up to you to decide if this is a mandatory fix during freeze.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list