Guest clock stops after live migration on Ubuntu 12.04 hosts

Bug #1001625 reported by Holger Mauermann on 2012-05-19
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Medium
Unassigned
Precise
Undecided
Unassigned
Quantal
Medium
Unassigned

Bug Description

========================================
Note - when SRU'd, we should add a note to the 12.04.1 release notes
SRU Justification:
1. Impact: pc-0.12 machine type fails to migrate in precise, fails
   to work with wmvga, as well as probably several other bugs
2. Development fix:
3. Stable fix: same as development fix
4. Test case: define and start a pc-0.12 VM (as per https://wiki.ubuntu.com/SergeHallyn_libvirtnest). Check libvirt.log for warning messages. Run /usr/sbin/libvirt-migrate-qemu-machinetype. Check "virsh dumpxml cdboot | grep machine=" for pc-1.0.
5. Regression potential: The libvirt-mirate-qemu-machinetype script, if it misbehaves, could cause VM definitions to be broken.
========================================

Just upgraded my virtualization hosts from Ubuntu 11.10 to 12.04. However, I noticed that the clock in the guests completely stops after live migration from one host to another. In addition, migrated guests hang on shutdown or reboot - only 'virsh destroy' helps.

Live migration always worked great for me on Ubuntu 10.04 to 11.10, I never had any problems. What has changed in 12.04???

Guest are Ubuntu 11.04, 11.10 and 12.04.

Hosts are Ubuntu 12.04 LTS x86_64 running kernel 3.2.0-24-generic

# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

# apt-cache policy qemu-kvm
qemu-kvm:
  Installed: 1.0+noroms-0ubuntu13
  Candidate: 1.0+noroms-0ubuntu13
  Version table:
 *** 1.0+noroms-0ubuntu13 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Changed in qemu-kvm (Ubuntu):
importance: Undecided → Medium
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. I'll try to reproduce.

Could you post the xml file for one of the domains that fails to migrate?

Could you edit /etc/libvirt/libvirtd.conf on both hosts to set log_level = 1, then restart libvirtd (sudo stop libvirt-bin; sudo start libvirt-bin), re-try the migration, and post the /var/log/libvirt/libvirtd.log and /var/log/libvirt/qemu/VMNAME.log files?

Holger Mauermann (mauermann) wrote :

Today I created a new guest machine, and migration works for it! So I compared xml files from old and new guests and noticed the difference

<type arch='x86_64' machine='pc-0.12'>hvm</type> (old guests)
vs.
<type arch='x86_64' machine='pc-1.0'>hvm</type> (new guest)

I changed all guest configs to pc-1.0 and now migration is working again.

Serge Hallyn (serge-hallyn) wrote :

Thanks for that.

The pc-0.12 machine type is causing quite a few problems. We need to find a way of dealing with this automatically.

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
Serge Hallyn (serge-hallyn) wrote :

After discussion on irc, I think we'll (1) detect pc-0.12 at VM definition and start, and output a message to the log file suggesting updating to pc-1.0 on precise. (2) offer a script to automatically update 0.12 machines to 1.0. and (3) And update the release notes to warn about 0.12.

Serge Hallyn (serge-hallyn) wrote :

Here is a debdiff which
   1. adds a warning when a pc-0.12 VM is defined or started
   2. adds a script to allow users to easily update VMs

description: updated
tags: added: patch
affects: qemu-kvm (Ubuntu) → libvirt (Ubuntu)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.12-0ubuntu2

---------------
libvirt (0.9.12-0ubuntu2) quantal; urgency=low

  * Warn user about bad pc-0.12 machine type, and help user transition.
    (LP: #1001625)
    - qemu-warn-on-pc-0.12.patch: When defining or starting a VM which uses the
      pc-0.12 machine type, warn in libvirtd.log.
    - debian/libvirt-migrate-qemu-machinetype: automatically migrate QEMU VMs
      to newest machine type. This is not done automatically as there will
      be some users who have good reason to stay with pc-0.12.
 -- Serge Hallyn <email address hidden> Mon, 28 May 2012 17:48:50 +0000

Changed in libvirt (Ubuntu Quantal):
status: Confirmed → Fix Released

Hello Holger, or anyone else affected,

Accepted libvirt into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/0.9.8-2ubuntu17.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 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 change the bug tag from verification-needed to verification-done. If it does not, 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 libvirt (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Serge Hallyn (serge-hallyn) wrote :

Verified on precise,

libvirtd.log shows

2012-07-16 14:38:38.038+0000: 1714: warning : qemudCanonicalizeMachineFromInfo:4793 : Defining machine cdboot as type pc-0.12. We suggest a newer type.
2012-07-16 14:38:38.038+0000: 1714: warning : qemudCanonicalizeMachineFromInfo:4794 : Please see the libvirt-migrate-qemu-machinetype(1) manpage.

and 'libvirt-migrate-qemu-machinetype -a' converted a pc-0.12 VM to pc-1.0.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.8-2ubuntu17.2

---------------
libvirt (0.9.8-2ubuntu17.2) precise-proposed; urgency=low

  * debian/libvirt-bin.install, debian/rules: name the apport file
    source_libvirt.py, not source_libvirt-bin.py. (LP: #1007405)
  * install /etc/dnsmasq.d/libvirt to configure system wide dnsmasq to not
    listen on the libvirt bridge. (Following Stéphane's lxc example)
    (LP: #928524) (LP: #231060)
    - postinst: restart dnsmasq; postrm: remove dnsmasq.d/libvirt file and
      restart dnsmasq; rules, libvirt-bin.dirs and libvirt-bin.install:
      install new debian/libvirt-bin.dnsmasq file.
  * Warn user about bad pc-0.12 machine type, and help user transition.
    (LP: #1001625)
    - qemu-warn-on-pc-0.12.patch: When defining or starting a VM which uses the
      pc-0.12 machine type, warn in libvirtd.log.
    - debian/libvirt-migrate-qemu-machinetype: automatically migrate QEMU VMs
      to newest machine type. This is not done automatically as there will
      be some users who have good reason to stay with pc-0.12.
 -- Serge Hallyn <email address hidden> Mon, 11 Jun 2012 21:52:02 -0500

Changed in libvirt (Ubuntu Precise):
status: Fix Committed → Fix Released

Hey guys,

there is a anoying bug in libvirt-migrate-qemu-machinetype. It will remove the vnc password from any changed xml. Reason: the script triggers "virsh dumpxml", this command doesn't return the vnc password.

virsh should be able to also return the password with "virsh dumpxml domain-id --security-info", but in fact this also doesn't sent the password.

Environment:
~ # virsh version
Compiled against library: libvir 0.9.8
Using library: libvir 0.9.8
Using API: QEMU 0.9.8
Running hypervisor: QEMU 1.0.0
~ # dpkg-query -W $version qemu-kvm libvirt-bin
libvirt-bin 0.9.8-2ubuntu17.18
qemu-kvm 1.0+noroms-0ubuntu14.14

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers