no way to install "enough qemu for kvm" in a cross platform way

Bug #1389897 reported by Michael Hudson-Doyle
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
Undecided
Serge Hallyn
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
There is currently no way to install just enough qemu to have kvm work. On x86 you can install qemu-kvm, but even on the other architectures where this is built (e.g. armhf) it depends on qemu-system-x86. Or you can install qemu-system but that installs way more than you need.

[Test Case]
$ apt-get install qemu-kvm
This should pull in the appropriate qemu packages to run KVM on the host.

[Regression Risk]
This is a new package for some archs (arm64/powerpc/ppc64el), so that minimizes the risk of regression there. The biggest risk I see is if someone on armhf was using 'apt-get install qemu-kvm' as a shorthand for installing qemu-system-x86. It seems unlikely (read: very slow) for someone to try to be running emulated x86 on armhf. That said, the upgrade to this won't force qemu-system-x86 off of their system - it would just be a behavior change for new installs.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Here's a patch that does this, with help from Adam and Ben. You can see a more split out version at https://github.com/mwhudson/qemu/commits/qemu-kvm-arches.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "qemu-kvm-arches.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Adam Conrad (adconrad) wrote :

+1 (with extreme bias) on this from me. I'll give hallyn some time to review it, but if he doesn't get around to it, I'll just add a debian/changelog entry and sponsor this to vivid.

I also feel pretty strongly that we should SRU this back to utopic and trusty.

