- Add 0022-convert-windows-Ignore-sriov-drivers-on-virtio-win.patch

This commit is contained in:
eabdullin 2024-10-04 15:48:47 +03:00
parent ec0e840c16
commit c26f6d84f9
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,40 @@
From 94619ded353081255409eb3ffae51061adcbf9a4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 29 Aug 2024 13:17:13 +0100
Subject: [PATCH] mlcustomize: Ignore sriov drivers on virtio-win disk
Fixes: https://issues.redhat.com/browse/RHEL-56383
Thanks: Vadim Rozenfeld
---
mlcustomize/inject_virtio_win.ml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
index afec1e4..88c1c8c 100644
--- a/common/mlcustomize/inject_virtio_win.ml
+++ b/common/mlcustomize/inject_virtio_win.ml
@@ -478,7 +478,10 @@ and virtio_iso_path_matches_guest_os t path =
* "./drivers/amd64/Win2012R2/netkvm.sys".
* Note we check lowercase paths.
*)
- let pathelem elem = String.find lc_path ("/" ^ elem ^ "/") >= 0 in
+ let pathelem elem =
+ String.find lc_path ("/" ^ elem ^ "/") >= 0 ||
+ String.is_prefix lc_path (elem ^ "/")
+ in
let p_arch =
if pathelem "x86" || pathelem "i386" then "i386"
else if pathelem "amd64" then "x86_64"
@@ -522,7 +525,11 @@ and virtio_iso_path_matches_guest_os t path =
else
raise Not_found in
- arch = p_arch && os_major = p_os_major && os_minor = p_os_minor &&
+ let p_sriov = pathelem "sriov" in
+
+ arch = p_arch &&
+ not p_sriov && (* always ignored, see RHEL-56383 *)
+ os_major = p_os_major && os_minor = p_os_minor &&
match_os_variant os_variant &&
match_osinfo osinfo

View File

@ -8,7 +8,7 @@
Name: virt-v2v Name: virt-v2v
Epoch: 1 Epoch: 1
Version: 2.5.6 Version: 2.5.6
Release: 5%{?dist} Release: 7%{?dist}.alma.1
Summary: Convert a virtual machine to run on KVM Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -50,6 +50,10 @@ Patch0019: 0019-RHEL-9-Remove-block-driver-option.patch
Patch0020: 0020-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch Patch0020: 0020-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0021: 0021-convert-windows-Online-all-virtio-disks-at-first-boo.patch Patch0021: 0021-convert-windows-Online-all-virtio-disks-at-first-boo.patch
# Patches were taken from:
# https://github.com/libguestfs/libguestfs-common/commit/94619ded353081255409eb3ffae51061adcbf9a4
Patch0022: 0022-convert-windows-Ignore-sriov-drivers-on-virtio-win.patch
%if !0%{?rhel} %if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no # libguestfs hasn't been built on i686 for a while since there is no
# kernel built for this architecture any longer and libguestfs rather # kernel built for this architecture any longer and libguestfs rather
@ -352,6 +356,9 @@ make -C tests TESTS=test-v2v-fedora-luks-on-lvm-conversion.sh check
%changelog %changelog
* Fri Oct 04 2024 Eduard Abdullin <eabdullin@almalinux.org> - 1:2.5.6-7.alma.1
- Add 0022-convert-windows-Ignore-sriov-drivers-on-virtio-win.patch
* Thu Aug 29 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-5 * Thu Aug 29 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-5
- convert: windows: Ignore sriov drivers on virtio-win disk - convert: windows: Ignore sriov drivers on virtio-win disk
resolves: RHEL-56383 resolves: RHEL-56383