Remove warning when converting Rocky Linux

resolves: rhbz#2166618
Fix kernel panic after converting Rocky Linux 9
resolves: rhbz#2166619
This commit is contained in:
Richard W.M. Jones 2023-02-06 12:26:40 +00:00
parent 2587cc46a1
commit f1abc5da69
14 changed files with 120 additions and 24 deletions

View File

@ -0,0 +1,48 @@
From a9630d3981cbf7f6083e82f4e22cff981d11a8b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Feb 2023 12:29:00 +0000
Subject: [PATCH] -o libvirt: Add correct xmlns:libosinfo for Rocky Linux
Also a small whitespace fix and improve the warning message.
Updates: commit db831c167b7bf757aa79dbe3db5fa8c5fd8cfc99
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166618
Reported-by: Ming Xie
(cherry picked from commit ebfdca56bca69284f289e3db8a6e6baf6bc617f0)
---
output/create_libvirt_xml.ml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index e1c1f616..388fae5b 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -47,6 +47,10 @@ let get_osinfo_id = function
when major >= 8 ->
Some (sprintf "http://centos.org/centos/%d" major)
+ | { i_type = "linux"; i_distro = "rocky";
+ i_major_version = major; i_minor_version = minor } ->
+ Some (sprintf "http://rockylinux.org/rocky/%d.%d" major minor)
+
| { i_type = "linux"; i_distro = "sles";
i_major_version = major; i_minor_version = 0;
i_product_name = product } when String.find product "Desktop" >= 0 ->
@@ -140,7 +144,8 @@ let get_osinfo_id = function
| { i_type = typ; i_distro = distro;
i_major_version = major; i_minor_version = minor; i_arch = arch;
i_product_name = product } ->
- warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)")
+ warning (f_"get_osinfo_id: unknown guest operating system: \
+ %s %s %d.%d %s (%s)")
typ distro major minor arch product;
None
@@ -160,7 +165,6 @@ let create_libvirt_xml ?pool source inspect
| Some genid -> List.push_back body (e "genid" [] [PCData genid])
);
-
(match get_osinfo_id inspect with
| None -> ()
| Some osinfo_id ->

View File

@ -0,0 +1,42 @@
From 227313ca73d24eaaa0b82aca94de2278bca0f95b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 6 Feb 2023 12:13:25 +0000
Subject: [PATCH] convert: linux: Require host cpu for all RHEL-alike >= 9
RHEL >= 9 and compatible distros like Rocky >= 9 will not boot using
the default qemu CPU. You will see an error at boot:
Fatal glibc error: CPU does not support x86-64-v2
Instead you need to use -cpu host.
In commit f28757c6d1 ("convert_linux: set "gcaps_default_cpu = false"
for x86_64 RHEL-9.0+ guests") we fixed this specifically for RHEL >= 9.
This commit extends the same fix to all RHEL family distros.
Updates: commit f28757c6d100060c65212ea55cfa59d308dcb850
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166619
Reported-by: Ming Xie
Thanks: Laszlo Ersek
(cherry picked from commit 9f12b95bbe7bc2850ce4ba134c46a3cc5fd1167d)
---
convert/convert_linux.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index 41767e62..27bc4ae4 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -202,9 +202,9 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
(* RHEL >= 9.0 on x86_64 requires the processor to support the "x86-64-v2"
* microarchitecture level, which the default QEMU VCPU model does not
- * satisfy. Refer to RHBZ#2076013.
+ * satisfy. Refer to RHBZ#2076013 RHBZ#2166619.
*)
- let default_cpu_suffices = inspect.i_distro <> "rhel" ||
+ let default_cpu_suffices = family <> `RHEL_family ||
inspect.i_arch <> "x86_64" ||
inspect.i_major_version < 9 in

View File

@ -1,4 +1,4 @@
From c26749ef9c143412240cae87f34966adb2210aea Mon Sep 17 00:00:00 2001
From 6633c5ca0fe4d37ff4b8ffc62902074fa3b060fb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 28 Sep 2014 19:14:43 +0100
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode

View File

@ -1,4 +1,4 @@
From 6022f67501fcae3f2849b5bc944b8bb4509a068a Mon Sep 17 00:00:00 2001
From cf636bf489fd5a58f451c9da045cbcb856330bd7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 30 Sep 2014 10:50:27 +0100
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option

View File

@ -1,4 +1,4 @@
From 0058850e2c137a5f5d1336c2f549345f6859546f Mon Sep 17 00:00:00 2001
From a4ed97d92b38d2359475187c7ea3a42596cc4616 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Apr 2015 09:45:41 -0400
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu

View File

@ -1,4 +1,4 @@
From daff51e33e74128d0073fe52f9f0376237ad4d19 Mon Sep 17 00:00:00 2001
From ef9a020874b82945e07c61198149e3b566612a85 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 30 Aug 2015 03:21:57 -0400
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.

View File

@ -1,4 +1,4 @@
From 57f7e61ca112e9f512a0dcab39339cbc53868303 Mon Sep 17 00:00:00 2001
From 5703bf73a706dfc6a65075ff2ed5f544efa2a180 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 14:21:37 +0100
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)

View File

@ -1,4 +1,4 @@
From 0209277781f0e48428b6f58931cd2fbed592ecb5 Mon Sep 17 00:00:00 2001
From 4cc16f9bdf58f1036bd6ad67d6af2c0925e32a13 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 8 Mar 2017 11:03:40 +0100
Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203)

View File

@ -1,4 +1,4 @@
From 8fe419b8ca873501a71ffb03b7a4b2962701fe25 Mon Sep 17 00:00:00 2001
From f00e06aecd8e2040de6447e05fb721cb1f14720e Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Tue, 26 Mar 2019 09:42:25 +0100
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests

View File

@ -1,4 +1,4 @@
From bcb45753c95aab6e2ef2ae55b7675865a0cced70 Mon Sep 17 00:00:00 2001
From 5ef909eb4d65adb02f6f9170755813e3bd0ebb34 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Jun 2021 11:15:52 +0100
Subject: [PATCH] RHEL: Disable -o glance

View File

@ -1,4 +1,4 @@
From e1a0fb963052ff8231e48f267a0debbb8dbbdaf6 Mon Sep 17 00:00:00 2001
From ade0fd71c59b362ae7fd6cc07dd91eda9341eafe Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Dec 2021 11:56:05 +0000
Subject: [PATCH] RHEL: Remove the --in-place option

View File

@ -1,4 +1,4 @@
From a93517fa3cf0c371c8feff33fd01a2a54efac7ee Mon Sep 17 00:00:00 2001
From d6fc11c3f99f2f25b06d36d582d63702be802132 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:56:54 +0100
Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test

View File

@ -1,4 +1,4 @@
From 31781b620ba4721df6688bebce7a587c9afb43f4 Mon Sep 17 00:00:00 2001
From 86517b17be985cb234846c75680c144bf9ea2dd8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:58:09 +0100
Subject: [PATCH] RHEL 9: tests: Remove btrfs test

View File

@ -16,7 +16,7 @@
Name: virt-v2v
Epoch: 1
Version: 2.2.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPLv2+
@ -52,17 +52,19 @@ Patch0013: 0013-Split-long-lines-in-messages.patch
Patch0014: 0014-o-kubevirt-Implement-oo-compressed-for-qcow2-files.patch
Patch0015: 0015-v2v-Remove-use-of-anchored.patch
Patch0016: 0016-o-kubevirt-Replace-PCRE-anchored-with.patch
Patch0017: 0017-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0018: 0018-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0019: 0019-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0020: 0020-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0021: 0021-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0022: 0022-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0023: 0023-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0024: 0024-RHEL-Disable-o-glance.patch
Patch0025: 0025-RHEL-Remove-the-in-place-option.patch
Patch0026: 0026-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0027: 0027-RHEL-9-tests-Remove-btrfs-test.patch
Patch0017: 0017-o-libvirt-Add-correct-xmlns-libosinfo-for-Rocky-Linu.patch
Patch0018: 0018-convert-linux-Require-host-cpu-for-all-RHEL-alike-9.patch
Patch0019: 0019-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0020: 0020-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0021: 0021-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0022: 0022-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0023: 0023-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0024: 0024-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0025: 0025-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0026: 0026-RHEL-Disable-o-glance.patch
Patch0027: 0027-RHEL-Remove-the-in-place-option.patch
Patch0028: 0028-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0029: 0029-RHEL-9-tests-Remove-btrfs-test.patch
%if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no
@ -351,7 +353,7 @@ done
%changelog
* Thu Feb 02 2023 Richard W.M. Jones <rjones@redhat.com> - 1:2.2.0-4
* Mon Feb 06 2023 Richard W.M. Jones <rjones@redhat.com> - 1:2.2.0-5
- Rebase to virt-v2v 2.2.0
resolves: rhbz#2135762
- Copy drivers for Windows 11, Windows 2019 & Windows 2022
@ -378,6 +380,10 @@ done
resolves: rhbz#2162444
- Remove -oo qemu-boot option completely
resolves: rhbz#2166565
- Remove warning when converting Rocky Linux
resolves: rhbz#2166618
- Fix kernel panic after converting Rocky Linux 9
resolves: rhbz#2166619
* Thu Aug 18 2022 Laszlo Ersek <lersek@redhat.com> - 1:2.0.7-6
- Install qemu-ga package during conversion