MAAS should install qemu-efi-aarch64 on arm64 KVM pods

Bug #1916073 reported by Lee Trager
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Undecided
Lee Trager
2.9
Won't Fix
Undecided
Lee Trager
qemu (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I used MAAS to deploy a VM host. When MAAS does this it installs the libvirt-daemon-system and libvirt-clients packages which pull in qemu-system-arm on ARM64. I tried to use MAAS to create a virtual machine but this failed with

Failed to open file '/usr/share/AAVMF/AAVMF_CODE.fd': No such file or directory

Manually installing the qemu-efi package fixes the issue.

AMD64 and PPC64 don't require the qemu-efi package because by default they don't emulate UEFI. Because ARM64 does emulate UEFI by default the qemu-efi package should be required by qemu-system-arm.

Related branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Lee o/,
qemu-efi is only a transitional anymore.
It depends on and was replaced by qemu-efi-aarch64.

And qemu-system-arm already has a Recommends on ... qemu-efi-aarch64, qemu-efi-arm

Since the default is to install Recommends that should already be no issue.

There are use cases for qemu-system-arm without qemu-efi-aarch64 and we had bugs and discussions that imply making it a Depends causes problems for others.

Therefore I wonder what happened that this wasn't pulled in by default.

I've double checked Focal / Hirsute (what release are you on BTW?)

root@test-qemu-dep-h:~# apt install qemu-system-arm | grep -- qemu-efi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

  publicsuffix qemu-block-extra qemu-efi-aarch64 qemu-efi-arm
  publicsuffix qemu-block-extra qemu-efi-aarch64 qemu-efi-arm qemu-system-arm
^C
root@test-qemu-dep-h:~# apt install libvirt-daemon-system | grep -- qemu-efi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

  qemu-block-extra qemu-efi-aarch64 qemu-efi-arm qemu-system-arm
  parted policykit-1 publicsuffix qemu-block-extra qemu-efi-aarch64
  qemu-efi-arm qemu-system-arm qemu-system-common qemu-system-data
^C

root@test-qemu-dep-f:~# apt install qemu-system-arm | grep -- qemu-efi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

  qemu-efi-aarch64 qemu-efi-arm qemu-system-common qemu-system-data
  qemu-efi-aarch64 qemu-efi-arm qemu-system-arm qemu-system-common
^C
root@test-qemu-dep-f:~# apt install libvirt-daemon-system | grep -- qemu-efi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

  qemu-efi-aarch64 qemu-efi-arm qemu-kvm qemu-system-arm qemu-system-common
  qemu-efi-aarch64 qemu-efi-arm qemu-kvm qemu-system-arm qemu-system-common
^C

You see it is pulled in from libvirt-daemon-system as well as from qemu-system-arm?

So we can't make it stronger (depends) and I can not reproduce it over here.
Something is different on your test environment, do you know what?

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
Diego Mascialino (dmascialino) wrote :

Hi Christhian,

I am working with Lee in the maas team.

We are testing this in the last published image for bionic:
http://images.maas.io/ephemeral-v3/stable/bionic/arm64/20210216/ga-18.04/generic/

ubuntu@arm64:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

ubuntu@arm64:~$ uname -a
Linux arm64 4.15.0-135-generic #139-Ubuntu SMP Mon Jan 18 17:40:29 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

ubuntu@arm64:~$ sudo apt install qemu-system-arm | grep -- qemu-efi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

ubuntu@arm64:~$

Thanks,
Diego

Revision history for this message
Lee Trager (ltrager) wrote :

ah I see whats going on. MAAS passes a list of packages for cloud-init to install. cloud-init doesn't install recommends. I'll add it to the package list in MAAS.

Changed in maas:
status: New → In Progress
assignee: nobody → Lee Trager (ltrager)
Changed in maas:
milestone: none → 2.10-beta1
status: In Progress → Fix Committed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Lee - ok that will be fixed in maas then - good to know.

@Diego - back then this was all rather new and many people "didn't want that EFI stuff installed as dependency :-)" Back then it was only a "suggests" via qemu-system-arm -suggest-> qemu-efi -depends-> qemu-efi-aarch64.

It also couldn't be anything else back then as qemu-efi-aarch64 is src:edk2 and that was only promotes in 2019 via bug 1570617. Back in bionic that wasn't in main yet.

dann frazier (dannf)
summary: - qemu-system-arm should depend on qemu-efi
+ MAAS should install qemu-efi-aarch64 on arm64 KVM pods
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.