better upgrading machine types

Bug #1637936 reported by Christian Ehrhardt 
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Server Guide
Fix Released
Undecided
Christian Ehrhardt 
qemu (Ubuntu)
Fix Released
High
Christian Ehrhardt 

Bug Description

Opening a bug in reference to the discussion at https://lists.ubuntu.com/archives/ubuntu-server/2016-October/007420.html

We should consider
- adding more documentation to https://help.ubuntu.com/lts/serverguide/libvirt.html#libvirt-management
  - what are machine types TL;DR
  - how to handle updates (why manually, best practise, ...)
  - what to do when old type is no more around
- on qemu/libvirt upgrade scan for old-now-unsupported types and in case prompt the user to follow the documentation to consider updating as suitable for him
  - that scanning might be hard and error prone so be careful
  - we have a fallback by making the libvirt error more readable and by that it should show up whenever anything is started via libvirt (maybe even point to the doc)

Related branches

Changed in qemu (Ubuntu):
status: New → Confirmed
Changed in serverguide:
status: New → Confirmed
Changed in qemu (Ubuntu):
importance: Undecided → High
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I further extended the doc on upgrading the type that I already had at the wiki: https://wiki.ubuntu.com/QemuKVMMigration#Upgrade_machine_type

I adapted the serverguide to contain that and some related missing libvirt content which is now up for review at https://code.launchpad.net/~paelzer/serverguide/serverguide-16.04-enhance-virt/+merge/309849

Now looking into the experiment if there could be a more "readable" error message.

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

I setup a local case to test:
Xenial sys
Create Guest
Make it "old" e.g. vivid type
Upgrade to Yakkety
(Could as well just add an old type in Y, but for the sake of reproducing the most ususal case)
Try to start "old" guest

Error out of the Box:
$virsh start old-guest-type
error: Failed to start domain old-guest-type
error: internal error: process exited while connecting to monitor: 2016-11-02T13:43:11.676198Z qemu-system-x86_64: -enable-kvm: unsupported machine type
Use -machine help to list supported machines

The same message is shown in graphical libvirt exploiters like virt-manager.
That is good, as it means we can likely fix all libvirt consuming tools in one place.

That message itself is from qemu - so it can as well become part of the type changing delta.

I created an experimental fix and tested it in a local KVM.
$ virsh start wrong-guest-type
It now behaves as befor on "wrong types", but reports what the failing type was.
error: Failed to start domain wrong-guest-type
error: internal error: process exited while connecting to monitor: 2016-11-02T15:04:48.396884Z qemu-system-x86_64: -enable-kvm: unsupported machine type 'pc-i440fx-blubber'
Use -machine help to list supported machines

On unsupported distro specific types it now hints at the case and solutions.
$ virsh start old-guest-type
error: Failed to start domain old-guest-type
error: internal error: process exited while connecting to monitor: 2016-11-02T15:04:53.521081Z qemu-system-x86_64: -enable-kvm: unsupported machine type 'pc-i440fx-vivid'
Use -machine help to list supported machines
The type is too old and out of support now
Please study https://wiki.ubuntu.com/QemuKVMMigration#Upgrade_machine_type how toupgrade machine types

As intended it even works on virt-manager and such.

I provided a ppa with the same at https://launchpad.net/~paelzer/+archive/ubuntu/bug-1637936-qemu
Could someone other than me please check if that would fulfill the need?

Changed in serverguide:
assignee: nobody → ChristianEhrhardt (paelzer)
Changed in qemu (Ubuntu):
assignee: nobody → ChristianEhrhardt (paelzer)
status: Confirmed → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Changed in serverguide:
status: Confirmed → Fix Committed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I was working with the ppa version for quite a while now and found no issue.
Due to already being in the error path the chance for regressions should be minimal.

That said I did some more explicit tests today which worked as well and uploaded to Zesty now.
Being only an improved error message I don't think it qualifies all too much for an SRU.

Now I'm waiting to see if the build and migration into archive work without issues as they did locally ...

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

FYI - deleted the ppa

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

This bug was fixed in the package qemu - 1:2.6.1+dfsg-0ubuntu6

---------------
qemu (1:2.6.1+dfsg-0ubuntu6) zesty; urgency=medium

  * d/p/ubuntu/define-ubuntu-machine-types.patch: add a hint if instantiating
     fails due to now unsupported very old guest types (LP: #1637936).

 -- Christian Ehrhardt <email address hidden> Wed, 02 Nov 2016 15:12:28 +0100

Changed in qemu (Ubuntu):
status: Triaged → Fix Released
Changed in serverguide:
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.