[virt-tools-list] [PATCH libosinfo] Handle distinction of OS vs kernel version correctly.
Daniel P. Berrange
berrange at redhat.com
Thu Apr 26 08:27:35 UTC 2012
On Thu, Apr 26, 2012 at 09:08:17AM +0100, Richard W.M. Jones wrote:
> On Wed, Apr 25, 2012 at 05:40:43PM +0100, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> > We currently record a version number against any product (ie OS
> > or Hypervisor). The data we are recording against Windows OS
> > though is not actually an OS version, rather it is the Windows
> > kernel version. This becomes clear when you wonder why both
> > Vista and Win2k8 show the same version number - they share
> > the same kernel, but they are obviously different versions of
> > the Windows OS
> > This introduces an explicit 'kernel-version' property against
> > OS objects, and adjusts the windows metadata to use this.
> > @@ -621,7 +629,8 @@
> > <os id="http://microsoft.com/win/7">
> > <short-id>win7</short-id>
> > <name>Microsoft Windows 7</name>
> > - <version>6.1</version>
> > + <version>7</version>
> > + <kernel-version>6.1</kernel-version>
> > <vendor>Microsoft Corporation</vendor>
> > <family>winnt</family>
> > <distro>win</distro>
> The problem is that your original <version> is buggy. Windows "7"
> isn't version 7, it's version 6.1, despite what the marketing name
> would have you believe. (That's like saying that Windows 2008 is
> version 2008).
No, I don't believe that is correct. This is conflating the Windows
kernel version (6.1) with the windows OS version (7). I in fact *do*
consider the Windows 2008 OS version to be 2008, but it has a kernel
version of 6.1. It is not OS version 6.1. Some Windows releases don't
have any sane version at all (Vista, ME, etc) in which case I'm just
leaving the data blank, but there is still a kernel version number
available for them.
> BTW you also need to distinguish between windows "Client" and "Server"
> product variants (cf. guestfs_inspect_get_product_variant).
> It would have been a good idea to use the same scheme as libguestfs
> which already solved this problem thoroughly and has been
> battle-tested in production with virt-v2v ...
I don't believe libguestfs is correct in its version number handling
here either. It has also been treating the Windows kernel version
as if it were an operating system version. ie both Windows 7 and
Windows Server 2008 r2 are reporting version '6.1' - they are
certainly not the same OS version.
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the virt-tools-list