Re: [PATCH] Add --list-os-options to virt-install and virt-convert

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

 



On Mon, Mar 02, 2009 at 07:57:38PM -0500, John Levon wrote:
> On Mon, Mar 02, 2009 at 07:24:41PM -0500, Cole Robinson wrote:
> 
> > Do you think it should be in all relevant man pages (virt-convert,
> > virt-image, virt-install) or just have the other two link back to
> > virt-install?
> 
> Just the one please :)
> 
> Any thought been given to moving all of osdict into a system-installed
> XML file? The parameters of how different operating systems behave are
> only going to get more complex. Note that OVF will need a similar (in
> fact, most likely more complex) database for the virtual platforms.

Absolutely, this is the long term approach we want to take for a number
of reasons. There's quite a few things I don't like about how we are
currently handling it

 - It is not possible for local admins to change / extend it, eg to
   add new OS distribution release. It is guarenteed to be out of date
   almost as soon as each new virtinst release ships, due to frequency
   of new OS distros. This is particularly bad for RHEL with its 6 month
   cycle between update releases

 - It is tied into virt-install & apps based on it. This makes it hard
   to use from Cobbler, oVirt,  VMWare, or any other virt provisioning
   tool that's not using virt-install python APIs

 - It does not include enough information. Type + variant are not really
   sufficient. RHEL-5 has updates where new capabilities appear like
   virt IO. We really need at least a 4 level grouping for some OS, eg
   family (Red Hat), distro (RHEL), release (RHEL5), update (RHEL-5.3).

 - It ignores the installation URL information. When doing net installs
   user has to specify URL to download.fedora.redhat.com and virtinstall
   has the fragile probing to validate this. The OS metadata could easily
   include the mirror URLs for any free distro


Todo a better job there's several things I want todo with this:

 - An XML schema for defining all the information wrt to guest OS distros
   that is relevant to virt management tools.

 - A C library for querying the information in the XML file(s).

 - Bindings of the C library into Python/Ruby etc as needed

 - Ability for local admins to extend / override the information either
   by editing the XML files directly, or a pretty GUI


The XML schema is the really important thing, but I think it'd be very
important to have a API around it and not expect apps to read the XML
directly. This is because to get sufficient flexibility without huge
amounts of duplication, I think we'll need to try and keep the XML doc
highly normalized, and not just a plain tree - think more of a structure
like RDF where there are many tree's cross-referencing each other.

I'm attaching an example XML doc I knocked up a few months ago, but I'm
not really happy with it as is. In particular I think rather than trying
todo a explicit 4 level (family, disto, release, update) hierarchy, it
should just be doing an arbitrary generic nested structure, without
imposing specific terminology on each level - there's just too much 
difference between the OS out there.

The representation of supported drivers isn't all that great either - albeit
better than current way. I was trying to keep two lists - sets of configs
inheriting from each other, and refernce them from OS distros. This doesn't
capture the full horror of the combinations in the real world though. I
feel it might be better to try and maintain an explicit list of emulated
devices per (hypervisor, release), and an explicit list of supported 
device drivers per (os distro, release), then compute the intersection.

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 :|
Operating system distributions form a 2-4 level hierarchy depending on
needs

 - osinfo

   Top level tag for entire database of information

 - family

   Group of related distributions, typically originating from a single vendor,
   but also includin derived / rebuild distros. eg, Red Hat includes Fedora,
   RHEL, and CentOS

 - distro

   A particular distribution within a family, eg RHEL, Fedora, CentOS

 - release

   Optional. A major release of a distribution, eg Fedora 7, 8, 9

 - update

   Optional. A minor update release of a distribution, eg RHEL 5.1, 5.2, 5.3



Platform hardware information

 - platforms

   Grouping of a set of supported platforms. Can occur at any level of
   family, distro, release or update. If omitted, information is taken
   from parent level.

 - arch

   A single supported CPU architecture. Ocurrs within platforms.
   eg i386, x86_64, ppc, ia64

 - virt

   A machine ABI supported by an architecture. Occurs within arch.
   eg xen, hvm, uml

 - config

   Name of a configuration describing recommended default hardware
   choices for disk, network, input devices. eg virtio vs IDE,
   USB tablet vs PS2 mouse. 1 or more instances within virt tag.


Installation media

 - media

   The installation media choices. Assumes all OS have CD/DVD/ISO
   media options.

 - site

   A single network install site. Can refer to a install tree,
   package repository, or package repository mirror list.


Global device configuration information sets

 - devices

   The set of global device configurations

 - config

   A named configuration set

 - inherit

   Other configuration set to derive information from.

 - interface

   Information on network config, typically bus name.

 - disk

   Information on disk config, typically bus name and
   device prefix

 - input

   Information on input device config, typically bus
   name and device type

