Skip to content

Commit

Permalink
convert: linux: Require host cpu for all RHEL-alike >= 9
Browse files Browse the repository at this point in the history
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 f28757c ("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 f28757c
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166619
Reported-by: Ming Xie
Thanks: Laszlo Ersek
  • Loading branch information
rwmjones committed Feb 6, 2023
1 parent ebfdca5 commit 9f12b95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions convert/convert_linux.ml
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ let convert (g : G.guestfs) source inspect i_firmware 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

Expand Down

0 comments on commit 9f12b95

Please sign in to comment.