Migration fails between QEMU 1.5 and QEMU 2.0
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Ubuntu Cloud Archive |
Undecided
|
Unassigned | ||
| | libvirt (Ubuntu) |
High
|
Unassigned | ||
| | Trusty |
High
|
Unassigned | ||
| | qemu (Ubuntu) |
High
|
Unassigned | ||
| | Trusty |
High
|
Unassigned | ||
Bug Description
=======
SRU Justification:
Note: This fix is not applicable to vivid, because we only support migration from LTS->LTS, so from 12.04 to 14.04. Therefore a fix is only needed for 14.04
Impact: live migration of VMS from a 12.04+UCA host to 14.04 fail.
Regression potential: the patches to fix this are very similar in nature to those already in the archive for bug 1291321. Therefore we are reasonable sure they should be safe.
Test case: See below. (Start a VM of machine type pc-i440fx-1.5 on a 12.04+UCA host, and migrate it to a 14.04 host)
Note, for the fix to work, both qemu and libvirt must have the fix.
=======
This bug looks to be very similar to bug #1291321.
The source host runs 12.04 Precise with Ubuntu Cloud Archive. This means we have access to more recent QEMU packages.
The source host has QEMU 1.5 installed. (the package looks to be backported from 13.10 Saucy by UCA)
The destination host is running 14.04 Trusty with QEMU 2.0.
The machine type used by the instance I tried to live migrate is 'pc-i440fx-1.5'. (which looks to be the new default in QEMU 1.5)
When performing a live migration from QEMU 1.5 to QEMU 2.0, the migration fails with this error on the destination host:
Length mismatch: 0000:00:
qemu: warning: error while loading state for instance 0x0 of device 'ram'
My hypothesis is that QEMU 1.5 was built against the qemu-kvm source tree. As mentionned in bug #1291321, the machine types defined in qemu-kvm are not compatible with the ones defined in qemu. This means the source 'pc-i440fx-1.5' mahine type is not compatible with the destination 'pc-i440fx-1.5' machine type.
A workaround has been introduced in QEMU 2.0 to allow incoming qemu-kvm instances (pc-1.0) to be properly translated to pc-1.0-precise) using the allow_incoming_
But since the default machine type changed between QEMU 1.0 (pc-1.0) and 1.5 (pc-i440fx-1.5), the above workaround doesn't work for people running QEMU 1.5 introduced by UCA.
This means people with QEMU 1.5 on 12.04 Precise are stuck with instances they cannot migrate to a host running the latest LTS without destructive steps.
| Serge Hallyn (serge-hallyn) wrote : | #2 |
I don't think this is something that can be addressed in the Ubuntu archive. It sounds like something that'll need to be fixed in the cloud archive.
| Mathieu Gagné (mgagne) wrote : | #3 |
Serge, QEMU 2.0 is part of 14.04 Trusty. (which coincidentally happens to be the source of backports in UCA)
Irregardless of UCA, people with 13.10 Saucy won't be able to upgrade to the latest supported LTS.
| Mathieu Gagné (mgagne) wrote : | #4 |
To make the migration work, you need to:
- Create a qemu-kvm compatible machine type for pc-i440fx-1.5. Lets call it pc-i440fx-
- Override cirrus-
- Override virtio-
- Patch libvirt to translate pc-i440fx-1.5 to pc-i440fx-1.5-saucy if allow_incoming_
| Mathieu Gagné (mgagne) wrote : | #5 |
Patches I made and tested: https:/
| Changed in qemu (Ubuntu): | |
| importance: | Undecided → High |
| Changed in qemu (Ubuntu Trusty): | |
| importance: | Undecided → High |
| status: | New → Confirmed |
| Changed in libvirt (Ubuntu Trusty): | |
| importance: | Undecided → High |
| Changed in libvirt (Ubuntu): | |
| importance: | Undecided → High |
| status: | New → Fix Released |
| Changed in libvirt (Ubuntu Trusty): | |
| status: | New → Confirmed |
| Changed in qemu (Ubuntu): | |
| status: | Confirmed → Fix Released |
| description: | updated |
| Serge Hallyn (serge-hallyn) wrote : | #6 |
@mgagne,
Just an update, I will push your patches as soon as bug 1262641 is verified. Until that happens a new libvirt version cannot be uploaded to trusty-proposed. Hopefully we can get it pushed next week.
| gustavo panizzo (gfa) wrote : | #7 |
@serge-hallyn, #1262641 has been verified and released, will you push this one?
| Serge Hallyn (serge-hallyn) wrote : | #8 |
Yes, I will, hopefully tomorrow.
| description: | updated |
Hello Mathieu, or anyone else affected,
Accepted libvirt into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in libvirt (Ubuntu Trusty): | |
| status: | Confirmed → Fix Committed |
| tags: | added: verification-needed |
| Brian Murray (brian-murray) wrote : | #10 |
Hello Mathieu, or anyone else affected,
Accepted qemu into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in qemu (Ubuntu Trusty): | |
| status: | Confirmed → Fix Committed |
| Chris J Arges (arges) wrote : | #11 |
Uploaded qemu_2.
| Chris J Arges (arges) wrote : | #12 |
Hello Mathieu, or anyone else affected,
Accepted qemu into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Serge Hallyn (serge-hallyn) wrote : | #14 |
In your paste you only show qemu versions. To be sure, were you also using the proposed libvirt version (https:/
| Chris J Arges (arges) wrote : | #15 |
Hello Mathieu, or anyone else affected,
Accepted libvirt into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| tags: | removed: verification-failed |
| tags: | added: verification-needed |
| Seyeong Kim (xtrusia) wrote : | #16 |
Yeah I miss that.
I tested this again with libvirt-bin, qemu
Please refere below link
| tags: |
added: verification-failed removed: verification-needed |
| Serge Hallyn (serge-hallyn) wrote : | #17 |
Sorry, there was some confusion here. The proposed fix for this bug was removed since it failed. Unfortunately the bug# had to stay in the changelog so this bug was updated suggesting there was a new fix for it. Rather libvirt 1.2.2-0ubuntu13
(So comment #15 was a mistake)
| Mathieu Gagné (mgagne) wrote : | #18 |
Seyeong Kim (xtrusia):
You need to test with the following setup:
* The source needs to run qemu 1.5. (which should be unpatched)
* The destination needs to run a *PATCHED* versions of qemu 2.0 and libvirt 1.2. Furthermore, libvirt *NEEDS* to have allow_incoming_
Failure to set allow_incoming_
Length mismatch: 0000:00:
qemu: warning: error while loading state for instance 0x0 of device 'ram'
Your logs show that you failed to follow the test steps as the destination isn't using the "pc-i440fx-
Make sure libvirt is properly configured and restarted with "allow_
The proposed patches (both libvirt and qemu) have been running in production environment without any issue since the bug report.
| Seyeong Kim (xtrusia) wrote : | #19 |
Mathieu Gagné (mgagne)
I think libvirt 1.2.2-0ubuntu13
I checked code of libvirt 1.2.2-0ubuntu13
| Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1425619] Re: Migration fails between QEMU 1.5 and QEMU 2.0 | #20 |
Quoting Seyeong Kim (<email address hidden>):
> Mathieu Gagné (mgagne)
>
> I think libvirt 1.2.2-0ubuntu13
> as #17.
Yes, 1.2.2-0ubuntu13
we reverted the fix in 1.2.2-0ubuntu13
We will have to wait until 1.2.2-0ubuntu13
fix.
| Seyeong Kim (xtrusia) wrote : | #21 |
ah.. sorry for making confusion
| gustavo panizzo (gfa) wrote : | #22 |
qemu 2.0.0+dfsg-
qemu 2.0.0+dfsg-
i just moved vm to an hypervisor using 2.0.0+dfsg-
i will comment if .14 generates any issue in my env
| Launchpad Janitor (janitor) wrote : | #23 |
This bug was fixed in the package libvirt - 1.2.2-0ubuntu13
---------------
libvirt (1.2.2-
* Drop Support-
verification.
libvirt (1.2.2-
* Support-
* qemu-filterref-
interfaces (LP: #1448205)
* storage_
arguments to rbd_create3. (LP: #1447030)
-- Serge Hallyn <email address hidden> Thu, 18 Jun 2015 14:21:06 -0500
| Changed in libvirt (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Chris J Arges (arges) wrote : Update Released | #24 |
The verification of the Stable Release Update for libvirt 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.
| Changed in libvirt (Ubuntu Trusty): | |
| status: | Fix Released → In Progress |
| Chris J Arges (arges) wrote : | #25 |
Note, this wasn't really released into trusty yet. I'm going to include it in .13...
| Chris J Arges (arges) wrote : | #26 |
Just uploaded libvirt_
Hello Mathieu, or anyone else affected,
Accepted libvirt into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in libvirt (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| tags: | removed: verification-failed |
| tags: | added: verification-needed |
| Seyeong Kim (xtrusia) wrote : | #28 |
root@trusty:~# dpkg -l | grep qemu
ii ipxe-qemu 1.0.0+git-
ii qemu 2.0.0+dfsg-
ii qemu-keymaps 2.0.0+dfsg-
ii qemu-kvm 2.0.0+dfsg-
ii qemu-system 2.0.0+dfsg-
ii qemu-system-arm 2.0.0+dfsg-
ii qemu-system-common 2.0.0+dfsg-
ii qemu-system-mips 2.0.0+dfsg-
ii qemu-system-misc 2.0.0+dfsg-
ii qemu-system-ppc 2.0.0+dfsg-
ii qemu-system-sparc 2.0.0+dfsg-
ii qemu-system-x86 2.0.0+dfsg-
ii qemu-user 2.0.0+dfsg-
ii qemu-utils 2.0.0+dfsg-
root@trusty:~# dpkg -l | grep libvirt
ii libvirt-bin 1.2.2-0ubuntu13
ii libvirt0 1.2.2-0ubuntu13
2015-07-08 14:54:19.979+0000: starting up
LC_ALL=C PATH=/usr/
char device r...
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #29 |
This bug was fixed in the package qemu - 2.0.0+dfsg-
---------------
qemu (2.0.0+
* ubuntu/
enable migration from 13.10 hosts (LP: #1425619)
-- Chris J Arges <email address hidden> Mon, 15 Jun 2015 12:26:17 -0500
| Changed in qemu (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #30 |
This bug was fixed in the package libvirt - 1.2.2-0ubuntu13
---------------
libvirt (1.2.2-
[ Seyeong Kim ]
* d/p/fix_
(LP: #1464175)
-- Chris J Arges <email address hidden> Wed, 08 Jul 2015 10:52:41 -0500
| Changed in libvirt (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| James Page (james-page) wrote : | #31 |
Bug catchup - Marking fix released as all cloud-archive pockets are up-to-date with libvirt and qemu fixes.
| Changed in cloud-archive: | |
| status: | New → Fix Released |


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