From nobody Sat Apr 27 16:08:17 2024 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 1511344934347770.594033379584; Wed, 22 Nov 2017 02:02:14 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 36E22356FB; Wed, 22 Nov 2017 10:02:13 +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 08B6D63F84; Wed, 22 Nov 2017 10:02:13 +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 9740D3D3D3; Wed, 22 Nov 2017 10:02:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2Ahp005145 for ; Wed, 22 Nov 2017 05:02:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 439C15C542; Wed, 22 Nov 2017 10:02:10 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9543C5C543; Wed, 22 Nov 2017 10:02:09 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:33 +0100 Message-Id: <951caaac5d109783f984985a7652f8cc74fbad7b.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 1/9] qemu: command: Split out geometry frontend attribute formatting from -drive 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 22 Nov 2017 10:02:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Historically we've formatted a lot of the attributes of a disk (disk geometry, etc) with -drive. Since we use -device now, they should be formatted there. Extract them to a separate function for keeping compatibility with SDcards which still use only -drive. Start this by moving the geometry into a separate function. --- src/qemu/qemu_command.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 216a4bdfe0..31df61a944 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1623,6 +1623,26 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk, } +static void +qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk, + virBufferPtr buf) +{ + /* generate geometry command string */ + if (disk->geometry.cylinders > 0 && + disk->geometry.heads > 0 && + disk->geometry.sectors > 0) { + virBufferAsprintf(buf, ",cyls=3D%u,heads=3D%u,secs=3D%u", + disk->geometry.cylinders, + disk->geometry.heads, + disk->geometry.sectors); + + if (disk->geometry.trans !=3D VIR_DOMAIN_DISK_TRANS_DEFAULT) + virBufferAsprintf(buf, ",trans=3D%s", + virDomainDiskGeometryTransTypeToString(disk-= >geometry.trans)); + } +} + + char * qemuBuildDriveStr(virDomainDiskDefPtr disk, virQEMUDriverConfigPtr cfg, @@ -1630,8 +1650,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virQEMUCapsPtr qemuCaps) { virBuffer opt =3D VIR_BUFFER_INITIALIZER; - const char *trans =3D - virDomainDiskGeometryTransTypeToString(disk->geometry.trans); bool emitDeviceSyntax =3D qemuDiskBusNeedsDeviceArg(disk->bus); /* if we are using -device this will be checked elsewhere */ @@ -1685,19 +1703,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=3Don"); - /* generate geometry command string */ - if (disk->geometry.cylinders > 0 && - disk->geometry.heads > 0 && - disk->geometry.sectors > 0) { - - virBufferAsprintf(&opt, ",cyls=3D%u,heads=3D%u,secs=3D%u", - disk->geometry.cylinders, - disk->geometry.heads, - disk->geometry.sectors); - - if (disk->geometry.trans !=3D VIR_DOMAIN_DISK_TRANS_DEFAULT) - virBufferAsprintf(&opt, ",trans=3D%s", trans); - } + qemuBuildDiskFrontendAttributes(disk, &opt); if (disk->serial && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) { --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511344943086482.89101656279433; Wed, 22 Nov 2017 02:02:23 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6AB25C04B924; Wed, 22 Nov 2017 10:02:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41F1160BE0; Wed, 22 Nov 2017 10:02:21 +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 F19D01800BDE; Wed, 22 Nov 2017 10:02:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2BTG005155 for ; Wed, 22 Nov 2017 05:02:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7B0615C543; Wed, 22 Nov 2017 10:02:11 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 921D05C885; Wed, 22 Nov 2017 10:02:10 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:34 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 2/9] tests: qemuxml2xml: Run the 'disk-serial' test 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Nov 2017 10:02:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- .../qemuxml2xmlout-disk-serial.xml | 42 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml b/test= s/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml new file mode 100644 index 0000000000..14625a4164 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml @@ -0,0 +1,42 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + WD-WMAP9A966149 +
+ + + + + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567= 89-_ .+ +
+ + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 99d831c32a..d66cf155d4 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -712,6 +712,8 @@ mymain(void) DO_TEST("disk-drive-discard", NONE); DO_TEST("disk-drive-detect-zeroes", NONE); + DO_TEST("disk-serial", NONE); + DO_TEST("virtio-rng-random", NONE); DO_TEST("virtio-rng-egd", NONE); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511344946008794.4527325461409; Wed, 22 Nov 2017 02:02:26 -0800 (PST) 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 CB39A82100; Wed, 22 Nov 2017 10:02:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5E2061F31; Wed, 22 Nov 2017 10:02:24 +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 6A8B01800C87; Wed, 22 Nov 2017 10:02:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2CtU005160 for ; Wed, 22 Nov 2017 05:02:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 789CB5C543; Wed, 22 Nov 2017 10:02:12 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id C84F35C542; Wed, 22 Nov 2017 10:02:11 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:35 +0100 Message-Id: <7335823ef0fe58c04f1a3961799adfbffe31b24e.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 3/9] tests: qemuxml2argv: Test SD card with serial number 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.26]); Wed, 22 Nov 2017 10:02:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args | 1 + tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml | 5 +++++ tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args b/tests/q= emuxml2argvdata/qemuxml2argv-disk-serial.args index a44af97fb7..18acb4f7af 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args @@ -25,4 +25,5 @@ serial=3D\ \ WD-WMAP9A966149' \ -drive 'file=3D/dev/HostVG/AllSerialChars,format=3Draw,if=3Dnone,id=3Ddriv= e-ide0-0-2,\ serial=3DabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\= .+' \ -device ide-drive,bus=3Dide.0,unit=3D2,drive=3Ddrive-ide0-0-2,id=3Dide0-0-= 2 \ +-drive file=3D/some/file,format=3Draw,if=3Dsd,index=3D0,serial=3Dsdserial \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml b/tests/qe= muxml2argvdata/qemuxml2argv-disk-serial.xml index ccd78204bf..ea71f2c339 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml @@ -26,6 +26,11 @@ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567= 89-_ .+
+ + + + sdserial + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml b/test= s/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml index 14625a4164..5a26e549df 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml @@ -26,6 +26,11 @@ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567= 89-_ .+
+ + + + sdserial +
--=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511345189199799.9765203780258; Wed, 22 Nov 2017 02:06:29 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11DCB7CBA9; Wed, 22 Nov 2017 10:06:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7FFD5C8A4; Wed, 22 Nov 2017 10:06:26 +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 4B4251808870; Wed, 22 Nov 2017 10:06:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2Ddf005192 for ; Wed, 22 Nov 2017 05:02:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7572F5C885; Wed, 22 Nov 2017 10:02:13 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id C70285C542; Wed, 22 Nov 2017 10:02:12 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:36 +0100 Message-Id: <868cebb53cd80e34804fba4bc9452cdbf4ee642f.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 4/9] qemu: command: Move disk 'serial' into frontend parameter formatter 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 22 Nov 2017 10:06:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Disk serial is not a property of the image but of the disk frontend. Account for this appropriately. --- src/qemu/qemu_command.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 31df61a944..d286681691 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1625,6 +1625,7 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk, static void qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk, + virQEMUCapsPtr qemuCaps, virBufferPtr buf) { /* generate geometry command string */ @@ -1640,6 +1641,12 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr = disk, virBufferAsprintf(buf, ",trans=3D%s", virDomainDiskGeometryTransTypeToString(disk-= >geometry.trans)); } + + if (disk->serial && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) { + virBufferAddLit(buf, ",serial=3D"); + virBufferEscape(buf, '\\', " ", "%s", disk->serial); + } } @@ -1703,13 +1710,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=3Don"); - qemuBuildDiskFrontendAttributes(disk, &opt); - - if (disk->serial && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) { - virBufferAddLit(&opt, ",serial=3D"); - virBufferEscape(&opt, '\\', " ", "%s", disk->serial); - } + qemuBuildDiskFrontendAttributes(disk, qemuCaps, &opt); if (disk->cachemode) { virBufferAsprintf(&opt, ",cache=3D%s", --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511344949913698.7985139325024; Wed, 22 Nov 2017 02:02:29 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id C69BE49039; Wed, 22 Nov 2017 10:02:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4FBC12A75; Wed, 22 Nov 2017 10:02:27 +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 651DE180474E; Wed, 22 Nov 2017 10:02:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2EGi005323 for ; Wed, 22 Nov 2017 05:02:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id C045D5C885; Wed, 22 Nov 2017 10:02:14 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id C41195C542; Wed, 22 Nov 2017 10:02:13 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:37 +0100 Message-Id: <4c17dcc80f3be7401738eb0ff354e4fed631bf46.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 5/9] qemu: command: Move around order of generating -drive arguments 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 22 Nov 2017 10:02:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move together sections which are conditionaly executed depending on whether -device will be used together with the -drive. --- src/qemu/qemu_command.c | 28 ++++++++++++------= ---- .../qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 2 +- .../qemuxml2argv-boot-complex-bootindex.args | 2 +- .../qemuxml2argv-boot-complex.args | 2 +- ...xml2argv-boot-menu-disable-drive-bootindex.args | 2 +- .../qemuxml2argv-boot-menu-disable-drive.args | 2 +- .../qemuxml2argv-boot-menu-disable.args | 2 +- .../qemuxml2argv-boot-menu-enable-bootindex.args | 2 +- ...qemuxml2argv-boot-menu-enable-with-timeout.args | 2 +- .../qemuxml2argv-boot-menu-enable.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-boot-multi.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-boot-order.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-boot-strict.args | 2 +- .../qemuxml2argv-controller-order.args | 2 +- tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 4 ++-- .../qemuxml2argv-disk-cdrom-empty.args | 2 +- .../qemuxml2argv-disk-cdrom-network-ftp.args | 2 +- .../qemuxml2argv-disk-cdrom-network-ftps.args | 2 +- .../qemuxml2argv-disk-cdrom-network-http.args | 2 +- .../qemuxml2argv-disk-cdrom-network-https.args | 2 +- .../qemuxml2argv-disk-cdrom-network-tftp.args | 2 +- ...qemuxml2argv-disk-cdrom-tray-no-device-cap.args | 2 +- .../qemuxml2argv-disk-cdrom-tray.args | 4 ++-- .../qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 2 +- .../qemuxml2argv-disk-copy_on_read.args | 2 +- .../qemuxml2argv-disk-drive-boot-cdrom.args | 4 ++-- .../qemuxml2argv-disk-drive-boot-disk.args | 4 ++-- .../qemuxml2argv-disk-drive-cache-directsync.args | 4 ++-- .../qemuxml2argv-disk-drive-cache-unsafe.args | 4 ++-- .../qemuxml2argv-disk-drive-cache-v2-none.args | 4 ++-- .../qemuxml2argv-disk-drive-cache-v2-wb.args | 4 ++-- .../qemuxml2argv-disk-drive-cache-v2-wt.args | 4 ++-- .../qemuxml2argv-disk-drive-detect-zeroes.args | 2 +- .../qemuxml2argv-disk-drive-discard.args | 2 +- ...uxml2argv-disk-drive-error-policy-enospace.args | 4 ++-- .../qemuxml2argv-disk-drive-error-policy-stop.args | 4 ++-- ...gv-disk-drive-error-policy-wreport-rignore.args | 4 ++-- .../qemuxml2argv-disk-drive-fmt-qcow.args | 4 ++-- .../qemuxml2argv-disk-drive-no-boot.args | 4 ++-- .../qemuxml2argv-disk-drive-readonly-disk.args | 2 +- ...qemuxml2argv-disk-drive-readonly-no-device.args | 2 +- .../qemuxml2argv-disk-drive-shared.args | 4 ++-- .../qemuxml2argv-disk-ioeventfd.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-disk-order.args | 4 ++-- .../qemuxml2argv-disk-snapshot.args | 4 ++-- .../qemuxml2argv-disk-source-pool-mode.args | 12 +++++----- .../qemuxml2argv-disk-source-pool.args | 4 ++-- .../qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-hugepages-numa.args | 2 +- .../qemuxml2argv-pci-autoadd-addr.args | 4 ++-- .../qemuxml2argv-pci-autoadd-idx.args | 4 ++-- .../qemuxml2argv-pci-autofill-addr.args | 4 ++-- .../qemuxml2argvdata/qemuxml2argv-pci-bridge.args | 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-pci-many.args | 4 ++-- .../qemuxml2argv-user-aliases.args | 2 +- 57 files changed, 100 insertions(+), 98 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d286681691..b53faadc15 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1673,18 +1673,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virBufferAsprintf(&opt, "if=3D%s", virDomainDiskQEMUBusTypeToString(disk->bus)); - if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM) { - if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SCSI) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_CD)) - virBufferAddLit(&opt, ",media=3Dcdrom"); - } else if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_IDE) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_IDE_CD)) - virBufferAddLit(&opt, ",media=3Dcdrom"); - } else { - virBufferAddLit(&opt, ",media=3Dcdrom"); - } - } - if (emitDeviceSyntax) { char *drivealias =3D qemuAliasFromDisk(disk); if (!drivealias) @@ -1701,6 +1689,21 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, } virBufferAsprintf(&opt, ",index=3D%d", idx); } + + qemuBuildDiskFrontendAttributes(disk, qemuCaps, &opt); + + if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM) { + if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SCSI) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_CD)) + virBufferAddLit(&opt, ",media=3Dcdrom"); + } else if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_IDE) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_IDE_CD)) + virBufferAddLit(&opt, ",media=3Dcdrom"); + } else { + virBufferAddLit(&opt, ",media=3Dcdrom"); + } + } + if (bootable && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) && (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_DISK || @@ -1710,7 +1713,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=3Don"); - qemuBuildDiskFrontendAttributes(disk, qemuCaps, &opt); if (disk->cachemode) { virBufferAsprintf(&opt, ",cache=3D%s", diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args b/tests/qe= muxml2argvdata/qemuxml2argv-boot-cdrom.args index c0e8854213..9b5b612ed9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args @@ -19,6 +19,6 @@ server,nowait \ -no-acpi \ -boot d \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.arg= s b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args index a503781a15..639acbd7b8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.args @@ -28,7 +28,7 @@ id=3Dvirtio-disk1 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/hdb,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-1 \ -device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ --drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddr= ive-ide0-1-0,\ +-drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,m= edia=3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args b/tests/= qemuxml2argvdata/qemuxml2argv-boot-complex.args index 600d393501..b7a2fc119a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.args @@ -29,7 +29,7 @@ id=3Dvirtio-disk1 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/hdb,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-1 \ -device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ --drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddr= ive-ide0-1-0,\ +-drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,m= edia=3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -drive file=3D/dev/fd0,format=3Draw,if=3Dnone,id=3Ddrive-fdc0-0-0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bo= otindex.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-= bootindex.args index 9fe4e13a35..4825880413 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex= .args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex= .args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot menu=3Doff \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.args index 31b2e2033c..caccedfc3c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot order=3Dd,menu=3Doff \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.args b/t= ests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.args index 31b2e2033c..caccedfc3c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot order=3Dd,menu=3Doff \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-bootindex= .args b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-bootindex.args index 3b5fcd64fb..811dd58f1a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-bootindex.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-bootindex.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot menu=3Don \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-with-time= out.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-with-timeou= t.args index 7602991982..90e3b55eea 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-with-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-with-timeout.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot order=3Dd,menu=3Don,splash-time=3D3000 \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.args b/te= sts/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.args index 861cbac031..6d7b0b8d3b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot order=3Dd,menu=3Don \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.args b/tests/qe= muxml2argvdata/qemuxml2argv-boot-multi.args index 37cf3a2029..545105d509 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.args @@ -19,7 +19,7 @@ server,nowait \ -no-acpi \ -boot order=3Ddcna,menu=3Don \ -usb \ --drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-i= de0-1-0,\ +-drive file=3D/dev/cdrom,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args b/tests/qe= muxml2argvdata/qemuxml2argv-boot-order.args index 66eb4cdbaf..8c366f1ddf 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.args @@ -20,7 +20,7 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/root/boot.iso,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddri= ve-ide0-1-0,\ +-drive file=3D/root/boot.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,me= dia=3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-strict.args b/tests/q= emuxml2argvdata/qemuxml2argv-boot-strict.args index d9712f2d64..9aeb801993 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-strict.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-strict.args @@ -29,7 +29,7 @@ id=3Dvirtio-disk1 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/hdb,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-1 \ -device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ --drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddr= ive-ide0-1-0,\ +-drive file=3D/dev/HostVG/hdc,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,m= edia=3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args b/te= sts/qemuxml2argvdata/qemuxml2argv-controller-order.args index 60bdb37286..70a8ba9ce9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-controller-order.args @@ -26,7 +26,7 @@ aio=3Dnative \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/tmp/Fedora-17-x86_64-Live-Desktop.iso,format=3Draw,if=3Dnon= e,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-net-pci,vlan=3D0,id=3Dnet0,mac=3D52:54:00:4d:4b:19,bus=3Dpc= i.0,addr=3D0x3 \ -net user,vlan=3D0,name=3Dhostnet0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args b/tests/qemu= xml2argvdata/qemuxml2argv-disk-aio.args index 32c0b77b4f..67b1776ca9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args @@ -22,7 +22,7 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dnone,aio=3Dnative \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don,aio=3Dthreads \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don,aio=3Dthreads \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args b/te= sts/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args index 1550cc128e..b53d547497 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args @@ -21,5 +21,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive if=3Dnone,id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftp.arg= s b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftp.args index 1cb062db11..ab51b19768 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftp.args @@ -19,6 +19,6 @@ server,nowait \ -boot d \ -usb \ -drive file=3Dftp://host.name:21/url/path/file.iso,format=3Draw,if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.args index a6d2435f67..aed2331e7a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.args @@ -19,6 +19,6 @@ server,nowait \ -boot d \ -usb \ -drive file=3Dftps://host.name:990/url/path/file.iso,format=3Draw,if=3Dnon= e,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-http.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-http.args index edd632441e..2e20791095 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-http.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-http.args @@ -19,6 +19,6 @@ server,nowait \ -boot d \ -usb \ -drive file=3Dhttp://host.name:80/url/path/file.iso,format=3Draw,if=3Dnone= ,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.a= rgs b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.args index fbfd236102..9aae5bf4a4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.args @@ -19,6 +19,6 @@ server,nowait \ -boot d \ -usb \ -drive file=3Dhttps://host.name:443/url/path/file.iso,format=3Draw,if=3Dno= ne,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.args index f8843c4380..005c87c691 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.args @@ -19,6 +19,6 @@ server,nowait \ -boot d \ -usb \ -drive file=3Dtftp://host.name:69/url/path/file.iso,format=3Draw,if=3Dnone= ,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray-no-device-= cap.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray-no-device-ca= p.args index 7442147f60..be4269718a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray-no-device-cap.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray-no-device-cap.args @@ -21,6 +21,6 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive if=3Dnone,id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args b/tes= ts/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args index 0c7ca87429..5df5b847f1 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-tray.args @@ -24,8 +24,8 @@ id=3Ddrive-virtio-disk0 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ --drive if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-1-1,readonly=3Don \ +-drive if=3Dnone,id=3Ddrive-ide0-1-1,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D1,drive=3Ddrive-ide0-1-1,id=3Dide0-1-= 1 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args b/tests/qe= muxml2argvdata/qemuxml2argv-disk-cdrom.args index de46167a1f..583fddc94c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args @@ -21,6 +21,6 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/root/boot.iso,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddri= ve-ide0-1-0,\ +-drive file=3D/root/boot.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,me= dia=3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args b/t= ests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args index 1aead99440..8353a1573b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args @@ -25,7 +25,7 @@ id=3Ddrive-virtio-disk0,copy-on-read=3Don \ -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-vir= tio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-net-pci,tx=3Dbh,vlan=3D0,id=3Dnet0,mac=3D52:54:00:e5:48:58,= bus=3Dpci.0,\ addr=3D0x3 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args= b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args index cae8f0503e..64ef2a1777 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args @@ -21,6 +21,6 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args = b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args index 3294ce1ded..37eb9d5e5f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args @@ -21,6 +21,6 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsyn= c.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.ar= gs index 5f5b20b75c..0d557edd38 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Ddirectsync \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.args index a3c3e7f7f3..12a12eac99 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dunsafe \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.a= rgs b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.args index 8893289151..b1e29d16de 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.arg= s b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.args index 3657004b69..8189a11f83 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dwriteback \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.arg= s b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.args index 17e14113c2..01f39c7344 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dwritethrough \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.a= rgs b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.args index f4d81e167b..6b146fc76a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.args @@ -24,6 +24,6 @@ id=3Ddrive-virtio-disk0,discard=3Dunmap,detect-zeroes=3Du= nmap \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don,discard=3Dignore,detect-ze= roes=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don,discard=3Dignore,detect-ze= roes=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args b/= tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args index dfd6b010cf..6e614ac995 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.args @@ -24,6 +24,6 @@ id=3Ddrive-virtio-disk0,discard=3Dunmap \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don,discard=3Dignore \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don,discard=3Dignore \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-en= ospace.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-e= nospace.args index 8a0e03efd1..704a571dd3 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.= args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.= args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dnone,werror=3Denospc \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-st= op.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.= args index 169efc38e2..2e87d727fb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dnone,werror=3Dstop,rerror=3Dstop \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wr= eport-rignore.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-p= olicy-wreport-rignore.args index a11743f0c7..d3a9ec45eb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-r= ignore.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-r= ignore.args @@ -22,6 +22,6 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dnone,werror=3Dreport,rerror=3Dignore \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.args b= /tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.args index 4c65fa598e..00077bb168 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.args @@ -21,6 +21,6 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.args b/= tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.args index 5efae6dd87..1dc1010f24 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.args @@ -21,8 +21,8 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0,\ bootindex=3D2 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0,\ bootindex=3D1 \ -drive file=3D/dev/fd0,format=3Draw,if=3Dnone,id=3Ddrive-fdc0-0-0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.a= rgs b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args index a207e49f23..e4ceba1b1b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args @@ -22,7 +22,7 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/sr0,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-ide= 0-1-0,\ +-drive file=3D/dev/sr0,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media=3D= cdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-dev= ice.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-devic= e.args index a207e49f23..e4ceba1b1b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.args @@ -22,7 +22,7 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/sr0,format=3Draw,if=3Dnone,media=3Dcdrom,id=3Ddrive-ide= 0-1-0,\ +-drive file=3D/dev/sr0,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,media=3D= cdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args b/t= ests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args index 502157bf8c..e9c7bb9deb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args @@ -22,7 +22,7 @@ server,nowait \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ serial=3DXYZXYZXYZYXXYZYZYXYZY,cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args b/test= s/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args index a14fbd19b3..e752b38744 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args @@ -25,7 +25,7 @@ id=3Ddrive-virtio-disk0 \ -device virtio-blk-pci,ioeventfd=3Don,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,\ drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-net-pci,tx=3Dbh,ioeventfd=3Doff,vlan=3D0,id=3Dnet0,\ mac=3D52:54:00:e5:48:58,bus=3Dpci.0,addr=3D0x3 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args b/tests/qe= muxml2argvdata/qemuxml2argv-disk-order.args index 63dc49d51f..740d0182f7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.args @@ -21,8 +21,8 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -drive file=3D/tmp/data.img,format=3Draw,if=3Dnone,id=3Ddrive-virtio-disk0= \ -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.args b/tests= /qemuxml2argvdata/qemuxml2argv-disk-snapshot.args index cf70560e98..4106c9fcfa 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.args @@ -25,7 +25,7 @@ cache=3Dnone \ -drive file=3D/dev/HostVG/QEMUGuest3,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-2-0,\ cache=3Dnone \ -device ide-drive,bus=3Dide.2,unit=3D0,drive=3Ddrive-ide0-2-0,id=3Dide0-2-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args= b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args index 5b4e65e109..1fcfe8caba 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args @@ -20,15 +20,15 @@ server,nowait \ -no-acpi \ -boot c \ -usb \ --drive file=3D/some/block/device/unit:0:0:1,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-0-1,readonly=3Don \ +-drive file=3D/some/block/device/unit:0:0:1,if=3Dnone,id=3Ddrive-ide0-0-1,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ --drive file=3Discsi://iscsi.example.com:3260/demo-target/2,if=3Dnone,media= =3Dcdrom,\ -id=3Ddrive-ide0-0-2,readonly=3Don \ +-drive file=3Discsi://iscsi.example.com:3260/demo-target/2,if=3Dnone,\ +id=3Ddrive-ide0-0-2,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.0,unit=3D2,drive=3Ddrive-ide0-0-2,id=3Dide0-0-= 2 \ -drive file=3D/tmp/idedisk.img,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-3 \ -device ide-drive,bus=3Dide.0,unit=3D3,drive=3Ddrive-ide0-0-3,id=3Dide0-0-= 3 \ --drive file=3Discsi://iscsi.example.com:3260/demo-target/3,if=3Dnone,media= =3Dcdrom,\ -id=3Ddrive-ide0-0-4,readonly=3Don \ +-drive file=3Discsi://iscsi.example.com:3260/demo-target/3,if=3Dnone,\ +id=3Ddrive-ide0-0-4,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.0,unit=3D4,drive=3Ddrive-ide0-0-4,id=3Dide0-0-= 4 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args b/te= sts/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args index 99fba37304..101462f0d6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args @@ -20,10 +20,10 @@ server,nowait \ -no-acpi \ -boot c \ -usb \ --drive file=3D/some/block/device/cdrom,if=3Dnone,media=3Dcdrom,id=3Ddrive-= ide0-0-1,\ +-drive file=3D/some/block/device/cdrom,if=3Dnone,id=3Ddrive-ide0-0-1,media= =3Dcdrom,\ readonly=3Don \ -device ide-drive,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-= 1 \ --drive if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive if=3Dnone,id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -drive file=3D/tmp/idedisk.img,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-2 \ -device ide-drive,bus=3Dide.0,unit=3D2,drive=3Ddrive-ide0-0-2,id=3Dide0-0-= 2 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args b/tests/q= emuxml2argvdata/qemuxml2argv-disk-virtio.args index 47afebaf2e..273541b446 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args @@ -21,8 +21,8 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -drive file=3D/tmp/data.img,format=3Draw,if=3Dnone,id=3Ddrive-virtio-disk0= \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-virtio-disk0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args b/tests/qem= uxml2argvdata/qemuxml2argv-event_idx.args index 1c9f4f1152..ff7b0b6ea0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args @@ -25,7 +25,7 @@ id=3Ddrive-virtio-disk0 \ -device virtio-blk-pci,event_idx=3Don,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,\ drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device virtio-net-pci,event_idx=3Doff,vlan=3D0,id=3Dnet0,mac=3D52:54:00:e= 5:48:58,\ bus=3Dpci.0,addr=3D0x3 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.arg= s b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args index bb9d613959..06a1245763 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args @@ -25,7 +25,7 @@ id=3Ddrive-virtio-disk0 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -drive file=3D/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,format=3Draw,= if=3Dnone,\ -media=3Dcdrom,id=3Ddrive-ide0-1-0,readonly=3Don \ +id=3Ddrive-ide0-1-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device rtl8139,vlan=3D0,id=3Dnet0,mac=3D52:54:00:71:70:89,bus=3Dpci.0,add= r=3D0x7 \ -net tap,fd=3D3,vlan=3D0,name=3Dhostnet0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args b/test= s/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args index 067cea741e..8b7dae5cb0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-numa.args @@ -38,7 +38,7 @@ addr=3D0x6 \ id=3Ddrive-virtio-disk0 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x7,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ --drive if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-0-0,readonly=3Don \ +-drive if=3Dnone,id=3Ddrive-ide0-0-0,media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -chardev socket,id=3Dcharchannel0,\ path=3D/var/lib/libvirt/qemu/channel/target/fedora.org.qemu.guest_agent.0,= server,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.args b/te= sts/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.args index 0d3f25913d..b2395efe88 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.args @@ -25,8 +25,8 @@ server,nowait \ -device pci-bridge,chassis_nr=3D6,id=3Dpci.6,bus=3Dpci.0,addr=3D0x8 \ -device pci-bridge,chassis_nr=3D7,id=3Dpci.7,bus=3Dpci.0,addr=3D0x9 \ -usb \ --drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1= -0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -vga cirrus \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.7,addr=3D0x6 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.args b/tes= ts/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.args index 6b2f21bba0..d91720e9d7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.args @@ -26,8 +26,8 @@ server,nowait \ -device pci-bridge,chassis_nr=3D6,id=3Dpci.6,bus=3Dpci.0,addr=3D0x9 \ -device pci-bridge,chassis_nr=3D7,id=3Dpci.7,bus=3Dpci.0,addr=3D0xa \ -usb \ --drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1= -0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -vga cirrus \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.4,addr=3D0x6 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-autofill-addr.args b/t= ests/qemuxml2argvdata/qemuxml2argv-pci-autofill-addr.args index 236f348895..791d141ab6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-autofill-addr.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-autofill-addr.args @@ -19,8 +19,8 @@ server,nowait \ -no-acpi \ -boot c \ -usb \ --drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-virtio-disk0,readonly=3Don \ +-drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,id=3Ddrive-virtio= -disk0,\ +media=3Dcdrom,readonly=3Don \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 \ -vga cirrus \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.args b/tests/qe= muxml2argvdata/qemuxml2argv-pci-bridge.args index 616713d356..1d2a0428eb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.args @@ -19,8 +19,8 @@ server,nowait \ -device pci-bridge,chassis_nr=3D1,id=3Dpci.1,bus=3Dpci.0,addr=3D0x3 \ -device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.0,addr=3D0x4 \ -usb \ --drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1= -0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -device rtl8139,vlan=3D0,id=3Dnet0,mac=3D52:54:00:f1:95:51,bus=3Dpci.0,add= r=3D0x5 \ -net user,vlan=3D0,name=3Dhostnet0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args b/tests/qemu= xml2argvdata/qemuxml2argv-pci-many.args index 538f6fbd0e..458205540a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-many.args @@ -18,8 +18,8 @@ server,nowait \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ -boot c \ -usb \ --drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,media=3Dcdrom,\ -id=3Ddrive-ide0-1-0,readonly=3Don \ +-drive file=3D/var/iso/f18kde.iso,format=3Draw,if=3Dnone,id=3Ddrive-ide0-1= -0,\ +media=3Dcdrom,readonly=3Don \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-= 0 \ -drive file=3D/var/lib/libvirt/images/test.img,format=3Draw,if=3Dnone,\ id=3Ddrive-virtio-disk0 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args b/tests/= qemuxml2argvdata/qemuxml2argv-user-aliases.args index 1719c1bc88..4c9c951cef 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args @@ -43,7 +43,7 @@ id=3Ddrive-ua-myEncryptedDisk1 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x7,drive=3Ddrive-ua-myEncrypted= Disk1,\ id=3Dua-myEncryptedDisk1 \ -drive file=3D/home/zippy/tmp/install-amd64-minimal-20140619.iso,format=3D= raw,\ -if=3Dnone,media=3Dcdrom,id=3Ddrive-ua-WhatAnAwesomeCDROM,readonly=3Don,cac= he=3Dnone \ +if=3Dnone,id=3Ddrive-ua-WhatAnAwesomeCDROM,media=3Dcdrom,readonly=3Don,cac= he=3Dnone \ -device ide-drive,bus=3Dide.1,unit=3D0,drive=3Ddrive-ua-WhatAnAwesomeCDROM= ,\ id=3Dua-WhatAnAwesomeCDROM \ -device virtio-net-pci,vlan=3D0,id=3Dua-CheckoutThisNIC,mac=3D52:54:00:d6:= c0:0b,\ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511344942705211.0916834645734; Wed, 22 Nov 2017 02:02:22 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 5CF8BC04AC7C; Wed, 22 Nov 2017 10:02:21 +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 3819412A5A; Wed, 22 Nov 2017 10:02:21 +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 EE90E3D381; Wed, 22 Nov 2017 10:02:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2Fu2005352 for ; Wed, 22 Nov 2017 05:02:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id BBFB45C542; Wed, 22 Nov 2017 10:02:15 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A675C885; Wed, 22 Nov 2017 10:02:14 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:38 +0100 Message-Id: <42d836d9cfe1ec30397cd42ebe50b2c65c5ebb46.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 6/9] qemu: command: Refactor logic when formatting -drive 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Nov 2017 10:02:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move all logic depending on whether we are solely formatting -drive (no -device along with it) into one block. --- src/qemu/qemu_command.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b53faadc15..36b8f3cb7f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1657,26 +1657,16 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virQEMUCapsPtr qemuCaps) { virBuffer opt =3D VIR_BUFFER_INITIALIZER; - bool emitDeviceSyntax =3D qemuDiskBusNeedsDeviceArg(disk->bus); - - /* if we are using -device this will be checked elsewhere */ - if (!emitDeviceSyntax && - qemuCheckDiskConfig(disk, qemuCaps) < 0) - goto error; if (qemuBuildDriveSourceStr(disk, cfg, &opt, qemuCaps) < 0) goto error; - if (emitDeviceSyntax) - virBufferAddLit(&opt, "if=3Dnone"); - else - virBufferAsprintf(&opt, "if=3D%s", - virDomainDiskQEMUBusTypeToString(disk->bus)); - - if (emitDeviceSyntax) { + if (qemuDiskBusNeedsDeviceArg(disk->bus)) { char *drivealias =3D qemuAliasFromDisk(disk); if (!drivealias) goto error; + + virBufferAddLit(&opt, "if=3Dnone"); virBufferAsprintf(&opt, ",id=3D%s", drivealias); VIR_FREE(drivealias); } else { @@ -1687,6 +1677,13 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, _("unsupported disk type '%s'"), disk->dst); goto error; } + + /* if we are using -device this will be checked elsewhere */ + if (qemuCheckDiskConfig(disk, qemuCaps) < 0) + goto error; + + virBufferAsprintf(&opt, "if=3D%s", + virDomainDiskQEMUBusTypeToString(disk->bus)); virBufferAsprintf(&opt, ",index=3D%d", idx); } --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511344946304270.9257276302101; Wed, 22 Nov 2017 02:02:26 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 8C1AFC047B97; Wed, 22 Nov 2017 10:02:24 +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 585BA17C2D; Wed, 22 Nov 2017 10:02:24 +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 1131D3D384; Wed, 22 Nov 2017 10:02:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2GXf005503 for ; Wed, 22 Nov 2017 05:02:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id E6B1C1725C; Wed, 22 Nov 2017 10:02:16 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1614C5C543; Wed, 22 Nov 2017 10:02:15 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:39 +0100 Message-Id: <598b0684f61bd55d269026b8d9af6509318fda8b.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 7/9] qemu: command: Move disk trhottling argument building into a separate function 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Nov 2017 10:02:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Isolate it from the other code. --- src/qemu/qemu_command.c | 75 +++++++++++++++++++++++++++------------------= ---- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 36b8f3cb7f..92e3407632 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1623,6 +1623,46 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk, } +static void +qemuBuildDiskThrottling(virDomainDiskDefPtr disk, + virBufferPtr buf) +{ +#define IOTUNE_ADD(_field, _label) \ + if (disk->blkdeviotune._field) { \ + virBufferAsprintf(buf, ",throttling." _label "=3D%llu", \ + disk->blkdeviotune._field); \ + } + + IOTUNE_ADD(total_bytes_sec, "bps-total"); + IOTUNE_ADD(read_bytes_sec, "bps-read"); + IOTUNE_ADD(write_bytes_sec, "bps-write"); + IOTUNE_ADD(total_iops_sec, "iops-total"); + IOTUNE_ADD(read_iops_sec, "iops-read"); + IOTUNE_ADD(write_iops_sec, "iops-write"); + + IOTUNE_ADD(total_bytes_sec_max, "bps-total-max"); + IOTUNE_ADD(read_bytes_sec_max, "bps-read-max"); + IOTUNE_ADD(write_bytes_sec_max, "bps-write-max"); + IOTUNE_ADD(total_iops_sec_max, "iops-total-max"); + IOTUNE_ADD(read_iops_sec_max, "iops-read-max"); + IOTUNE_ADD(write_iops_sec_max, "iops-write-max"); + + IOTUNE_ADD(size_iops_sec, "iops-size"); + if (disk->blkdeviotune.group_name) { + virBufferEscapeString(buf, ",throttling.group=3D%s", + disk->blkdeviotune.group_name); + } + + IOTUNE_ADD(total_bytes_sec_max_length, "bps-total-max-length"); + IOTUNE_ADD(read_bytes_sec_max_length, "bps-read-max-length"); + IOTUNE_ADD(write_bytes_sec_max_length, "bps-write-max-length"); + IOTUNE_ADD(total_iops_sec_max_length, "iops-total-max-length"); + IOTUNE_ADD(read_iops_sec_max_length, "iops-read-max-length"); + IOTUNE_ADD(write_iops_sec_max_length, "iops-write-max-length"); +#undef IOTUNE_ADD +} + + static void qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk, virQEMUCapsPtr qemuCaps, @@ -1776,40 +1816,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virDomainDiskIoTypeToString(disk->iomode)); } -#define IOTUNE_ADD(_field, _label) \ - if (disk->blkdeviotune._field) { \ - virBufferAsprintf(&opt, ",throttling." _label "=3D%llu", \ - disk->blkdeviotune._field); \ - } - - IOTUNE_ADD(total_bytes_sec, "bps-total"); - IOTUNE_ADD(read_bytes_sec, "bps-read"); - IOTUNE_ADD(write_bytes_sec, "bps-write"); - IOTUNE_ADD(total_iops_sec, "iops-total"); - IOTUNE_ADD(read_iops_sec, "iops-read"); - IOTUNE_ADD(write_iops_sec, "iops-write"); - - IOTUNE_ADD(total_bytes_sec_max, "bps-total-max"); - IOTUNE_ADD(read_bytes_sec_max, "bps-read-max"); - IOTUNE_ADD(write_bytes_sec_max, "bps-write-max"); - IOTUNE_ADD(total_iops_sec_max, "iops-total-max"); - IOTUNE_ADD(read_iops_sec_max, "iops-read-max"); - IOTUNE_ADD(write_iops_sec_max, "iops-write-max"); - - IOTUNE_ADD(size_iops_sec, "iops-size"); - if (disk->blkdeviotune.group_name) { - virBufferEscapeString(&opt, ",throttling.group=3D%s", - disk->blkdeviotune.group_name); - } - - IOTUNE_ADD(total_bytes_sec_max_length, "bps-total-max-length"); - IOTUNE_ADD(read_bytes_sec_max_length, "bps-read-max-length"); - IOTUNE_ADD(write_bytes_sec_max_length, "bps-write-max-length"); - IOTUNE_ADD(total_iops_sec_max_length, "iops-total-max-length"); - IOTUNE_ADD(read_iops_sec_max_length, "iops-read-max-length"); - IOTUNE_ADD(write_iops_sec_max_length, "iops-write-max-length"); - -#undef IOTUNE_ADD + qemuBuildDiskThrottling(disk, &opt); if (virBufferCheckError(&opt) < 0) goto error; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 151134495048141.92054609196725; Wed, 22 Nov 2017 02:02:30 -0800 (PST) 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 564B77EAA8; Wed, 22 Nov 2017 10:02:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32EAF61F31; Wed, 22 Nov 2017 10:02:28 +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 EB978180474D; Wed, 22 Nov 2017 10:02:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2L5b005543 for ; Wed, 22 Nov 2017 05:02:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 57DA05C8A4; Wed, 22 Nov 2017 10:02:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id D69335C543; Wed, 22 Nov 2017 10:02:17 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:40 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 8/9] qemu: command: Move formatting of disk io error policy from -drive 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]); Wed, 22 Nov 2017 10:02:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" That's a disk frontend attribute. Move the code to a separate function since it's non-trivial and call it from the frontend attribute formatter. --- src/qemu/qemu_command.c | 62 +++++++++++++-----= ---- ...uxml2argv-disk-drive-error-policy-enospace.args | 2 +- .../qemuxml2argv-disk-drive-error-policy-stop.args | 2 +- ...gv-disk-drive-error-policy-wreport-rignore.args | 2 +- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 92e3407632..ca4934b75c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1663,6 +1663,41 @@ qemuBuildDiskThrottling(virDomainDiskDefPtr disk, } +static void +qemuBuildDiskFrontendAttributeErrorPolicy(virDomainDiskDefPtr disk, + virQEMUCapsPtr qemuCaps, + virBufferPtr buf) +{ + const char *wpolicy =3D NULL; + const char *rpolicy =3D NULL; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON)) + return; + + if (disk->error_policy) + wpolicy =3D virDomainDiskErrorPolicyTypeToString(disk->error_polic= y); + + if (disk->rerror_policy) + rpolicy =3D virDomainDiskErrorPolicyTypeToString(disk->rerror_poli= cy); + + if (disk->error_policy =3D=3D VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE) { + /* in the case of enospace, the option is spelled + * differently in qemu, and it's only valid for werror, + * not for rerror, so leave rerror NULL. + */ + wpolicy =3D "enospc"; + } else if (!rpolicy) { + /* for other policies, rpolicy can match wpolicy */ + rpolicy =3D wpolicy; + } + + if (wpolicy) + virBufferAsprintf(buf, ",werror=3D%s", wpolicy); + if (rpolicy) + virBufferAsprintf(buf, ",rerror=3D%s", rpolicy); +} + + static void qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk, virQEMUCapsPtr qemuCaps, @@ -1687,6 +1722,8 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr d= isk, virBufferAddLit(buf, ",serial=3D"); virBufferEscape(buf, '\\', " ", "%s", disk->serial); } + + qemuBuildDiskFrontendAttributeErrorPolicy(disk, qemuCaps, buf); } @@ -1786,31 +1823,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virDomainDiskDetectZeroesTypeToString(detect_zer= oes)); } - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON)) { - const char *wpolicy =3D NULL, *rpolicy =3D NULL; - - if (disk->error_policy) - wpolicy =3D virDomainDiskErrorPolicyTypeToString(disk->error_p= olicy); - if (disk->rerror_policy) - rpolicy =3D virDomainDiskErrorPolicyTypeToString(disk->rerror_= policy); - - if (disk->error_policy =3D=3D VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPAC= E) { - /* in the case of enospace, the option is spelled - * differently in qemu, and it's only valid for werror, - * not for rerror, so leave rerror NULL. - */ - wpolicy =3D "enospc"; - } else if (!rpolicy) { - /* for other policies, rpolicy can match wpolicy */ - rpolicy =3D wpolicy; - } - - if (wpolicy) - virBufferAsprintf(&opt, ",werror=3D%s", wpolicy); - if (rpolicy) - virBufferAsprintf(&opt, ",rerror=3D%s", rpolicy); - } - if (disk->iomode) { virBufferAsprintf(&opt, ",aio=3D%s", virDomainDiskIoTypeToString(disk->iomode)); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-en= ospace.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-e= nospace.args index 704a571dd3..b019e44a24 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.= args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.= args @@ -20,7 +20,7 @@ server,nowait \ -boot c \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -cache=3Dnone,werror=3Denospc \ +werror=3Denospc,cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ media=3Dcdrom,readonly=3Don \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-st= op.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.= args index 2e87d727fb..3bca32ac28 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.args @@ -20,7 +20,7 @@ server,nowait \ -boot c \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -cache=3Dnone,werror=3Dstop,rerror=3Dstop \ +werror=3Dstop,rerror=3Dstop,cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ media=3Dcdrom,readonly=3Don \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wr= eport-rignore.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-p= olicy-wreport-rignore.args index d3a9ec45eb..86d214fe7d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-r= ignore.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-r= ignore.args @@ -20,7 +20,7 @@ server,nowait \ -boot c \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ -cache=3Dnone,werror=3Dreport,rerror=3Dignore \ +werror=3Dreport,rerror=3Dignore,cache=3Dnone \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-1-0,\ media=3Dcdrom,readonly=3Don \ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 16:08:17 2024 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 1511345192427362.24349314741016; Wed, 22 Nov 2017 02:06:32 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56DF13A251; Wed, 22 Nov 2017 10:06:31 +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 3023A17CCC; Wed, 22 Nov 2017 10:06:31 +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 EF9D43D381; Wed, 22 Nov 2017 10:06:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMA2QMu005553 for ; Wed, 22 Nov 2017 05:02:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 194E95C885; Wed, 22 Nov 2017 10:02:26 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 898261725E; Wed, 22 Nov 2017 10:02:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 11:01:41 +0100 Message-Id: <065c81a9bc128711e2e14f80d34b2b2825ea2161.1511344783.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 9/9] qemu: command: Anotate formatting of the frontend attributes with -drive 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 22 Nov 2017 10:06:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Explain that certain attributes formatted with -drive are in fact attributes of the drive itself and not the storage backing it. --- src/qemu/qemu_command.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ca4934b75c..26d395d67c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1764,8 +1764,13 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, virBufferAsprintf(&opt, ",index=3D%d", idx); } + /* Format attributes for the drive itself (not the storage backing it)= which + * we've formatted historically with -drive */ qemuBuildDiskFrontendAttributes(disk, qemuCaps, &opt); + /* While this is a frontend attribute, it only makes sense to be used = when + * legacy -drive is used. In modern qemu the 'ide-cd' or 'scsi-cd' are= used. + * virtio and other just ignore the attribute anyways */ if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM) { if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SCSI) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_CD)) @@ -1778,12 +1783,15 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, } } + /* This is a frontend attribute which was replaced by bootindex passed= in + * with -device arguments. */ if (bootable && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) && (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_DISK || disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_LUN) && disk->bus !=3D VIR_DOMAIN_DISK_BUS_IDE) virBufferAddLit(&opt, ",boot=3Don"); + if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=3Don"); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list