[libvirt] esx driver: XML format for guest OS type/variant

Richard W.M. Jones rjones at redhat.com
Wed Jan 12 23:04:27 UTC 2011

On Wed, Jan 12, 2011 at 03:51:04PM -0700, Eric Blake wrote:
> [adding Richard Jones, as he is more familiar with OS inspection]
> On 01/12/2011 03:29 PM, Matthias Bolte wrote:
> > 
> > One thing I wonder about is, where to get the list of possible values
> > for the guest OS type and variation from? Do we use what
> > virt-install/virt-manager currently use and map that onto the fixed
> > guest OS types (and variations) that VMware and VirtualBox understand
> > in the ESX/VMware and VirtualBox driver? Or do we expose the list of
> > possible values in driver capabilities? Or ...
> I imagine it should either be via some sort of .xml file (similar to
> libvirt's cpu_map.xml used for determining valid cpu models), or via
> linking in a common shared library that can share the work among
> multiple clients.  IIRC, there is work under way to provide a library to
> standardize on detection and description of various operating systems
> installed in a guest, but I cannot seem to quickly find a reference to
> such a library at the moment.

The library is libosinfo:


Despite patchy development efforts by several people, it hasn't really
gained much traction.  I'm not even sure if we are using it in libvirt
or virt-manager which was the original intent.

For virt-inspector we classify OSes very simply using two text


<name> (which corresponds to
http://libguestfs.org/guestfs.3.html#guestfs_inspect_get_type in the
API) is "linux" or "windows".

<distro> (http://libguestfs.org/guestfs.3.html#guestfs_inspect_get_distro)
is one of a small set of distro strings.

I don't know the best way to do what you want, but I will say there
are many different aspects to inspection, and one size won't fit all.
For example:

 - OS type
 - OS distro
 - installer location
 - how to download and install
 - preferred devices to expose to a new installation
 - does it support virtio?
 - what applications are installed in a particular instance?
 - what device drivers are installed in a particular instance?
 - licensing requirements


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html

More information about the libvir-list mailing list