|
|
d76c62 |
From 2256db09e8b86b58be3c86b1575d64d7a9f5d05c Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <2256db09e8b86b58be3c86b1575d64d7a9f5d05c@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Fri, 28 Feb 2020 10:24:44 +0100
|
|
|
d76c62 |
Subject: [PATCH] kbase: backing_chains: Clarify some aspects of image probing
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit d552b93448e253552c7e53a1240132c9763d2b24)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1798148
|
|
|
d76c62 |
Message-Id: <b44052c081a18bec62762ab2a7358abd0e914a3a.1582881363.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
docs/kbase/backing_chains.rst | 16 ++++++++++++++--
|
|
|
d76c62 |
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/docs/kbase/backing_chains.rst b/docs/kbase/backing_chains.rst
|
|
|
d76c62 |
index 3b3f0583e5..12ed6253ac 100644
|
|
|
d76c62 |
--- a/docs/kbase/backing_chains.rst
|
|
|
d76c62 |
+++ b/docs/kbase/backing_chains.rst
|
|
|
d76c62 |
@@ -46,14 +46,17 @@ system used on the host so that the hypervisor can access the files and possibly
|
|
|
d76c62 |
also directly to configure the hypervisor to use the appropriate images. Thus
|
|
|
d76c62 |
it's important to properly setup the formats and paths of the backing images.
|
|
|
d76c62 |
|
|
|
d76c62 |
+Any externally created image should always use the -F switch of ``qemu-img``
|
|
|
d76c62 |
+to specify the format of the backing file to avoid probing.
|
|
|
d76c62 |
+
|
|
|
d76c62 |
Image detection caveats
|
|
|
d76c62 |
-----------------------
|
|
|
d76c62 |
|
|
|
d76c62 |
Detection of the backing chain requires libvirt to read and understand the
|
|
|
d76c62 |
``backing file`` field recorded in the image metadata and also being able to
|
|
|
d76c62 |
recurse and read the backing file. Due to security implications libvirt
|
|
|
d76c62 |
-will not attempt to detect the format of the backing image if the image metadata
|
|
|
d76c62 |
-doesn't contain it.
|
|
|
d76c62 |
+will refuse to use backing images of any image whose format was not specified
|
|
|
d76c62 |
+explicitly in the XML or the overlay image itself.
|
|
|
d76c62 |
|
|
|
d76c62 |
Libvirt also might lack support for a network disk storage technology and thus
|
|
|
d76c62 |
may be unable to visit and detect backing chains on such storage. This may
|
|
|
d76c62 |
@@ -104,6 +107,8 @@ Note that it's also possible to partially specify the chain in the XML but omit
|
|
|
d76c62 |
the terminating element. This will result into probing from the last specified
|
|
|
d76c62 |
``<backingStore>``
|
|
|
d76c62 |
|
|
|
d76c62 |
+Any image specified explicitly will not be probed for backing file or format.
|
|
|
d76c62 |
+
|
|
|
d76c62 |
|
|
|
d76c62 |
Manual image creation
|
|
|
d76c62 |
=====================
|
|
|
d76c62 |
@@ -113,6 +118,13 @@ them properly so that they work with libvirt as expected. The created disk
|
|
|
d76c62 |
images must contain the format of the backing image in the metadata. This
|
|
|
d76c62 |
means that the **-F** parameter of ``qemu-img`` must always be used.
|
|
|
d76c62 |
|
|
|
d76c62 |
+::
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+ qemu-img -f qcow2 -F qcow2 -b /path/to/backing /path/to/overlay
|
|
|
d76c62 |
+
|
|
|
d76c62 |
+Note that if '/path/to/backing' is relative the path is considered relative to
|
|
|
d76c62 |
+the location of '/path/to/overlay'.
|
|
|
d76c62 |
+
|
|
|
d76c62 |
Troubleshooting
|
|
|
d76c62 |
===============
|
|
|
d76c62 |
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|