<osinfo>
  <family id='redhat'>
    <name>Red Hat</name>

    <distro id='fedora'>
      <name>Fedora</name>

      <release id='8'>
	<name>Fedora 8</name>
	<media>
	  <site type='install' url='http://download.fedoraproject.org/pub/fedora/linux/releases/$RELEASE/Fedora/$ARCH/os/'/>
	  <site type='mirrorlist' url='http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$RELEASE&arch=$ARCH'/>
	  <site type='repository' url='http://download.fedoraproject.org/pub/fedora/linux/releases/$RELEASE/Everything/$ARCH/os/'/>
	</media>

	<platforms>
	  <arch type='x86_64'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='i386'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='ppc'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	  </arch>
	</platform>
      </release>


      <release id='9'>
	<name>Fedora 9</name>
	<media>
	  <site type='install' url='http://download.fedoraproject.org/pub/fedora/linux/releases/$RELEASE/Fedora/$ARCH/os/'/>
	  <site type='mirrorlist' url='http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$RELEASE&arch=$ARCH'/>
	  <site type='repository' url='http://download.fedoraproject.org/pub/fedora/linux/releases/$RELEASE/Everything/$ARCH/os/'/>
	</media>

	<platforms>
	  <arch type='x86_64'>
	    <virt type='hvm'>
	      <config name='virtio'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='i386'>
	    <virt type='hvm'>
	      <config name='virtio'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='ppc'>
	    <virt type='hvm'>
	      <config name='virtio'/>
	    </virt>
	  </arch>
	</platform>
      </release>

    </distro>

    <distro id='rhel'>
      <name>Red Hat Enterprise Linux</name>

      <release id='5'>
	<name>RHEL 5</name>

	<platforms>
	  <arch type='x86_64'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='i386'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	  <arch type='ia64'>
	    <virt type='hvm'>
	      <config name='qemu090io'/>
	    </virt>
	    <virt type='xen'>
	      <config name='xenio'/>
	    </virt>
	  </arch>
	</platform>

	<update id='5.1'>
	  <name>RHEL 5.1</name>
	</update>

	<update id='5.2'>
	  <name>RHEL 5.2</name>
	</update>

	<update id='5.3'>
	  <name>RHEL 5.3</name>
	  <platforms>
	    <arch type='x86_64'>
	      <virt type='hvm'>
		<config name='virtio'/>
	      </virt>
	    </arch>
	    <arch type='i386'>
	      <virt type='hvm'>
		<config name='virtio'/>
	      </virt>
	    </arch>
	    <arch type='ia64'>
	      <virt type='hvm'>
		<config name='virtio'/>
	      </virt>
	    </arch>
	  </platforms>
	</update>
      </release>
    </distro>
  </family>

  <family id='redhat'>
    <name>MicroSoft Windows</name>

    <distro id='winxp'>
      <name>MicroSoft Windows XP</name>

      <platforms>
	<arch type='i386'>
	  <virt type='hvm'>
	    <config name='qemu080io'/>
	    <config name='usbinput'/>
	  </virt>
	</arch>
    </distro>

    <distro id='win2k8'>
      <name>MicroSoft Windows 2008 Server</name>

      <platforms>
	<arch type='i386'>
	  <virt type='hvm'>
	    <config name='qemu090io'/>
	    <config name='usbinput'/>
	  </virt>
	</arch>
	<arch type='x86_64'>
	  <virt type='hvm'>
	    <config name='qemu090io'/>
	    <config name='usbinput'/>
	  </virt>
	</arch>
      </platforms>
    </distro>

  </family>

  <devices>
    <config name='qemu080io'>
      <interface>
	<model type='rtl8139'/>
      </interface>

      <disk>
	<target bus='ide' prefix='hd'/>
      </disk>
    </config>

    <config name='qemu090io'>
      <inherit config='qemu080io'>
      <interface>
	<model type='e1000'/>
      </interface>

      <disk>
	<target bus='scsi' prefix='sd'/>
      </disk>
    </config>

    <config name='virtio'>
      <inherit config='qemu090io'/>

      <interface>
	<model type='virtio'/>
      </interface>
      <disk>
	<target bus='virtio' prefix='vd'/>
      </disk>
    </config>

    <config name='xenio'>
      <interface>
	<model type='xen'/>
      </interface>

      <disk>
	<target bus='xen' prefix='xvd'/>
      </disk>
    </config>

    <config name='usbinput'>
      <input bus='usb' type='tablet'/>
    </config>
  </devices>
</osinfo>
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux