Unable to migrate pc-i440fx-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1

Bug #1536487 reported by Michael Chapman on 2016-01-21
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)

Bug Description

When migrating a pc-i440fc-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1, the target QEMU errors out:

  qemu-system-x86_64: error while loading state for instance 0x0 of device 'fw_cfg'

This appears to be related to the addition of a DMA interface to fw_cfg last October:


"info qtree" on the source QEMU shows that the DMA interface for fw_cfg had been enabled:

  bus: main-system-bus
    type System
    dev: fw_cfg_io, id ""
      iobase = 1296 (0x510)
      dma_iobase = 1300 (0x514)
      dma_enabled = true

Incidentally, this guest had just undergone a migration from QEMU 2.4.1 to QEMU 2.5.0, so it looks like DMA was enabled simply through the migration.

It seems to me that the DMA interface for fw_cfg should only be enabled on pc-i440fx-2.5 machines or higher.

description: updated

Proxmox users have reported same bug (qemu 2.5 with pc-i440fc-2.4 not migrating to qemu 2.4.1)


I don't have verified yet, but it seem to be related.

Changed in qemu:
status: New → In Progress
Laszlo Ersek (Red Hat) (lersek) wrote :

Fix committed in e6915b5f3a874a467a9a65f7ec1d6ef8d251a51a.

Changed in qemu:
status: In Progress → Fix Committed
Thomas Huth (th-huth) on 2016-06-21
Changed in qemu:
status: Fix Committed → Fix Released

Note: Also affects Migration Xenial->Trusty (tested and ran into the same issue, that was how I found the bug) and very likely also Yakkety->Trusty.

 qemu | 2.0.0+dfsg-2ubuntu1.27 | trusty-security | source
 qemu | 1:2.5+dfsg-5ubuntu10.4 | xenial-updates | source

Subscribing server Team to look at this in the scope of the qemu packaging SRU work for Xenial.

Changed in qemu (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in qemu (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
Changed in qemu (Ubuntu):
status: Triaged → Fix Released

Migrating a VM from xenial -> trusty (or anything moving backward) is
not supported.

Hi Serge I agree to "created on xenial -> migrating to trusty" not being supported.
I already tended to even say "created on xenial with the Trusty machine type -> migrating to trusty" is not supported as well (at least it is failing for all combos I tried.

But I wonder how far "anything moving backward" should go.

Especially I found that the "created on Trusty, migrated to xenial (works), but later migrated back to trusty (fails)" seems affected by it as well.
I'd have thought that this would be supported. What is you opinion on this more specific case?

Serge Hallyn (serge-hallyn) wrote :

You might ask on #virt for the opinion there, but I don't believe
migrating backward is supported in any case. t->x->t doesn't change
the fact that there is x->t.

Paolo Bonzini (bonzini) wrote :

> Especially I found that the "created on Trusty, migrated to xenial
> (works), but later migrated back to trusty (fails)" seems affected by
> it as well.

The first migration of the t->x->t sequence does not really matter (if
anything it could introduce _more_ bugs!), so if x->t is not supported
then neither is t->x->t.

The upstream QEMU project doesn't have the manpower to test and support
backwards migration. We try not to break it, and in this case there
was an easy fix and we suggest that Canonical backports it. However,
in general it's not guaranteed to work.

The fix is commit e6915b5f3a874a467a9a65f7ec1d6ef8d251a51a.

Serge, Paulo - thank you both!

I already had the patch but I think it was good to discuss and list the expected behavior not only for me, but for whoever else that comes by this or a similar case.

I backported this and tried my tests again, but this alone isn't sufficient to get the T->X->T working (which is effectively 2.0->2.5->2.0).
Wily (2.4) is already out of service, so setting this to won't fix.

Thanks for your guidance, but that now properly known I'll set the Xenial task to won't fix for now.

Changed in qemu (Ubuntu Xenial):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers