Roman Kagan
2016-Jun-04 14:00 UTC
[Libguestfs] [PATCH v2] v2v: copy all driver files into guest
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@virtuozzo.com> --- v1 -> v2: - update unit test to match the changed behavior v2v/v2v_unit_tests.ml | 202 +++++++++++++++++++++++++------------------------- v2v/windows_virtio.ml | 11 --- 2 files changed, 101 insertions(+), 112 deletions(-) diff --git a/v2v/v2v_unit_tests.ml b/v2v/v2v_unit_tests.ml index 95d8430..8e8957d 100644 --- a/v2v/v2v_unit_tests.ml +++ b/v2v/v2v_unit_tests.ml @@ -164,116 +164,116 @@ let test_virtio_iso_path_matches_guest_os ctx let paths = [ (* Paths from the virtio-win 1.7.4 ISO. *) - "Balloon/2k12/amd64/WdfCoInstaller01011.dll", None; + "Balloon/2k12/amd64/WdfCoInstaller01011.dll", Some win2k12_64; "Balloon/2k12/amd64/balloon.cat", Some win2k12_64; "Balloon/2k12/amd64/balloon.inf", Some win2k12_64; "Balloon/2k12/amd64/balloon.pdb", Some win2k12_64; "Balloon/2k12/amd64/balloon.sys", Some win2k12_64; - "Balloon/2k12/amd64/blnsvr.exe", None; + "Balloon/2k12/amd64/blnsvr.exe", Some win2k12_64; "Balloon/2k12/amd64/blnsvr.pdb", Some win2k12_64; - "Balloon/2k12R2/amd64/WdfCoInstaller01011.dll", None; + "Balloon/2k12R2/amd64/WdfCoInstaller01011.dll", Some win2k12r2_64; "Balloon/2k12R2/amd64/balloon.cat", Some win2k12r2_64; "Balloon/2k12R2/amd64/balloon.inf", Some win2k12r2_64; "Balloon/2k12R2/amd64/balloon.pdb", Some win2k12r2_64; "Balloon/2k12R2/amd64/balloon.sys", Some win2k12r2_64; - "Balloon/2k12R2/amd64/blnsvr.exe", None; + "Balloon/2k12R2/amd64/blnsvr.exe", Some win2k12r2_64; "Balloon/2k12R2/amd64/blnsvr.pdb", Some win2k12r2_64; - "Balloon/2k3/amd64/WdfCoInstaller01009.dll", None; + "Balloon/2k3/amd64/WdfCoInstaller01009.dll", Some win2k3_64; "Balloon/2k3/amd64/balloon.cat", Some win2k3_64; "Balloon/2k3/amd64/balloon.inf", Some win2k3_64; "Balloon/2k3/amd64/balloon.pdb", Some win2k3_64; "Balloon/2k3/amd64/balloon.sys", Some win2k3_64; - "Balloon/2k3/amd64/blnsvr.exe", None; + "Balloon/2k3/amd64/blnsvr.exe", Some win2k3_64; "Balloon/2k3/amd64/blnsvr.pdb", Some win2k3_64; - "Balloon/2k3/x86/WdfCoInstaller01009.dll", None; + "Balloon/2k3/x86/WdfCoInstaller01009.dll", Some win2k3_32; "Balloon/2k3/x86/balloon.cat", Some win2k3_32; "Balloon/2k3/x86/balloon.inf", Some win2k3_32; "Balloon/2k3/x86/balloon.pdb", Some win2k3_32; "Balloon/2k3/x86/balloon.sys", Some win2k3_32; - "Balloon/2k3/x86/blnsvr.exe", None; + "Balloon/2k3/x86/blnsvr.exe", Some win2k3_32; "Balloon/2k3/x86/blnsvr.pdb", Some win2k3_32; - "Balloon/2k8/amd64/WdfCoInstaller01009.dll", None; + "Balloon/2k8/amd64/WdfCoInstaller01009.dll", Some win2k8_64; "Balloon/2k8/amd64/balloon.cat", Some win2k8_64; "Balloon/2k8/amd64/balloon.inf", Some win2k8_64; "Balloon/2k8/amd64/balloon.pdb", Some win2k8_64; "Balloon/2k8/amd64/balloon.sys", Some win2k8_64; - "Balloon/2k8/amd64/blnsvr.exe", None; + "Balloon/2k8/amd64/blnsvr.exe", Some win2k8_64; "Balloon/2k8/amd64/blnsvr.pdb", Some win2k8_64; - "Balloon/2k8/x86/WdfCoInstaller01009.dll", None; + "Balloon/2k8/x86/WdfCoInstaller01009.dll", Some win2k8_32; "Balloon/2k8/x86/balloon.cat", Some win2k8_32; "Balloon/2k8/x86/balloon.inf", Some win2k8_32; "Balloon/2k8/x86/balloon.pdb", Some win2k8_32; "Balloon/2k8/x86/balloon.sys", Some win2k8_32; - "Balloon/2k8/x86/blnsvr.exe", None; + "Balloon/2k8/x86/blnsvr.exe", Some win2k8_32; "Balloon/2k8/x86/blnsvr.pdb", Some win2k8_32; - "Balloon/2k8R2/amd64/WdfCoInstaller01009.dll", None; + "Balloon/2k8R2/amd64/WdfCoInstaller01009.dll", Some win2k8r2_64; "Balloon/2k8R2/amd64/balloon.cat", Some win2k8r2_64; "Balloon/2k8R2/amd64/balloon.inf", Some win2k8r2_64; "Balloon/2k8R2/amd64/balloon.pdb", Some win2k8r2_64; "Balloon/2k8R2/amd64/balloon.sys", Some win2k8r2_64; - "Balloon/2k8R2/amd64/blnsvr.exe", None; + "Balloon/2k8R2/amd64/blnsvr.exe", Some win2k8r2_64; "Balloon/2k8R2/amd64/blnsvr.pdb", Some win2k8r2_64; - "Balloon/w7/amd64/WdfCoInstaller01009.dll", None; + "Balloon/w7/amd64/WdfCoInstaller01009.dll", Some win7_64; "Balloon/w7/amd64/balloon.cat", Some win7_64; "Balloon/w7/amd64/balloon.inf", Some win7_64; "Balloon/w7/amd64/balloon.pdb", Some win7_64; "Balloon/w7/amd64/balloon.sys", Some win7_64; - "Balloon/w7/amd64/blnsvr.exe", None; + "Balloon/w7/amd64/blnsvr.exe", Some win7_64; "Balloon/w7/amd64/blnsvr.pdb", Some win7_64; - "Balloon/w7/x86/WdfCoInstaller01009.dll", None; + "Balloon/w7/x86/WdfCoInstaller01009.dll", Some win7_32; "Balloon/w7/x86/balloon.cat", Some win7_32; "Balloon/w7/x86/balloon.inf", Some win7_32; "Balloon/w7/x86/balloon.pdb", Some win7_32; "Balloon/w7/x86/balloon.sys", Some win7_32; - "Balloon/w7/x86/blnsvr.exe", None; + "Balloon/w7/x86/blnsvr.exe", Some win7_32; "Balloon/w7/x86/blnsvr.pdb", Some win7_32; - "Balloon/w8.1/amd64/WdfCoInstaller01011.dll", None; + "Balloon/w8.1/amd64/WdfCoInstaller01011.dll", Some win8_1_64; "Balloon/w8.1/amd64/balloon.cat", Some win8_1_64; "Balloon/w8.1/amd64/balloon.inf", Some win8_1_64; "Balloon/w8.1/amd64/balloon.pdb", Some win8_1_64; "Balloon/w8.1/amd64/balloon.sys", Some win8_1_64; - "Balloon/w8.1/amd64/blnsvr.exe", None; + "Balloon/w8.1/amd64/blnsvr.exe", Some win8_1_64; "Balloon/w8.1/amd64/blnsvr.pdb", Some win8_1_64; - "Balloon/w8.1/x86/WdfCoInstaller01011.dll", None; + "Balloon/w8.1/x86/WdfCoInstaller01011.dll", Some win8_1_32; "Balloon/w8.1/x86/balloon.cat", Some win8_1_32; "Balloon/w8.1/x86/balloon.inf", Some win8_1_32; "Balloon/w8.1/x86/balloon.pdb", Some win8_1_32; "Balloon/w8.1/x86/balloon.sys", Some win8_1_32; - "Balloon/w8.1/x86/blnsvr.exe", None; + "Balloon/w8.1/x86/blnsvr.exe", Some win8_1_32; "Balloon/w8.1/x86/blnsvr.pdb", Some win8_1_32; - "Balloon/w8/amd64/WdfCoInstaller01011.dll", None; + "Balloon/w8/amd64/WdfCoInstaller01011.dll", Some win8_64; "Balloon/w8/amd64/balloon.cat", Some win8_64; "Balloon/w8/amd64/balloon.inf", Some win8_64; "Balloon/w8/amd64/balloon.pdb", Some win8_64; "Balloon/w8/amd64/balloon.sys", Some win8_64; - "Balloon/w8/amd64/blnsvr.exe", None; + "Balloon/w8/amd64/blnsvr.exe", Some win8_64; "Balloon/w8/amd64/blnsvr.pdb", Some win8_64; - "Balloon/w8/x86/WdfCoInstaller01011.dll", None; + "Balloon/w8/x86/WdfCoInstaller01011.dll", Some win8_32; "Balloon/w8/x86/balloon.cat", Some win8_32; "Balloon/w8/x86/balloon.inf", Some win8_32; "Balloon/w8/x86/balloon.pdb", Some win8_32; "Balloon/w8/x86/balloon.sys", Some win8_32; - "Balloon/w8/x86/blnsvr.exe", None; + "Balloon/w8/x86/blnsvr.exe", Some win8_32; "Balloon/w8/x86/blnsvr.pdb", Some win8_32; - "Balloon/xp/x86/WdfCoInstaller01009.dll", None; + "Balloon/xp/x86/WdfCoInstaller01009.dll", Some winxp_32; "Balloon/xp/x86/balloon.cat", Some winxp_32; "Balloon/xp/x86/balloon.inf", Some winxp_32; "Balloon/xp/x86/balloon.pdb", Some winxp_32; "Balloon/xp/x86/balloon.sys", Some winxp_32; - "Balloon/xp/x86/blnsvr.exe", None; + "Balloon/xp/x86/blnsvr.exe", Some winxp_32; "Balloon/xp/x86/blnsvr.pdb", Some winxp_32; "NetKVM/2k12/amd64/netkvm.cat", Some win2k12_64; "NetKVM/2k12/amd64/netkvm.inf", Some win2k12_64; "NetKVM/2k12/amd64/netkvm.pdb", Some win2k12_64; "NetKVM/2k12/amd64/netkvm.sys", Some win2k12_64; - "NetKVM/2k12/amd64/netkvmco.dll", None; - "NetKVM/2k12/amd64/readme.doc", None; + "NetKVM/2k12/amd64/netkvmco.dll", Some win2k12_64; + "NetKVM/2k12/amd64/readme.doc", Some win2k12_64; "NetKVM/2k12R2/amd64/netkvm.cat", Some win2k12r2_64; "NetKVM/2k12R2/amd64/netkvm.inf", Some win2k12r2_64; "NetKVM/2k12R2/amd64/netkvm.pdb", Some win2k12r2_64; "NetKVM/2k12R2/amd64/netkvm.sys", Some win2k12r2_64; - "NetKVM/2k12R2/amd64/netkvmco.dll", None; - "NetKVM/2k12R2/amd64/readme.doc", None; + "NetKVM/2k12R2/amd64/netkvmco.dll", Some win2k12r2_64; + "NetKVM/2k12R2/amd64/readme.doc", Some win2k12r2_64; "NetKVM/2k3/amd64/netkvm.cat", Some win2k3_64; "NetKVM/2k3/amd64/netkvm.inf", Some win2k3_64; "NetKVM/2k3/amd64/netkvm.pdb", Some win2k3_64; @@ -286,56 +286,56 @@ let test_virtio_iso_path_matches_guest_os ctx "NetKVM/2k8/amd64/netkvm.inf", Some win2k8_64; "NetKVM/2k8/amd64/netkvm.pdb", Some win2k8_64; "NetKVM/2k8/amd64/netkvm.sys", Some win2k8_64; - "NetKVM/2k8/amd64/netkvmco.dll", None; - "NetKVM/2k8/amd64/readme.doc", None; + "NetKVM/2k8/amd64/netkvmco.dll", Some win2k8_64; + "NetKVM/2k8/amd64/readme.doc", Some win2k8_64; "NetKVM/2k8/x86/netkvm.cat", Some win2k8_32; "NetKVM/2k8/x86/netkvm.inf", Some win2k8_32; "NetKVM/2k8/x86/netkvm.pdb", Some win2k8_32; "NetKVM/2k8/x86/netkvm.sys", Some win2k8_32; - "NetKVM/2k8/x86/netkvmco.dll", None; - "NetKVM/2k8/x86/readme.doc", None; + "NetKVM/2k8/x86/netkvmco.dll", Some win2k8_32; + "NetKVM/2k8/x86/readme.doc", Some win2k8_32; "NetKVM/2k8R2/amd64/netkvm.cat", Some win2k8r2_64; "NetKVM/2k8R2/amd64/netkvm.inf", Some win2k8r2_64; "NetKVM/2k8R2/amd64/netkvm.pdb", Some win2k8r2_64; "NetKVM/2k8R2/amd64/netkvm.sys", Some win2k8r2_64; - "NetKVM/2k8R2/amd64/netkvmco.dll", None; - "NetKVM/2k8R2/amd64/readme.doc", None; + "NetKVM/2k8R2/amd64/netkvmco.dll", Some win2k8r2_64; + "NetKVM/2k8R2/amd64/readme.doc", Some win2k8r2_64; "NetKVM/w7/amd64/netkvm.cat", Some win7_64; "NetKVM/w7/amd64/netkvm.inf", Some win7_64; "NetKVM/w7/amd64/netkvm.pdb", Some win7_64; "NetKVM/w7/amd64/netkvm.sys", Some win7_64; - "NetKVM/w7/amd64/netkvmco.dll", None; - "NetKVM/w7/amd64/readme.doc", None; + "NetKVM/w7/amd64/netkvmco.dll", Some win7_64; + "NetKVM/w7/amd64/readme.doc", Some win7_64; "NetKVM/w7/x86/netkvm.cat", Some win7_32; "NetKVM/w7/x86/netkvm.inf", Some win7_32; "NetKVM/w7/x86/netkvm.pdb", Some win7_32; "NetKVM/w7/x86/netkvm.sys", Some win7_32; - "NetKVM/w7/x86/netkvmco.dll", None; - "NetKVM/w7/x86/readme.doc", None; + "NetKVM/w7/x86/netkvmco.dll", Some win7_32; + "NetKVM/w7/x86/readme.doc", Some win7_32; "NetKVM/w8.1/amd64/netkvm.cat", Some win8_1_64; "NetKVM/w8.1/amd64/netkvm.inf", Some win8_1_64; "NetKVM/w8.1/amd64/netkvm.pdb", Some win8_1_64; "NetKVM/w8.1/amd64/netkvm.sys", Some win8_1_64; - "NetKVM/w8.1/amd64/netkvmco.dll", None; - "NetKVM/w8.1/amd64/readme.doc", None; + "NetKVM/w8.1/amd64/netkvmco.dll", Some win8_1_64; + "NetKVM/w8.1/amd64/readme.doc", Some win8_1_64; "NetKVM/w8.1/x86/netkvm.cat", Some win8_1_32; "NetKVM/w8.1/x86/netkvm.inf", Some win8_1_32; "NetKVM/w8.1/x86/netkvm.pdb", Some win8_1_32; "NetKVM/w8.1/x86/netkvm.sys", Some win8_1_32; - "NetKVM/w8.1/x86/netkvmco.dll", None; - "NetKVM/w8.1/x86/readme.doc", None; + "NetKVM/w8.1/x86/netkvmco.dll", Some win8_1_32; + "NetKVM/w8.1/x86/readme.doc", Some win8_1_32; "NetKVM/w8/amd64/netkvm.cat", Some win8_64; "NetKVM/w8/amd64/netkvm.inf", Some win8_64; "NetKVM/w8/amd64/netkvm.pdb", Some win8_64; "NetKVM/w8/amd64/netkvm.sys", Some win8_64; - "NetKVM/w8/amd64/netkvmco.dll", None; - "NetKVM/w8/amd64/readme.doc", None; + "NetKVM/w8/amd64/netkvmco.dll", Some win8_64; + "NetKVM/w8/amd64/readme.doc", Some win8_64; "NetKVM/w8/x86/netkvm.cat", Some win8_32; "NetKVM/w8/x86/netkvm.inf", Some win8_32; "NetKVM/w8/x86/netkvm.pdb", Some win8_32; "NetKVM/w8/x86/netkvm.sys", Some win8_32; - "NetKVM/w8/x86/netkvmco.dll", None; - "NetKVM/w8/x86/readme.doc", None; + "NetKVM/w8/x86/netkvmco.dll", Some win8_32; + "NetKVM/w8/x86/readme.doc", Some win8_32; "NetKVM/xp/x86/netkvm.cat", Some winxp_32; "NetKVM/xp/x86/netkvm.inf", Some winxp_32; "NetKVM/xp/x86/netkvm.pdb", Some winxp_32; @@ -343,83 +343,83 @@ let test_virtio_iso_path_matches_guest_os ctx "guest-agent/qemu-ga-x64.msi", None; "guest-agent/qemu-ga-x86.msi", None; "qemupciserial/qemupciserial.inf", None; - "viorng/2k12/amd64/WdfCoInstaller01011.dll", None; + "viorng/2k12/amd64/WdfCoInstaller01011.dll", Some win2k12_64; "viorng/2k12/amd64/viorng.cat", Some win2k12_64; "viorng/2k12/amd64/viorng.inf", Some win2k12_64; "viorng/2k12/amd64/viorng.pdb", Some win2k12_64; "viorng/2k12/amd64/viorng.sys", Some win2k12_64; - "viorng/2k12/amd64/viorngci.dll", None; - "viorng/2k12/amd64/viorngum.dll", None; - "viorng/2k12R2/amd64/WdfCoInstaller01011.dll", None; + "viorng/2k12/amd64/viorngci.dll", Some win2k12_64; + "viorng/2k12/amd64/viorngum.dll", Some win2k12_64; + "viorng/2k12R2/amd64/WdfCoInstaller01011.dll", Some win2k12r2_64; "viorng/2k12R2/amd64/viorng.cat", Some win2k12r2_64; "viorng/2k12R2/amd64/viorng.inf", Some win2k12r2_64; "viorng/2k12R2/amd64/viorng.pdb", Some win2k12r2_64; "viorng/2k12R2/amd64/viorng.sys", Some win2k12r2_64; - "viorng/2k12R2/amd64/viorngci.dll", None; - "viorng/2k12R2/amd64/viorngum.dll", None; - "viorng/2k8/amd64/WdfCoInstaller01009.dll", None; + "viorng/2k12R2/amd64/viorngci.dll", Some win2k12r2_64; + "viorng/2k12R2/amd64/viorngum.dll", Some win2k12r2_64; + "viorng/2k8/amd64/WdfCoInstaller01009.dll", Some win2k8_64; "viorng/2k8/amd64/viorng.cat", Some win2k8_64; "viorng/2k8/amd64/viorng.inf", Some win2k8_64; "viorng/2k8/amd64/viorng.pdb", Some win2k8_64; "viorng/2k8/amd64/viorng.sys", Some win2k8_64; - "viorng/2k8/amd64/viorngci.dll", None; - "viorng/2k8/amd64/viorngum.dll", None; - "viorng/2k8/x86/WdfCoInstaller01009.dll", None; + "viorng/2k8/amd64/viorngci.dll", Some win2k8_64; + "viorng/2k8/amd64/viorngum.dll", Some win2k8_64; + "viorng/2k8/x86/WdfCoInstaller01009.dll", Some win2k8_32; "viorng/2k8/x86/viorng.cat", Some win2k8_32; "viorng/2k8/x86/viorng.inf", Some win2k8_32; "viorng/2k8/x86/viorng.pdb", Some win2k8_32; "viorng/2k8/x86/viorng.sys", Some win2k8_32; - "viorng/2k8/x86/viorngci.dll", None; - "viorng/2k8/x86/viorngum.dll", None; - "viorng/2k8R2/amd64/WdfCoInstaller01009.dll", None; + "viorng/2k8/x86/viorngci.dll", Some win2k8_32; + "viorng/2k8/x86/viorngum.dll", Some win2k8_32; + "viorng/2k8R2/amd64/WdfCoInstaller01009.dll", Some win2k8r2_64; "viorng/2k8R2/amd64/viorng.cat", Some win2k8r2_64; "viorng/2k8R2/amd64/viorng.inf", Some win2k8r2_64; "viorng/2k8R2/amd64/viorng.pdb", Some win2k8r2_64; "viorng/2k8R2/amd64/viorng.sys", Some win2k8r2_64; - "viorng/2k8R2/amd64/viorngci.dll", None; - "viorng/2k8R2/amd64/viorngum.dll", None; - "viorng/w7/amd64/WdfCoInstaller01009.dll", None; + "viorng/2k8R2/amd64/viorngci.dll", Some win2k8r2_64; + "viorng/2k8R2/amd64/viorngum.dll", Some win2k8r2_64; + "viorng/w7/amd64/WdfCoInstaller01009.dll", Some win7_64; "viorng/w7/amd64/viorng.cat", Some win7_64; "viorng/w7/amd64/viorng.inf", Some win7_64; "viorng/w7/amd64/viorng.pdb", Some win7_64; "viorng/w7/amd64/viorng.sys", Some win7_64; - "viorng/w7/amd64/viorngci.dll", None; - "viorng/w7/amd64/viorngum.dll", None; - "viorng/w7/x86/WdfCoInstaller01009.dll", None; + "viorng/w7/amd64/viorngci.dll", Some win7_64; + "viorng/w7/amd64/viorngum.dll", Some win7_64; + "viorng/w7/x86/WdfCoInstaller01009.dll", Some win7_32; "viorng/w7/x86/viorng.cat", Some win7_32; "viorng/w7/x86/viorng.inf", Some win7_32; "viorng/w7/x86/viorng.pdb", Some win7_32; "viorng/w7/x86/viorng.sys", Some win7_32; - "viorng/w7/x86/viorngci.dll", None; - "viorng/w7/x86/viorngum.dll", None; - "viorng/w8.1/amd64/WdfCoInstaller01011.dll", None; + "viorng/w7/x86/viorngci.dll", Some win7_32; + "viorng/w7/x86/viorngum.dll", Some win7_32; + "viorng/w8.1/amd64/WdfCoInstaller01011.dll", Some win8_1_64; "viorng/w8.1/amd64/viorng.cat", Some win8_1_64; "viorng/w8.1/amd64/viorng.inf", Some win8_1_64; "viorng/w8.1/amd64/viorng.pdb", Some win8_1_64; "viorng/w8.1/amd64/viorng.sys", Some win8_1_64; - "viorng/w8.1/amd64/viorngci.dll", None; - "viorng/w8.1/amd64/viorngum.dll", None; - "viorng/w8.1/x86/WdfCoInstaller01011.dll", None; + "viorng/w8.1/amd64/viorngci.dll", Some win8_1_64; + "viorng/w8.1/amd64/viorngum.dll", Some win8_1_64; + "viorng/w8.1/x86/WdfCoInstaller01011.dll", Some win8_1_32; "viorng/w8.1/x86/viorng.cat", Some win8_1_32; "viorng/w8.1/x86/viorng.inf", Some win8_1_32; "viorng/w8.1/x86/viorng.pdb", Some win8_1_32; "viorng/w8.1/x86/viorng.sys", Some win8_1_32; - "viorng/w8.1/x86/viorngci.dll", None; - "viorng/w8.1/x86/viorngum.dll", None; - "viorng/w8/amd64/WdfCoInstaller01011.dll", None; + "viorng/w8.1/x86/viorngci.dll", Some win8_1_32; + "viorng/w8.1/x86/viorngum.dll", Some win8_1_32; + "viorng/w8/amd64/WdfCoInstaller01011.dll", Some win8_64; "viorng/w8/amd64/viorng.cat", Some win8_64; "viorng/w8/amd64/viorng.inf", Some win8_64; "viorng/w8/amd64/viorng.pdb", Some win8_64; "viorng/w8/amd64/viorng.sys", Some win8_64; - "viorng/w8/amd64/viorngci.dll", None; - "viorng/w8/amd64/viorngum.dll", None; - "viorng/w8/x86/WdfCoInstaller01011.dll", None; + "viorng/w8/amd64/viorngci.dll", Some win8_64; + "viorng/w8/amd64/viorngum.dll", Some win8_64; + "viorng/w8/x86/WdfCoInstaller01011.dll", Some win8_32; "viorng/w8/x86/viorng.cat", Some win8_32; "viorng/w8/x86/viorng.inf", Some win8_32; "viorng/w8/x86/viorng.pdb", Some win8_32; "viorng/w8/x86/viorng.sys", Some win8_32; - "viorng/w8/x86/viorngci.dll", None; - "viorng/w8/x86/viorngum.dll", None; + "viorng/w8/x86/viorngci.dll", Some win8_32; + "viorng/w8/x86/viorngum.dll", Some win8_32; "vioscsi/2k12/amd64/vioscsi.cat", Some win2k12_64; "vioscsi/2k12/amd64/vioscsi.inf", Some win2k12_64; "vioscsi/2k12/amd64/vioscsi.pdb", Some win2k12_64; @@ -464,72 +464,72 @@ let test_virtio_iso_path_matches_guest_os ctx "vioscsi/w8/x86/vioscsi.inf", Some win8_32; "vioscsi/w8/x86/vioscsi.pdb", Some win8_32; "vioscsi/w8/x86/vioscsi.sys", Some win8_32; - "vioserial/2k12/amd64/WdfCoInstaller01011.dll", None; + "vioserial/2k12/amd64/WdfCoInstaller01011.dll", Some win2k12_64; "vioserial/2k12/amd64/vioser.cat", Some win2k12_64; "vioserial/2k12/amd64/vioser.inf", Some win2k12_64; "vioserial/2k12/amd64/vioser.pdb", Some win2k12_64; "vioserial/2k12/amd64/vioser.sys", Some win2k12_64; - "vioserial/2k12R2/amd64/WdfCoInstaller01011.dll", None; + "vioserial/2k12R2/amd64/WdfCoInstaller01011.dll", Some win2k12r2_64; "vioserial/2k12R2/amd64/vioser.cat", Some win2k12r2_64; "vioserial/2k12R2/amd64/vioser.inf", Some win2k12r2_64; "vioserial/2k12R2/amd64/vioser.pdb", Some win2k12r2_64; "vioserial/2k12R2/amd64/vioser.sys", Some win2k12r2_64; - "vioserial/2k3/amd64/WdfCoInstaller01009.dll", None; + "vioserial/2k3/amd64/WdfCoInstaller01009.dll", Some win2k3_64; "vioserial/2k3/amd64/vioser.cat", Some win2k3_64; "vioserial/2k3/amd64/vioser.inf", Some win2k3_64; "vioserial/2k3/amd64/vioser.pdb", Some win2k3_64; "vioserial/2k3/amd64/vioser.sys", Some win2k3_64; - "vioserial/2k3/x86/WdfCoInstaller01009.dll", None; + "vioserial/2k3/x86/WdfCoInstaller01009.dll", Some win2k3_32; "vioserial/2k3/x86/vioser.cat", Some win2k3_32; "vioserial/2k3/x86/vioser.inf", Some win2k3_32; "vioserial/2k3/x86/vioser.pdb", Some win2k3_32; "vioserial/2k3/x86/vioser.sys", Some win2k3_32; - "vioserial/2k8/amd64/WdfCoInstaller01009.dll", None; + "vioserial/2k8/amd64/WdfCoInstaller01009.dll", Some win2k8_64; "vioserial/2k8/amd64/vioser.cat", Some win2k8_64; "vioserial/2k8/amd64/vioser.inf", Some win2k8_64; "vioserial/2k8/amd64/vioser.pdb", Some win2k8_64; "vioserial/2k8/amd64/vioser.sys", Some win2k8_64; - "vioserial/2k8/x86/WdfCoInstaller01009.dll", None; + "vioserial/2k8/x86/WdfCoInstaller01009.dll", Some win2k8_32; "vioserial/2k8/x86/vioser.cat", Some win2k8_32; "vioserial/2k8/x86/vioser.inf", Some win2k8_32; "vioserial/2k8/x86/vioser.pdb", Some win2k8_32; "vioserial/2k8/x86/vioser.sys", Some win2k8_32; - "vioserial/2k8R2/amd64/WdfCoInstaller01009.dll", None; + "vioserial/2k8R2/amd64/WdfCoInstaller01009.dll", Some win2k8r2_64; "vioserial/2k8R2/amd64/vioser.cat", Some win2k8r2_64; "vioserial/2k8R2/amd64/vioser.inf", Some win2k8r2_64; "vioserial/2k8R2/amd64/vioser.pdb", Some win2k8r2_64; "vioserial/2k8R2/amd64/vioser.sys", Some win2k8r2_64; - "vioserial/w7/amd64/WdfCoInstaller01009.dll", None; + "vioserial/w7/amd64/WdfCoInstaller01009.dll", Some win7_64; "vioserial/w7/amd64/vioser.cat", Some win7_64; "vioserial/w7/amd64/vioser.inf", Some win7_64; "vioserial/w7/amd64/vioser.pdb", Some win7_64; "vioserial/w7/amd64/vioser.sys", Some win7_64; - "vioserial/w7/x86/WdfCoInstaller01009.dll", None; + "vioserial/w7/x86/WdfCoInstaller01009.dll", Some win7_32; "vioserial/w7/x86/vioser.cat", Some win7_32; "vioserial/w7/x86/vioser.inf", Some win7_32; "vioserial/w7/x86/vioser.pdb", Some win7_32; "vioserial/w7/x86/vioser.sys", Some win7_32; - "vioserial/w8.1/amd64/WdfCoInstaller01011.dll", None; + "vioserial/w8.1/amd64/WdfCoInstaller01011.dll", Some win8_1_64; "vioserial/w8.1/amd64/vioser.cat", Some win8_1_64; "vioserial/w8.1/amd64/vioser.inf", Some win8_1_64; "vioserial/w8.1/amd64/vioser.pdb", Some win8_1_64; "vioserial/w8.1/amd64/vioser.sys", Some win8_1_64; - "vioserial/w8.1/x86/WdfCoInstaller01011.dll", None; + "vioserial/w8.1/x86/WdfCoInstaller01011.dll", Some win8_1_32; "vioserial/w8.1/x86/vioser.cat", Some win8_1_32; "vioserial/w8.1/x86/vioser.inf", Some win8_1_32; "vioserial/w8.1/x86/vioser.pdb", Some win8_1_32; "vioserial/w8.1/x86/vioser.sys", Some win8_1_32; - "vioserial/w8/amd64/WdfCoInstaller01011.dll", None; + "vioserial/w8/amd64/WdfCoInstaller01011.dll", Some win8_64; "vioserial/w8/amd64/vioser.cat", Some win8_64; "vioserial/w8/amd64/vioser.inf", Some win8_64; "vioserial/w8/amd64/vioser.pdb", Some win8_64; "vioserial/w8/amd64/vioser.sys", Some win8_64; - "vioserial/w8/x86/WdfCoInstaller01011.dll", None; + "vioserial/w8/x86/WdfCoInstaller01011.dll", Some win8_32; "vioserial/w8/x86/vioser.cat", Some win8_32; "vioserial/w8/x86/vioser.inf", Some win8_32; "vioserial/w8/x86/vioser.pdb", Some win8_32; "vioserial/w8/x86/vioser.sys", Some win8_32; - "vioserial/xp/x86/WdfCoInstaller01009.dll", None; + "vioserial/xp/x86/WdfCoInstaller01009.dll", Some winxp_32; "vioserial/xp/x86/vioser.cat", Some winxp_32; "vioserial/xp/x86/vioser.inf", Some winxp_32; "vioserial/xp/x86/vioser.pdb", Some winxp_32; @@ -619,7 +619,7 @@ let test_virtio_iso_path_matches_guest_os ctx "drivers/i386/Win2008/vioscsi.inf", Some win2k8_32; "drivers/i386/Win7/viostor.inf", Some win7_32; "drivers/i386/Win7/viostor.sys", Some win7_32; - "drivers/i386/Win7/qxldd.dll", None; + "drivers/i386/Win7/qxldd.dll", Some win7_32; "drivers/i386/Win7/qxl.sys", Some win7_32; "drivers/i386/Win7/vioscsi.cat", Some win7_32; "drivers/i386/Win7/netkvm.inf", Some win7_32; @@ -647,7 +647,7 @@ let test_virtio_iso_path_matches_guest_os ctx "drivers/i386/Win8/vioscsi.inf", Some win8_32; "drivers/i386/WinXP/viostor.inf", Some winxp_32; "drivers/i386/WinXP/viostor.sys", Some winxp_32; - "drivers/i386/WinXP/qxldd.dll", None; + "drivers/i386/WinXP/qxldd.dll", Some winxp_32; "drivers/i386/WinXP/qxl.sys", Some winxp_32; "drivers/i386/WinXP/netkvm.inf", Some winxp_32; "drivers/i386/WinXP/netkvm.sys", Some winxp_32; @@ -675,7 +675,7 @@ let test_virtio_iso_path_matches_guest_os ctx "drivers/amd64/Win2008/vioscsi.inf", Some win2k8_64; "drivers/amd64/Win7/viostor.inf", Some win7_64; "drivers/amd64/Win7/viostor.sys", Some win7_64; - "drivers/amd64/Win7/qxldd.dll", None; + "drivers/amd64/Win7/qxldd.dll", Some win7_64; "drivers/amd64/Win7/qxl.sys", Some win7_64; "drivers/amd64/Win7/vioscsi.cat", Some win7_64; "drivers/amd64/Win7/netkvm.inf", Some win7_64; @@ -712,7 +712,7 @@ let test_virtio_iso_path_matches_guest_os ctx "drivers/amd64/Win2012/vioscsi.inf", Some win2k12_64; "drivers/amd64/Win2008R2/viostor.inf", Some win2k8r2_64; "drivers/amd64/Win2008R2/viostor.sys", Some win2k8r2_64; - "drivers/amd64/Win2008R2/qxldd.dll", None; + "drivers/amd64/Win2008R2/qxldd.dll", Some win2k8r2_64; "drivers/amd64/Win2008R2/qxl.sys", Some win2k8r2_64; "drivers/amd64/Win2008R2/vioscsi.cat", Some win2k8r2_64; "drivers/amd64/Win2008R2/netkvm.inf", Some win2k8r2_64; 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: -- 2.5.5
Richard W.M. Jones
2016-Jun-04 14:10 UTC
Re: [Libguestfs] [PATCH v2] v2v: copy all driver files into guest
On Sat, Jun 04, 2016 at 05:00:17PM +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@virtuozzo.com>Yup, works for me, so ACK. Thanks, 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/
Possibly Parallel Threads
- [PATCH 3/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
- [PATCH v3 0/2] v2v: Copy *.dll files since they can be part of the
- [PATCH 0/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
- [PATCH 0/4] Provide better fake virtio-* test data for virt-v2v.
- Re: Fwd: [PATCH] v2v: virtio-win: include *.dll too