On 3/7/23 20:40, Andrey Drobyshev wrote:
> From: "Richard W.M. Jones" <rjo...@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 <rjo...@redhat.com>
> Signed-off-by: Andrey Drobyshev <andrey.drobys...@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 1ace2948..6bc2343b 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 ...? *)

I'd suggest updating the comment:

  "not possible -- restricted by cmdline option parsing"

either way

Acked-by: Laszlo Ersek <ler...@redhat.com>




> +  );
>  
>    (* If the Windows guest appears to be using group policy.
>     *

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to