[Libguestfs] Fwd: [PATCH] v2v: virtio-win: include *.dll too

Richard W.M. Jones rjones at redhat.com
Thu Nov 5 21:46:02 UTC 2015


On Thu, Oct 29, 2015 at 11:05:42AM +1100, Vadim Rozenfeld wrote:
> On Wed, 2015-10-28 at 14:53 +0300, Roman Kagan wrote:
> >   1) tell which devices can be configured
> Not sure that I fully understated your question. but if you are going to
> create some sort of off-line automatic virtio-win drivers update
> utility, then it shouldn't be too complicated. Firs of all you will need
> to obtain the Windows kernel version by reading the following Registry
> key - "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion". Let's say it
> 6.3, which means that it is Win8.1 or WS2012R2, parsing "BuildLabEx"
> string from the same hive will give you information about the platform
> bitness. Next you need to go through inf files, and find "DriverVer"
> string, like this one . taken from from vioscsi.inf
> 
> DriverVer=08/01/2015,62.72.104.10800
> 
> This string contains build time and version stamps. The version stamp
> looks as follow "62.72.104.10800"
> where 62 means a target Windows kernel version multiplied by 10. In this
> case it is 6.2 which means Win8 or WS2012
> 72 - the target host platform version multiplied bu 10 (was RHEL7.2)
> 104 just a magic number, but it can be changed, don't make any
> assumption based on this number.
> 10800 our internal build number (build 108) multiplied by 100

Hi Vadim,

I've almost finished implementing this, but I have a couple of
technical questions:

(1) How can we tell from the .inf file what architecture (x86 or
amd64) the driver is for?  There is a [Manufacturer] section which
looks hopeful, eg:

  [Manufacturer]
  %RHEL%   = RHEL,NTAMD64

but the contents are not very consistent across all the .inf files I
have access to.

(2) If we have a directory containing multiple drivers, can we assume
that if any .inf file found matches the guest OS, then all those
drivers can be installed?  So far this appears to be true.  If not
then we have to start associating drivers with .inf files, which seems
a bit complicated.

(3) You write:

> If you found an inf file with the matching minor OS (6 in our case)
> version and matching or less but close minor version number (2 vs 3)
> then you are in the right directory.

When you say "close minor version number" is there a particular
definition you have in mind?  eg. minor or minor-1 is OK?  Or do we
have to consider all .inf files in totality and choose the nearest
one?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list