microvm is not the default type for qemu-system-x86_64-microvm >=qemu5.2

Bug #1936894 reported by Christian Ehrhardt 
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
Undecided
Christian Ehrhardt 

Bug Description

[Impact]

 * A change of the build system has caused a configuration change
   to be ignored. Due to that the defaults of the machine type are
   no more correct.

 * With the default set (in hirsute) you no more needed -M microvm as an
   argument as this was the default. But by losing this default upgrades
   from there will fail to start the microvm now.

 * The fix is trivial and ensures that the type is known when built
   with meson

[Test Plan]

 * Run this:
   $ qemu-system-x86_64-microvm -M ? | grep -e 'default' -e 'microvm'

  That is the special reduced build for microvms. It currently reports

  microvm microvm (i386)
  pc-i440fx-hirsute Ubuntu 21.04 PC (i440FX + PIIX, 1996) (default)

  But it should report

  microvm microvm (i386) (default)

[Where problems could occur]

 * Of the many things that qemu does this only affects qemu-system-x86_64-
   microvm which is a special build
   (https://cpaelzer.github.io/blogs/009-microvm-in-ubuntu/)
   So the use cases of that could be affected.

[Other Info]

 * Usually examples list to specify the type explicitly, and everyone
   doing so did not have a problem due to that missed default type.

---

In Focal microvm worked and it was a fine addition for those that wanted to try this approach (mature solution of qemu/kvm reduced for a specific use case) to minimal VMs compared to the new projects (very use-case dedicated, but therefore missing quite some features) that spawned.

But it turns out the configuration to make it a default is broken since qemu 5.2.

Correct (Focal)
root@f:~# qemu-system-x86_64-microvm -M ? | grep -e 'default' -e 'microvm'
microvm microvm (i386) (default)

Broken (Groovy and later)
root@i-kvm:~# qemu-system-x86_64-microvm -M ? | grep -e 'default' -e 'microvm'
microvm microvm (i386)
pc-i440fx-impish Ubuntu 21.10 PC (i440FX + PIIX, 1996) (default)

If you follow the guide
  https://cpaelzer.github.io/blogs/009-microvm-in-ubuntu/
It is still usable and that might explain why - even not being the prime use case - we had zero reports of this so far.
The reason for the latter is that explicitly stating -M microvm (common) overcomes the issue and so do a few combinations with -nodefaults.

Thanks to Michael Torkaev for spotting and also fixing this.
But we should backport this as an SRU.

TODOs to call this bug fixed:
- add a testcase to the regression tests
- SRU the fix

Related branches

Changed in qemu (Ubuntu):
status: New → Triaged
description: updated
description: updated
tags: added: server-next
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Fixed by
commit 3f9e518010693a98f23f50ea45f98837204c597e
Author: Michael Tokarev <email address hidden>
Date: Tue Jul 20 08:56:48 2021 +0300

    fix microvm default machine type for a new build system (LP#1936894)

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

Working in impish on a PPA, some more testing needed to be released.

Changed in qemu (Ubuntu):
status: Triaged → Fix Committed
Changed in qemu (Ubuntu Hirsute):
status: New → Triaged
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.3 KiB)

This bug was fixed in the package qemu - 1:6.0+dfsg-2expubuntu1

---------------
qemu (1:6.0+dfsg-2expubuntu1) impish; urgency=medium

  * Merge with Debian experimental, remaining changes:
    - qemu-kvm to systemd unit
      - d/qemu-kvm-init: script for QEMU KVM preparation modules, ksm,
        hugepages and architecture specifics
      - d/qemu-system-common.qemu-kvm.service: systemd unit to call
        qemu-kvm-init
      - d/qemu-system-common.install: install helper script
      - d/qemu-system-common.qemu-kvm.default: defaults for
        /etc/default/qemu-kvm
      - d/rules: call dh_installinit and dh_installsystemd for qemu-kvm
    - Distribution specific machine type
      (LP: 1304107 1621042 1776189 1761372 1761372 1776189)
      - d/p/ubuntu/define-ubuntu-machine-types.patch: define distro machine
        types containing release versioned machine attributes
      - d/qemu-system-x86.NEWS Info on fixed machine type defintions
        for host-phys-bits=true
      - Add an info about -hpb machine type in debian/qemu-system-x86.NEWS
      - ubuntu-q35 alias added to auto-select the most recent q35 ubuntu type
    - Enable nesting by default
      - d/p/ubuntu/enable-svm-by-default.patch: Enable nested svm by default
        in qemu64 on amd
        [ No more strictly needed, but required for backward compatibility ]
    - improved dependencies
      - Make qemu-system-common depend on qemu-block-extra
      - Make qemu-utils depend on qemu-block-extra
    - tolerate ipxe size change on migrations to >=18.04 (LP: 1713490)
      - d/p/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch: old machine types
        reference 256k path
      - d/control-in: depend on ipxe-qemu-256k-compat-efi-roms to be able to
        handle incoming migrations from former releases.
    - d/qemu-system-x86.README.Debian: add info about updated nesting changes
    - d/control*, d/rules: disable xen by default, but provide universe
      package qemu-system-x86-xen as alternative
      [includes compat links changes of 5.0-5ubuntu4]
    - d/p/ubuntu/enable-svm-by-default.patch: update to match v6.0
    - d/p/ubuntu/define-ubuntu-machine-types.patch: add ubuntu machine types
      for v6.0
    - d/p/ubuntu/lp-1929926-*: avoid segfaults by uretprobes (LP 1929926)
    - Ease the use of module retention on upgrades (LP 1913421)
      - debian/qemu-block-extra.postinst: enable mount unit on install/upgrade
  * Dropped Changes [in 1:6.0+dfsg-2exp]:
    - d/control-in: Disable capstone disassembler library support (universe)
    - Disable fuse export (universe dependency)
    - Ease the use of module retention on upgrades (LP 1913421)
      - d/run-qemu.mount, d/rules: provide run-qemu.mount in qemu-block-extra
      - d/rules: only save modules if /run/qemu isn't noexec
      - d/rules: clear all (current and former) modules on purge
    - d/control: qemu 6.0 broke libvirt <7.2 add a breaks to avoid partial
      upgrade issues (LP 1932264)
    - Enable SDL as secondary UI backend (LP 1256185)
      - d/control: add build dependency libsdl2-dev
      - d/control: enable sdl graphics on build
      - d/qemu-system-gui.install: add ui-sdl.so
      - d/control: add run...

Read more...

Changed in qemu (Ubuntu):
status: Fix Committed → Fix Released
Changed in qemu (Ubuntu Hirsute):
assignee: nobody → Christian Ehrhardt  (paelzer)
description: updated
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Christian, or anyone else affected,

Accepted qemu into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:5.2+dfsg-9ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in qemu (Ubuntu Hirsute):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (qemu/1:5.2+dfsg-9ubuntu3.2)

All autopkgtests for the newly accepted qemu (1:5.2+dfsg-9ubuntu3.2) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-image/1.11+21.04ubuntu2 (amd64)
casper/1.461 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/hirsute/update_excuses.html#qemu

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

FYI the test issues were just flaky tests and are resolved by now.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (4.1 KiB)

Pre update
root@h:~# qemu-system-x86_64-microvm -M ? | grep -e 'default' -e 'microvm'
microvm microvm (i386)
pc-i440fx-hirsute Ubuntu 21.04 PC (i440FX + PIIX, 1996) (default)

Upgrade
apt install qemu-system-x86
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  qemu-block-extra qemu-system-common qemu-system-data qemu-system-gui qemu-utils
Suggested packages:
  samba vde2 debootstrap
The following packages will be upgraded:
  qemu-block-extra qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 qemu-utils
6 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 1024 B disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-utils amd64 1:5.2+dfsg-9ubuntu3.2 [1262 kB]
Get:2 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-system-common amd64 1:5.2+dfsg-9ubuntu3.2 [1697 kB]
Get:3 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-system-gui amd64 1:5.2+dfsg-9ubuntu3.2 [38.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-system-data all 1:5.2+dfsg-9ubuntu3.2 [1109 kB]
Get:5 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-block-extra amd64 1:5.2+dfsg-9ubuntu3.2 [50.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 qemu-system-x86 amd64 1:5.2+dfsg-9ubuntu3.2 [8478 kB]
Fetched 12.6 MB in 2s (7536 kB/s)
(Reading database ... 48802 files and directories currently installed.)
Preparing to unpack .../0-qemu-utils_1%3a5.2+dfsg-9ubuntu3.2_amd64.deb ...
Unpacking qemu-utils (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Preparing to unpack .../1-qemu-system-common_1%3a5.2+dfsg-9ubuntu3.2_amd64.deb ...
Unpacking qemu-system-common (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Preparing to unpack .../2-qemu-system-gui_1%3a5.2+dfsg-9ubuntu3.2_amd64.deb ...
Unpacking qemu-system-gui:amd64 (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Preparing to unpack .../3-qemu-system-data_1%3a5.2+dfsg-9ubuntu3.2_all.deb ...
Unpacking qemu-system-data (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Preparing to unpack .../4-qemu-block-extra_1%3a5.2+dfsg-9ubuntu3.2_amd64.deb ...
Unpacking qemu-block-extra (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Preparing to unpack .../5-qemu-system-x86_1%3a5.2+dfsg-9ubuntu3.2_amd64.deb ...
Unpacking qemu-system-x86 (1:5.2+dfsg-9ubuntu3.2) over (1:5.2+dfsg-9ubuntu3.1) ...
Setting up qemu-system-data (1:5.2+dfsg-9ubuntu3.2) ...
Setting up qemu-system-x86 (1:5.2+dfsg-9ubuntu3.2) ...
Setting up qemu-block-extra (1:5.2+dfsg-9ubuntu3.2) ...
Setting up qemu-system-common (1:5.2+dfsg-9ubuntu3.2) ...
Setting up qemu-system-gui:amd64 (1:5.2+dfsg-9ubuntu3.2) ...
Setting up qemu-utils (1:5.2+dfsg-9ubuntu3.2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.4-2) ...
Scanning processes... ...

Read more...

tags: added: verification-done verification-done-hirsute
removed: verification-needed verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:5.2+dfsg-9ubuntu3.2

---------------
qemu (1:5.2+dfsg-9ubuntu3.2) hirsute; urgency=medium

  * d/rules fix microvm default machine type for a new build system
    (LP: #1936894) - Thanks to Michael Tokarev for the fix.
  * enhance loading of old modules post upgrade (LP: #1913421)
    - d/rules: clear all (current and former) modules on purge
    - d/rules: test for exec and prepare /var/run/qemu if needed

 -- Christian Ehrhardt <email address hidden> Thu, 19 Aug 2021 11:25:17 +0200

Changed in qemu (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for qemu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.