]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
kbase: backing_chains: Add steps how to securely probe image format
authorPeter Krempa <pkrempa@redhat.com>
Thu, 27 Feb 2020 08:08:26 +0000 (09:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 27 Feb 2020 11:06:25 +0000 (12:06 +0100)
We document steps how to fix images if they are rejected for missing
the 'backing file format' field. Document also how to securely probe
the image format if it's unknown.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/kbase/backing_chains.rst

index 12ed6253acd1ee2ce6207cd54fefbccced071ce1..af848ccb1481c35098ba2f4b8113614daf43533d 100644 (file)
@@ -176,6 +176,21 @@ properly. ``$BACKING_IMAGE_PATH`` should be specified as a full absolute path.
 If relative referencing of the backing image is desired, the path must be
 relative to the location of image described by ``$IMAGE_PATH``.
 
+**Important:** If the ``$BACKING_IMAGE_FORMAT`` is not known it can be queried
+using ``qemu-img info $BACKING_IMAGE_PATH`` and looking for the ``file format:``
+field, but for security reasons should be used *only* if at least one of the
+following criteria is met:
+
+- ``file format`` is ``raw``
+- ``backing file`` is NOT present
+- ``backing file`` is present AND is correct/trusted
+
+Note that the last criteria may require manual inspection and thus should not
+be scripted unless the trust for the image can be expressed programatically.
+
+Also note that the above steps may need to be repeated recursively for any
+subsequent backing images.
+
 Missing images reported after after moving disk images into a different path
 ----------------------------------------------------------------------------