[virt-tools-list] Re: libosinfo - another try

Daniel P. Berrange berrange at redhat.com
Thu Oct 22 19:06:39 UTC 2009


On Thu, Oct 22, 2009 at 02:59:26PM -0400, Arjun Roy wrote:
> On 10/22/2009 11:51 AM, Daniel P. Berrange wrote:
> > Version number comparisons are a really bad way to determine whether
> > functionality is available. RHEL-5 has 2.6.18 kernel, but has VirtIO
> > support which didn't appear until 2.6.20-something. 
> >
> > If we need to determine if a particular item is available, we should
> > have an explicit piece for metadata for it. eg to determine if virtio
> > block is supported we should be checking a 'supported block devices'
> > tag of some kind, rather comparing version numbers. Version numbers 
> > should be purely informative, not used for any functional purpose
> >
> An example Cole gave me was the following:
> 
> Suppose we have a distro that can use two drivers for sound. If we have a KVM
> hypervisor of version 1.2 and one of version 3.4, then the driver that must be
> used is different.
> 
> More specifically, we want to be able to say that for KVM versions < 2.1, we use
> ac97 and for versions 2.2 and up, we use intel_hda. And let's suppose the XML is
> expressing that.
> 
> So in that case, how do we handle it?

Each version of KVM needs to have a list of supported hardware - we can
very soon query this directly from KVM with 'qemu-kvm -device ?'.

Each distro has a sorted list of drivers, sorted by preference.

Then its just a matter of calculating the intersection of both lists.

We almost certainly need to extend libvirt to assist here, by making
it tell us the list of supported drivers. The alternative is for the
osinfo library to provide the metdata for hypervisors as well as distros
, eg

  <hypervisor rdf:about="http://qemu.org/qemu-kvm-0.11.0">
    <name>KVM</name>
    <version>0.11.0</version>
    <driver name="ac97" class="audio"/>
    <driver name="es1371" class="audio"/>
  </hyperversior>


  <distro rdf:about="http://fedoraproject.org/fedora-11">
    <name>KVM</name>
    <version>0.11.0</version>
    <driver name="es1371" class="audio"/>
    <driver name="sb16" class="audio"/>
  </hyperversior>

So the intersection of these, shows we can use  es1371  here.

Maybe do both - extend libvirt tell us, but also support <hypervisor>
metadata, so that it is possible to override what's reported by libvirt

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -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 :|




More information about the virt-tools-list mailing list