qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration


From: Daniel P. Berrange
Subject: Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file
Date: Wed, 14 May 2008 14:31:58 +0100
User-agent: Mutt/1.4.1i

On Wed, May 14, 2008 at 02:26:40PM +0200, 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

With this kind of syntax, now tools generating config files need to make
up unique names for each drive. So you'll probably end up with them just
naming things based on the class name + a number appended.

   drive0.class=drive
   drive0.if=scsi
   drive0.file=foo.img

   drive1.class=drive
   drive1.if=scsi
   drive1.file=bar.img

   drive2.class=drive
   ...

Which suggests it'd be better to take your original previous syntax example
and using an explicit numeric component to represent lists of drives, eg

   drive.0.file=foo.img
   drive.0.if=scsi

   drive.1.file=bar.img
   drive.1.if=scsi

   drive.2.file=wiz.img
   drive.2.if=scsi

Thus avoiding the need for adding the 'class' setting at all

Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]