From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JwHcT-0007R4-77 for qemu-devel@nongnu.org; Wed, 14 May 2008 10:06:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JwHcR-0007Qp-NF for qemu-devel@nongnu.org; Wed, 14 May 2008 10:06:12 -0400 Received: from [199.232.76.173] (port=37293 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JwHcR-0007Ql-Bf for qemu-devel@nongnu.org; Wed, 14 May 2008 10:06:11 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:57769) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JwHcR-0004k0-0t for qemu-devel@nongnu.org; Wed, 14 May 2008 10:06:11 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m4EE69aI026620 for ; Wed, 14 May 2008 10:06:09 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4EE63lk120598 for ; Wed, 14 May 2008 10:06:03 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4EE626l031304 for ; Wed, 14 May 2008 10:06:02 -0400 Message-ID: <482AF1C9.40409@us.ibm.com> Date: Wed, 14 May 2008 09:06:01 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file References: <1210713545-11916-1-git-send-email-aliguori@us.ibm.com> <482A1F1C.2020902@codemonkey.ws> <482AA268.9080501@bellard.org> <482ABF6E.6090100@qumranet.com> <482ADA80.3000309@bellard.org> In-Reply-To: <482ADA80.3000309@bellard.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabrice Bellard Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org, Paul Brook Fabrice Bellard wrote: > Avi Kivity wrote: >> Fabrice Bellard wrote: >>> >>> I prefer: >>> >>> drive.file=foo.img >>> drive.if=scsi >>> >> >> That doesn't support multiple drives very well. > > Right, I realized it afterwards ! > > I suggested it because my original plan for the configuration file was > based on this syntax with a strong inspiration from the OpenFirmware > device tree. The idea was that the object name ("drive" here) had no > hardcoded meaning, except for some predefined object names in order to > keep a kind of backward compatibility with the current QEMU options. > In order to create a new drive for example, you just have to do: > > mydrive.class=drive > mydrive.if=scsi > mydrive.file=abc.img > > the "class" field is used to select the device model. Then all the > other parameters are used to initialize the device model. That way it > is possible to keep the compatibility with the existing options and > add a provision to instanciate arbitrary new device models, such as: I like this syntax primarily because it provides a means to associate arbitrary data with a VM. It also provides a sane way to keep track of which device is which so that the "config" can be updated while the VM is running. I'll update the patch. Regards, Anthony Liguori > mynetworkcard.class="ne2000pci" > mynetworkcard.bus=1 # pci bus selection > mynetworkcard.macaddr=00:01:02:03:04:05 > mynetworkcard.vlan=1 > > I will strongly support configuration file formats having this property. > > Regards, > > Fabrice. >