Make the location of the Windows virtio drivers overridable with the
environment variable VIRTIO_WIN_DIR, in the same vein as is done for
virt-tools.

Signed-off-by: Roman Kagan <[email protected]>
---
 v2v/convert_windows.ml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 0cd818a..e966341 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) 
inspect source =
     try Sys.getenv "VIRT_TOOLS_DATA_DIR"
     with Not_found -> Config.datadir // "virt-tools" in
 
-  let virtio_win_dir = "/usr/share/virtio-win" in
+  let virtio_win_dir =
+    try Sys.getenv "VIRTIO_WIN_DIR"
+    with Not_found -> Config.datadir // "virtio-win" in
 
   (* Check if RHEV-APT exists.  This is optional. *)
   let rhev_apt_exe = virt_tools_data_dir // "rhev-apt.exe" in
-- 
2.1.0

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to