On Tue, Dec 17, 2019 at 13:17:22 -0600, Eric Blake wrote:
On 12/17/19 12:35 PM, Peter Krempa wrote:
> Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
> ---
[...]
> +If the ``backing file format:`` field is missing above the
format was not
> +specified properly. The image can be fixed by the following command:
> +
> +::
> +
> + qemu-img rebase -f $IMAGE_FORMAT -F $BACKING_IMAGE_FORMAT -b $BACKING_IMAGE_PATH
$IMAGE_PATH
Adding -u can make this operation faster (blindly update the image metadata,
rather than actually crawling the entire image to perform a data operation
in the process). But I'm not sure whether we want to document that here.
I thought qemu would skip the data verification if the backing image is
not being changed. I'm not sure about the -u here though.
> +It is important to fill out ``$BACKING_IMAGE_FORMAT`` and
``$IMAGE_FORMAT``
> +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``.
> +
> +Missing images reported after after moving disk images into a different path
> +----------------------------------------------------------------------------
> +
> +The path to the backing image which is recorded in the image metadata often
> +contains a full path to the backing image. This is the default libvirt-created
> +image configuration. When such images are moved to a different location the
> +top image will no longer point to the correct image.
> +
> +To fix such issue you can either fully specify the image chain in the domain XML
> +as pointed out above or the following ``qemu-img`` command can be used:
> +
> +::
> +
> + qemu-img rebase -u -f $IMAGE_FORMAT -F $BACKING_IMAGE_FORMAT -b
$BACKING_IMAGE_PATH $IMAGE_PATH
> +
Odd to mention -u here but not above. Should we be consistent between the
two examples?
You must use it here since qemu-img will fail to locate the old backing
file as the example is fixing a image chain using absolute paths moved
to a different location.