diff options
| author | Denis V. Lunev <den@openvz.org> | 2026-05-21 01:59:52 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2026-06-08 17:00:46 +0200 |
| commit | 7e8cc6c886b7100ac4a7ff803562228fe3a6d4fd (patch) | |
| tree | b3687a42c597b1499dd6c7e96f5b9204ab6a5e65 /docs | |
| parent | aeea0c2804c42f24915467a1e4c70e649e39b8e0 (diff) | |
| download | qemu-7e8cc6c886b7100ac4a7ff803562228fe3a6d4fd.tar.gz qemu-7e8cc6c886b7100ac4a7ff803562228fe3a6d4fd.zip | |
qemu-img: add sub-command --remove-all to 'qemu-img bitmap'
From time to time it is needed to remove all bitmaps from the image.
Before this patch the process is not very convenient. One should
perform
qemu-img info
and parse the output to obtain all names. After that one should
sequentially call
qemu-img bitmap --remove
for each present bitmap.
The patch adds --remove-all sub-command to 'qemu-img bitmap'. The
new sub-command also composes with other bitmap actions in the same
invocation, so a common "wipe and recreate" workflow can be expressed
as
qemu-img bitmap --remove-all --add NEW FILE
instead of enumerating existing bitmaps, removing them one by one,
and only then adding the fresh one.
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-ID: <20260520235952.500250-1-den@openvz.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tools/qemu-img.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index 558b0eb84d..b0c798b77a 100644 --- a/docs/tools/qemu-img.rst +++ b/docs/tools/qemu-img.rst @@ -301,15 +301,19 @@ Command description: For write tests, by default a buffer filled with zeros is written. This can be overridden with a pattern byte specified by *PATTERN*. -.. option:: bitmap (--merge SOURCE | --add | --remove | --clear | --enable | --disable)... [-b SOURCE_FILE [-F SOURCE_FMT]] [-g GRANULARITY] [--object OBJECTDEF] [--image-opts | -f FMT] FILENAME BITMAP +.. option:: bitmap (--merge SOURCE | --add | --remove | --remove-all | --clear | --enable | --disable)... [-b SOURCE_FILE [-F SOURCE_FMT]] [-g GRANULARITY] [--object OBJECTDEF] [--image-opts | -f FMT] FILENAME [BITMAP] - Perform one or more modifications of the persistent bitmap *BITMAP* - in the disk image *FILENAME*. The various modifications are: + Perform one or more modifications of persistent bitmaps in the disk + image *FILENAME*. Most operations require *BITMAP* to be specified; + ``--remove-all`` operates on all bitmaps and does not take *BITMAP*. + The various modifications are: ``--add`` to create *BITMAP*, enabled to record future edits. ``--remove`` to remove *BITMAP*. + ``--remove-all`` to remove all bitmaps. + ``--clear`` to clear *BITMAP*. ``--enable`` to change *BITMAP* to start recording future edits. |
