[Libguestfs] [PATCH] v2v: copy all driver files into guest

Richard W.M. Jones rjones at redhat.com
Fri Jun 3 21:36:52 UTC 2016


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.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list