From nobody Mon Feb 9 06:48:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582637170; cv=none; d=zohomail.com; s=zohoarc; b=m/i0B3bJyPeWevi2gahlVWPdkADxv3VS/IU8VH0GLoA1rYZRqOSAAtCTxdUorhTaCrL3l/G2UOr/vmVaXXa8Y3+/ThmbKQVdkifapTqdalW752mQ7n1HRhFGxlpAr+UcDr7JN0U22SLnAx3cybY7GN3YrirWcHdH75fk72xbowA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582637170; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OvgaBdqiXWBxDnUPwVXzI//0INiXzTpPvW+Yj8kyMhM=; b=iyGNHOpFUls+JijfRFTDPJn/ALV5RsKHPmRrC4SIkL/i230ZEAxf3cBy+0/wJBJkdyWKhzaOowto87jel4JYp3xT0WmrplLKOHsgs/ZpmvnHBZkdd7VrsgIBhz6hKFP8lctBdyS3+260CYtrokvHS8CGGIcdi18ogT6YDEgazPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1582637170189289.4689297324809; Tue, 25 Feb 2020 05:26:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-w5o-u98LOjSTbSW4k0aihQ-1; Tue, 25 Feb 2020 08:26:06 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 20713801E7B; Tue, 25 Feb 2020 13:26:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7A818AC30; Tue, 25 Feb 2020 13:25:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9DF2A8B2CD; Tue, 25 Feb 2020 13:25:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01PDPqjw008839 for ; Tue, 25 Feb 2020 08:25:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0F0276031E; Tue, 25 Feb 2020 13:25:52 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 897308C06B for ; Tue, 25 Feb 2020 13:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582637169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OvgaBdqiXWBxDnUPwVXzI//0INiXzTpPvW+Yj8kyMhM=; b=gJ6LKhCLEgX/a/oEBUIVFY/UuJXf4efARmqA8DKBILRXjQkG0mkT/Tslt+07JjLt6KIxMP FuB0AJ0IjGg13zplu0US+gl9pW33l79crILCrdqWvrKVjKmjRDy7RfYb9qaBAMmMDEy5VY V6MkhLRdk5BKEpuq4uqD54ZPUKlPyuU= X-MC-Unique: w5o-u98LOjSTbSW4k0aihQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 3/3] kbase: backing_chains: Clarify some aspects of image probing Date: Tue, 25 Feb 2020 14:25:45 +0100 Message-Id: <961149572f84ab483534f6ca72744c2d11f176d5.1582635160.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/kbase/backing_chains.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/kbase/backing_chains.rst b/docs/kbase/backing_chains.rst index 3b3f0583e5..12ed6253ac 100644 --- a/docs/kbase/backing_chains.rst +++ b/docs/kbase/backing_chains.rst @@ -46,14 +46,17 @@ system used on the host so that the hypervisor can acce= ss the files and possibly also directly to configure the hypervisor to use the appropriate images. T= hus it's important to properly setup the formats and paths of the backing imag= es. +Any externally created image should always use the -F switch of ``qemu-img= `` +to specify the format of the backing file to avoid probing. + Image detection caveats ----------------------- Detection of the backing chain requires libvirt to read and understand the ``backing file`` field recorded in the image metadata and also being able = to recurse and read the backing file. Due to security implications libvirt -will not attempt to detect the format of the backing image if the image me= tadata -doesn't contain it. +will refuse to use backing images of any image whose format was not specif= ied +explicitly in the XML or the overlay image itself. Libvirt also might lack support for a network disk storage technology and = thus may be unable to visit and detect backing chains on such storage. This may @@ -104,6 +107,8 @@ Note that it's also possible to partially specify the c= hain in the XML but omit the terminating element. This will result into probing from the last speci= fied ```` +Any image specified explicitly will not be probed for backing file or form= at. + Manual image creation =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -113,6 +118,13 @@ them properly so that they work with libvirt as expect= ed. The created disk images must contain the format of the backing image in the metadata. This means that the **-F** parameter of ``qemu-img`` must always be used. +:: + + qemu-img -f qcow2 -F qcow2 -b /path/to/backing /path/to/overlay + +Note that if '/path/to/backing' is relative the path is considered relativ= e to +the location of '/path/to/overlay'. + Troubleshooting =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.24.1