[Libguestfs] [PATCH] v2v: copy all driver files into guest
Richard W.M. Jones
rjones at redhat.com
Fri Jun 3 21:46:03 UTC 2016
On Fri, Jun 03, 2016 at 10:36:52PM +0100, Richard W.M. Jones wrote:
> On Fri, Jun 03, 2016 at 08:23:01PM +0300, Roman Kagan wrote:
> > Some virtio-win drivers contain more files than just *.{cat,inf,sys}.
> > They are filtered out currently, which prevents the drivers from being
> > installed by PnP.
> >
> > Stop filtering driver files by extension, and copy all of them instead.
> >
> > Signed-off-by: Roman Kagan <rkagan at virtuozzo.com>
> > ---
> > v2v/windows_virtio.ml | 11 -----------
> > 1 file changed, 11 deletions(-)
> >
> > diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml
> > index 6c8396c..354aa19 100644
> > --- a/v2v/windows_virtio.ml
> > +++ b/v2v/windows_virtio.ml
> > @@ -291,17 +291,6 @@ and virtio_iso_path_matches_guest_os path inspect =
> > * elements.
> > *)
> > let lc_path = String.lowercase_ascii path in
> > - let lc_basename = Filename.basename lc_path in
> > -
> > - let extension =
> > - match last_part_of lc_basename '.' with
> > - | Some x -> x
> > - | None -> raise Not_found
> > - in
> > -
> > - (* Skip files without specific extensions. *)
> > - let extensions = ["cat"; "inf"; "pdb"; "sys"] in
> > - if not (List.mem extension extensions) then raise Not_found;
> >
> > (* Using the full path, work out what version of Windows
> > * this driver is for. Paths can be things like:
>
> At a guess this will break the test suite. I can't check right now
> because I'm running another test on my laptop, but will try it later.
Yes, this breaks v2v_unit_tests. In this particular case because
WdfCoInstaller01011.dll is being copied in. I had a patch a while
back which copied this file:
https://www.redhat.com/archives/libguestfs/2016-March/msg00037.html
It didn't go upstream, but I don't recall why ..
There could be other errors. The test only reports and stops at the
first one.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list