From nobody Wed Dec 17 00:16:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522324313587351.5316645738926; Thu, 29 Mar 2018 04:51:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0589D7D4F1; Thu, 29 Mar 2018 11:51:37 +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 CF1B85D77D; Thu, 29 Mar 2018 11:51:36 +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 95C1F4CAA7; Thu, 29 Mar 2018 11:51:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2TBpMxw016322 for ; Thu, 29 Mar 2018 07:51:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 56BE610B00A0; Thu, 29 Mar 2018 11:51:22 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id D501F1102E2B; Thu, 29 Mar 2018 11:51:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 13:51:05 +0200 Message-Id: <43ffb1379f7c28d89b77f7c2f16df08be2050b24.1522323985.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 08/14] qemu: domain: Forbid VIR_STORAGE_FILE_ISO as a disk format 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 29 Mar 2018 11:51:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This format is used by the storage driver and other hypervisors but qemu does not have nothion of the 'iso' format and libvirt does not translate it to anything useful, so it would not work anyways. Users should use 'raw' instead. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 7 +++++++ tests/qemuxml2argvdata/disk-drive-fmt-iso.xml | 27 +++++++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 35 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-drive-fmt-iso.xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 88b4653da5..e02da9e608 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4124,6 +4124,13 @@ qemuDomainValidateStorageSource(virStorageSourcePtr = src) return -1; } + if (src->format =3D=3D VIR_STORAGE_FILE_ISO) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("storage format 'iso' is not directly suppored by= qemu, " + "use 'raw' instead")); + return -1; + } + return 0; } diff --git a/tests/qemuxml2argvdata/disk-drive-fmt-iso.xml b/tests/qemuxml2= argvdata/disk-drive-fmt-iso.xml new file mode 100644 index 0000000000..ad2825bfb2 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-fmt-iso.xml @@ -0,0 +1,27 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + + /usr/bin/qemu-system-i686 + + + + +
+ + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 711bd1b661..3d278c4bc2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -914,6 +914,7 @@ mymain(void) QEMU_CAPS_DRIVE_BOOT); DO_TEST_PARSE_ERROR("disk-drive-fmt-cow", QEMU_CAPS_DRIVE_BOOT); DO_TEST_PARSE_ERROR("disk-drive-fmt-dir", QEMU_CAPS_DRIVE_BOOT); + DO_TEST_PARSE_ERROR("disk-drive-fmt-iso", QEMU_CAPS_DRIVE_BOOT); DO_TEST("disk-drive-shared", QEMU_CAPS_DRIVE_SERIAL); DO_TEST_PARSE_ERROR("disk-drive-shared-qcow", NONE); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list