From: "Richard W.M. Jones" <rjones(a)redhat.com>
If "block_driver" option is set to Virtio_SCSI, prepend the block drivers
priority list with "vioscsi" so that we first search for "vioscsi.sys"
during
the drivers injection phase.
Originally-by: Richard W.M. Jones <rjones(a)redhat.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev(a)virtuozzo.com>
---
convert/convert_windows.ml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index 6c66869e..b5dc06ed 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -47,6 +47,14 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _
static_ips =
*)
let virtio_win =
Inject_virtio_win.from_environment g inspect.i_root Config.datadir in
+ (match block_driver with
+ | Virtio_blk -> () (* the default, no need to do anything *)
+ | Virtio_SCSI ->
+ let drivers = Inject_virtio_win.get_block_driver_priority virtio_win in
+ let drivers = "vioscsi" :: drivers in
+ Inject_virtio_win.set_block_driver_priority virtio_win drivers
+ | IDE -> assert false (* not possible - but maybe ...? *)
+ );
(* If the Windows guest appears to be using group policy.
*
--
2.31.1