lima icon indicating copy to clipboard operation
lima copied to clipboard

Test for QEMU version 7 or higher doesn't work on Enterprise Linux (RHEL, ...)

Open AmedeeBulle opened this issue 1 year ago • 7 comments

The following test doesn't work well for Enterprise Linux distributions:

https://github.com/lima-vm/lima/blob/70e681b1f3c942412eae43917dd34c41b8f8aab2/pkg/qemu/qemu.go#L358

$ qemu-system-aarch64 -version     
QEMU emulator version 8.0.0 (qemu-kvm-8.0.0-16.el9_3.3)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
$ qemu-system-aarch64 -machine help
Supported machines are:
virt                 RHEL 9.2.0 ARM Virtual Machine (alias of virt-rhel9.2.0)
virt-rhel9.2.0       RHEL 9.2.0 ARM Virtual Machine (default)
virt-rhel9.0.0       RHEL 9.0.0 ARM Virtual Machine
none                 empty machine

There is no "-7.0" string in qemu-system-aarch64 -machine help...

AmedeeBulle avatar Jun 04 '24 12:06 AmedeeBulle

It probably needs a better test, based on the actual version (in this case: 8.0.0)

  • https://github.com/lima-vm/lima/issues/320

afbjorklund avatar Jun 04 '24 13:06 afbjorklund

It is unfortunate that RHEL renames the "virt" machines, in their QEMU build

EDIT: Nope, they actually remove "virt" and add a custom "virt-rhel" machine.

Apparently they are doing this for all versions and architectures (also x86_64).

pc RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0)

q35 RHEL-8.6.0 PC (Q35 + ICH9, 2009) (alias of pc-q35-rhel8.6.0)

q35 RHEL-9.4.0 PC (Q35 + ICH9, 2009) (alias of pc-q35-rhel9.4.0)

afbjorklund avatar Jun 04 '24 13:06 afbjorklund

But the packages should only provide /usr/libexec/qemu-kvm, and not pretend to be (upstream) qemu

  • https://github.com/lima-vm/lima/discussions/1917

You might have to install the real qemu (from qemu.org) until this compatibility issue can be addressed.

afbjorklund avatar Jun 04 '24 13:06 afbjorklund

Background: I inadvertently found this by trying to run lima on EL9 on Raspberry Pi where it complained about -device ramfb. Drilled down in the code where I saw it was only intended for older QEMU...

AmedeeBulle avatar Jun 04 '24 13:06 AmedeeBulle

But the packages should only provide /usr/libexec/qemu-kvm

This is the case; I am symlinking to make it run and it runs fine on x86_64

AmedeeBulle avatar Jun 04 '24 13:06 AmedeeBulle

The best place to ask about this is qemu-devel or qemu-discuss mailing list:

  • https://lists.nongnu.org/mailman/listinfo/qemu-devel
  • https://lists.nongnu.org/mailman/listinfo/qemu-discuss

nirs avatar Sep 02 '24 00:09 nirs

In this case it was RHEL that renamed and renumbered the QEMU upstream.

afbjorklund avatar Sep 02 '24 05:09 afbjorklund