[PATCH] manpage: virsh: Note that 'virsh undefine --remove-all-storage' doesn't remove backing images

Peter Krempa posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1104e7524db16944c5fd522c37de58161d691243.1694086938.git.pkrempa@redhat.com
docs/manpages/virsh.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] manpage: virsh: Note that 'virsh undefine --remove-all-storage' doesn't remove backing images
Posted by Peter Krempa 1 year, 1 month ago
Removing a backing image could break other image chains as it's
theoretically possible to share backing chains.

As --storage/--remove-all-storage is fully implemented in virsh as a
helper option, which enumerates and deletes VM's volumes. We do not plan
to make it any more complicated.

Document that backing chains are not removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 docs/manpages/virsh.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 91e1d5de37..4ae3bb4d93 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -4614,12 +4614,13 @@ undefined; if not all of the requested volumes could be deleted, the
 error message indicates what still remains behind. If a volume path is not
 found in the domain definition, it's treated as if the volume was successfully
 deleted. Only volumes managed by libvirt in storage pools can be removed this
-way.
+way. Note that this also removes only the top level image of a backing chain,
+any backing stores of the image are kept as they may be shared.
 (See ``domblklist`` for list of target names associated to a domain).
 Example: --storage vda,/path/to/storage.img

 The *--remove-all-storage* flag specifies that all of the domain's storage
-volumes should be deleted.
+volumes should be deleted as if they were specified via *--storage*.

 The *--delete-storage-volume-snapshots* (previously *--delete-snapshots*)
 flag specifies that any snapshots associated with
-- 
2.41.0
Re: [PATCH] manpage: virsh: Note that 'virsh undefine --remove-all-storage' doesn't remove backing images
Posted by Ján Tomko 1 year, 1 month ago
On a Thursday in 2023, Peter Krempa wrote:
>Removing a backing image could break other image chains as it's
>theoretically possible to share backing chains.
>
>As --storage/--remove-all-storage is fully implemented in virsh as a
>helper option, which enumerates and deletes VM's volumes. We do not plan
>to make it any more complicated.
>
>Document that backing chains are not removed.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> docs/manpages/virsh.rst | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano