On Wed, Mar 05, 2025 at 03:36:35PM +0530, prashant patil wrote:
> I was trying to read the bitmap of the running vm's disk. When I followed
> below mentioned commands, then I was able to read the bitmap properly.
> block-dirty-bitmap-add, block-dirty-bitmap-disable, nbd-server-start,
> nbd-server-add,

Up to here, everything you've done is indeed the ideal way to get at
the contents of a bitmap from a live qemu process over an NBD connection.

> qemu-img
> map with x-dirty-bitmap image-opts.

Here, this works, but feels like a hack, because it is relying on the
x-dirty-bitmap feature of qemu.  The libnbd project ships with an
application 'nbdinfo --map' that can read the same information as
'qemu-img map' but with a much nicer layout.  It's not going to
necessarily be faster, but because it is a fully-supported feature of
libnbd rather than a hack in qemu, it may prove more stable in the
long run, and certainly easier to understand.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to