Changed in qemu (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Bah, my patch runs into the "dh_install can't rename a file" thing. Maybe using dh-exec in a .install file is the answer? I'll try to do that later, but I need to disappear for a few hours first...

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Here's another attempt. Also not build tested yet.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

And finally one that builds a package that doesn't scare lintian.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Michael. It looks good to me. The one thing that concerns me is the multiple kvm scripts instead of one which chooses wha tto run based on $arch. But we can always consolidate those later if we end up actually wanting ot make updates.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Fair enough. I should say that the reason I filed this bug and tried my hand at a fix is so that devstack can just install the qemu-kvm package on any architecture to get enough qemu to make libvirt happy -- devstack/libvirt doesn't use the kvm wrapper script so I only did that bit to keep Adam happy :) (IOW, _I_ would be happy with just this change: https://github.com/mwhudson/qemu/commit/022509bc0cc79fa38bae3b57e947826f10f47ce2 )

Revision history for this message
Adam Conrad (adconrad) wrote :

Having one kvm script with cases per arch is more fiddly. Do you use uname -m, or dpkg arch? If uname, does that mean the behaviour of qemu-kvm:arch changes depending on which kernel its run on, not depending on the userspace arch? Might be counterintuitive. Etc, etc.

But you might be right that (like the ppc variant) that's the way to go ultimately.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 2.1+dfsg-4ubuntu8

---------------
qemu (2.1+dfsg-4ubuntu8) vivid; urgency=medium

  * Support qemu-kvm on x32, arm64, ppc64 and pp64el architectures
    (LP: #1389897) (Patch thanks to mwhudson, BenC, and infinity)
 -- Serge Hallyn <email address hidden> Tue, 11 Nov 2014 15:51:47 -0600

Changed in qemu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu (Ubuntu Trusty):
status: New → Confirmed
Changed in qemu (Ubuntu Utopic):
status: New → Confirmed
dann frazier (dannf)
no longer affects: qemu (Ubuntu Utopic)
dann frazier (dannf)
description: updated
Revision history for this message
dann frazier (dannf) wrote :
Revision history for this message
dann frazier (dannf) wrote :

SRU regression test results:

ubuntu@ip-10-180-202-218:~/qa-regression-testing/scripts$ ./test-qemu.py
Skipping private tests
WARN: could not find 'libvirt/qatest.tar.bz2'. Some tests will be skipped
Please see qemu/README.qatest-virtio for more information.

  add dummy drive
  delete dummy drive (drive_del)
  hotplug scsi drive
  hotunplug scsi drive (drive_del)
  hotplug virtio drive
  hotunplug virtio drive (drive_del)
..
  block (libvirt/qatest/qatest.qcow2)
  blockstats (ide0-hd0: rd_bytes=)
  chardev (chardevmon: filename=null)
  chardev (filename=tcp:127.0.0.1:4444,server)
  cpus (* CPU #0: )
  history (: 'info block')
  jit (Translation buffer state)
  mice (QEMU PS/2 Mouse)
  name (qatest-vm)
  network (user.0: index=0,type=user,net=10)
  numa (0 nodes)
  pci (Bridge: PCI device)
  pci (Host bridge: PCI device)
  pci (IDE controller: PCI device)
  pci (ISA bridge: PCI device)
  pci (VGA controller: PCI device)
  qdm (virtio-blk-pci)
  qdm (virtio-net-pci)
  qtree (bus: main-system-bus)
  registers (EAX=)
  registers (EIP=)
  roms (name=)
  status (VM status: running)
  usb (info usb)
  usernet (VLAN 0 (user.0))
  uuid (ded3a46b-bb60-43f4-8113-d041aeb93cdf)
  version ((qemu)
...
  create snapshot
  start with -drive file=<snapshot>
  stop and verify backing store
  start with -snapshot
  stop and verify backing store
...
  cow
  qcow
  qcow2
  vdi
  vmdk
  vpc
.
  cow
  qcow
  qcow2
  vdi
  vmdk
  vpc
....
  AC97
  ES1370
  VGA
  cirrus-vga
  e1000
  hda-duplex (skipping start)
  hda-output (skipping start)
  i6300esb
  i82550
  i82551
  i82557a
  i82557b
  i82557c
  i82558a
  i82558b
  i82559a
  i82559b
  i82559c
  i82559er
  i82562
  i82801
  ib700
  ich9-ahci
  ide-cd (skipping start)
  ide-drive (skipping start)
  ide-hd (skipping start)
  intel-hda
  ioh3420
  isa-applesmc
  isa-debugcon (skipping start)
  isa-ide (skipping start)
  isa-parallel (skipping start)
  isa-serial (skipping start)
  ivshmem (skipping start)
  lsi53c895a
  ne2k_isa (skipping start)
  ne2k_pci
  pci-ohci
  pcnet
  piix3-usb-uhci
  piix4-usb-uhci
  rtl8139
  sb16
  scsi-cd (skipping start)
  scsi-disk (skipping start)
  scsi-generic (skipping start)
  scsi-hd (skipping start)
  usb-braille (skipping start)
  usb-bt-dongle (skipping start)
  usb-host
  usb-hub
  usb-kbd
  usb-mouse
  usb-net
  usb-serial (skipping start)
  usb-storage (skipping start)
  usb-tablet
  usb-wacom-tablet
  virtconsole (skipping start)
  virtio-9p-pci (skipping start)
  virtio-balloon-pci
  virtio-blk-pci (skipping start)
  virtio-net-pci
  virtio-serial-pci
  virtserialport (skipping start)
  vmware-svga
  vt82c686b-usb-uhci
  x3130-upstream
  xio3130-downstream
.
  pc
  isapc
  pc-0.10
  pc-0.11
  pc-0.12
  pc-0.13
  pc-0.14
.
----------------------------------------------------------------------
Ran 15 tests in 308.960s

OK

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted qemu into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/2.0.0+dfsg-2ubuntu1.16 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 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, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in qemu (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
dann frazier (dannf) wrote :
Download full text (27.7 KiB)

Verification:

dannf@mustang:~$ lxc launch trusty lp1389897
Creating container...done
Starting container...done
dannf@mustang:~$ lxc exec lp1389897 -- /bin/bash
root@lp1389897:~# echo 'deb http://ports.ubuntu.com/ubuntu-ports trusty-proposed main' | tee -a /etc/apt/sources.list
deb http://ports.ubuntu.com/ubuntu-ports trusty-proposed main
root@lp1389897:~# apt-get update && apt-get install qemu-kvm -y
Ign http://ports.ubuntu.com trusty InRelease
Ign http://ports.ubuntu.com trusty-updates InRelease
Ign http://ports.ubuntu.com trusty-security InRelease
Ign http://ports.ubuntu.com trusty-proposed InRelease
Hit http://ports.ubuntu.com trusty Release.gpg
Get:1 http://ports.ubuntu.com trusty-updates Release.gpg [933 B]
Get:2 http://ports.ubuntu.com trusty-security Release.gpg [933 B]
Get:3 http://ports.ubuntu.com trusty-proposed Release.gpg [933 B]
Hit http://ports.ubuntu.com trusty Release
Get:4 http://ports.ubuntu.com trusty-updates Release [63.5 kB]
Get:5 http://ports.ubuntu.com trusty-security Release [63.5 kB]
Get:6 http://ports.ubuntu.com trusty-proposed Release [211 kB]
Hit http://ports.ubuntu.com trusty/main arm64 Packages
Hit http://ports.ubuntu.com trusty/restricted arm64 Packages
Hit http://ports.ubuntu.com trusty/universe arm64 Packages
Hit http://ports.ubuntu.com trusty/multiverse arm64 Packages
Hit http://ports.ubuntu.com trusty/main Translation-en
Hit http://ports.ubuntu.com trusty/multiverse Translation-en
Hit http://ports.ubuntu.com trusty/restricted Translation-en
Hit http://ports.ubuntu.com trusty/universe Translation-en
Get:7 http://ports.ubuntu.com trusty-updates/main arm64 Packages [482 kB]
Get:8 http://ports.ubuntu.com trusty-updates/restricted arm64 Packages [28 B]
Get:9 http://ports.ubuntu.com trusty-updates/universe arm64 Packages [283 kB]
Get:10 http://ports.ubuntu.com trusty-updates/multiverse arm64 Packages [9391 B]
Get:11 http://ports.ubuntu.com trusty-updates/main Translation-en [288 kB]
Hit http://ports.ubuntu.com trusty-updates/multiverse Translation-en
Get:12 http://ports.ubuntu.com trusty-updates/restricted Translation-en [3560 B]
Get:13 http://ports.ubuntu.com trusty-updates/universe Translation-en [160 kB]
Get:14 http://ports.ubuntu.com trusty-security/main arm64 Packages [262 kB]
Get:15 http://ports.ubuntu.com trusty-security/restricted arm64 Packages [28 B]
Get:16 http://ports.ubuntu.com trusty-security/universe arm64 Packages [106 kB]
Get:17 http://ports.ubuntu.com trusty-security/multiverse arm64 Packages [1660 B]
Get:18 http://ports.ubuntu.com trusty-security/main Translation-en [178 kB]
Hit http://ports.ubuntu.com trusty-security/multiverse Translation-en
Hit http://ports.ubuntu.com trusty-security/restricted Translation-en
Get:19 http://ports.ubuntu.com trusty-security/universe Translation-en [65.6 kB]
Get:20 http://ports.ubuntu.com trusty-proposed/main arm64 Packages [133 kB]
Get:21 http://ports.ubuntu.com trusty-proposed/main Translation-en [74.6 kB]
Fetched 2388 kB in 10s (233 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done...

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

This bug was fixed in the package qemu - 2.0.0+dfsg-2ubuntu1.16

---------------
qemu (2.0.0+dfsg-2ubuntu1.16) trusty; urgency=medium

  * Support qemu-kvm on x32, arm64, ppc64 and pp64el architectures
    (LP: #1389897) (Patch thanks to mwhudson, BenC, and infinity)
  * debian/control-in: Add kvm-ipxe-precise to qemu-system-x86's Suggests
    field to match debian/control. Without this, this relationship gets
    dropped when debian/control is regenerated.

 -- dann frazier <email address hidden> Wed, 05 Aug 2015 08:28:04 -0600

Changed in qemu (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for qemu has completed successfully and the package has now been 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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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