From: Paolo Bonzini <pbonzini@redhat.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Live migrate, inconsistent machine types - new machine type to fix?
Date: Sat, 19 Jul 2014 12:53:49 +0200 [thread overview]
Message-ID: <53CA4E3D.1020005@redhat.com> (raw)
In-Reply-To: <DAAF8667-4F57-4363-99CE-14D945E81631@alex.org.uk>
Il 19/07/2014 10:43, Alex Bligh ha scritto:
> Paolo,
>
> On 19 Jul 2014, at 08:30, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>> Il 19/07/2014 09:10, Alex Bligh ha scritto:
>>>>> Looks like your source and destination machines have different
>>>>> iPXE ROMs. This could be a packaging problem in your distro.
>>>
>>> This is Ubuntu 12.04 to Ubuntu 14.04. I think the 14.04 one is
>>> correct, and don't want to run with a non-standard qemu there.
>>
>> No, the old one is _always_ the correct one.
>>
>> The pxe-* ROMs must be 128k, the efi-* ROMs must be 256k.
>
> On 12.04
> # ls -la /usr/share/qemu/pxe-virtio.rom
> -rw-r--r-- 1 root root 63488 Jun 12 23:23 /usr/share/qemu/pxe-virtio.rom
>
> On 14.04 (after resolving a pile of symlinks)
> # ls -la /usr/lib/ipxe/qemu/pxe-virtio.rom
> -rw-r--r-- 1 root root 83968 Jan 6 2014 /usr/lib/ipxe/qemu/pxe-virtio.rom
>
> I'm guessing the ROM size gets rounded up to the next power of 2, hence
> the ROM size on 12.04 is 64k, and on 14.04 is 128k, right?
>
> So it would appear that if the length is actually coming from the
> length of the file on disk, that on 12.04 the pxe-ROM is not 128k
> but 64k. So if 'pxe-* ROMs must be 128k' is correct, I'm not sure
> that's incompatible with 'the old one is _always_ the correct
> one'.
Sorry, pxe-virtio.rom must be 64k. It's pxe-e1000.rom that is 128k
because it exceeds 64k by a little:
-rw-rw-r-- 1 pbonzini users 67072 2 dic 2013 pxe-e1000.rom
-rw-rw-r-- 1 pbonzini users 61440 2 dic 2013 pxe-eepro100.rom
-rw-rw-r-- 1 pbonzini users 61440 2 dic 2013 pxe-ne2k_pci.rom
-rw-rw-r-- 1 pbonzini users 61440 2 dic 2013 pxe-pcnet.rom
-rw-rw-r-- 1 pbonzini users 61440 2 dic 2013 pxe-rtl8139.rom
-rw-rw-r-- 1 pbonzini users 60416 2 dic 2013 pxe-virtio.rom
-rw-r--r-- 1 pbonzini users 194560 16 lug 13.16 efi-e1000.rom
-rw-r--r-- 1 pbonzini users 196096 16 lug 13.16 efi-eepro100.rom
-rw-r--r-- 1 pbonzini users 194560 16 lug 13.16 efi-ne2k_pci.rom
-rw-r--r-- 1 pbonzini users 194560 16 lug 13.16 efi-pcnet.rom
-rw-r--r-- 1 pbonzini users 198144 16 lug 13.16 efi-rtl8139.rom
-rw-r--r-- 1 pbonzini users 192000 16 lug 13.16 efi-virtio.rom
> Whilst (per below) your workaround gets past the issue for this ROM,
> I'm confused about the numbers in the error message, as 64k and
> 128k do not equal 10,000 or 20,000:
> Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 10000 in != 20000
These are hexadecimal.
>>> Can I use a different ROM (e.g. the old one) with a command line
>>> option just for the migrated machines? Obviously when they reboot,
>>> they'l get a hardware change (which is fine).
>>
>> Yes, "-global foo.romfile" on the destination QEMU. You can just pass
>> an empty 128k file to the destination since ROM contents are migrated
>> properly, and hardware will only change when QEMU restarts.
>
> Thanks.
>
> So, copying the old ROM file across (out of an abundance of caution)
> plus the magic incantation:
>
> -machine pc-1.0 -global cirrus-vga.vgamem_mb=10 -global virtio-net-pci.romfile=pxe-virtio.rom.12.04
It's really 16 (again hex).
> would appear to be sufficient to permit the migration to get past the
> initial stages and commence the block migration.
Ok, at least the memory map is now the same.
> However, after the block migration is finished, I now see:
>
> Receiving block device images
> Completed 100 %
> Unknown savevm section type 255
> load of migration failed
This could be another incompatibility between qemu-kvm and qemu. I know
we had a couple in Fedora.
> My guess is this might be the bogus inclusion of PITCommonState
> per the last hunk of
> http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-from-qemu-kvm.patch?h=f20
>
> Is there a technique to debug this sort of thing?
You can try using Amit's vmstate checker.
>> I don't know of any distro that actively tests migration except RHEL,
>> SLES. I'm not sure about Debian. Since there is no free-beer SLES,
>> you'd better switch to CentOS 7 than keeping Ubuntu 14.04.
>
> Switching is not an option here; we have way too much other stuff dependent
> on Ubuntu.
You could try rebuilding the patched QEMU sources from CentOS. CentOS
7's rhel6.1.0 or rhel6.2.0 machine types are comparable to pc-1.0, with
some luck they might even be compatible.
> Ubuntu is about to become tested (and a patch or workaround generated
> at least for migrations from 12.04 - the previous LTS version);
> whether or not it is upstreamed won't be up to me though.
Yes, because Ubuntu hardly introduces any new feature during the LTS
support period. But in 2 years you will have to endure roughly the same
pain.
> To be fair, I think the issue is that they are supporting migration from
> stock qemu.git pc-1.0 (which is what I think they shipped with the
> subsequent non-LTS releases, which means they can't (easily) also
> support migration from qemu-kvm pc-1.0. That's the bit I want to fix.
Yes, Ubuntu didn't bother testing migration from 12.04 to non-LTS
releases or 14.04. They don't have the manpower to do so anyway.
Paolo
next prev parent reply other threads:[~2014-07-19 10:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 23:33 [Qemu-devel] Live migrate, inconsistent machine types - new machine type to fix? Alex Bligh
2014-07-19 5:51 ` Paolo Bonzini
2014-07-19 7:10 ` Alex Bligh
2014-07-19 7:30 ` Paolo Bonzini
2014-07-19 8:43 ` Alex Bligh
2014-07-19 8:54 ` Peter Maydell
2014-07-19 8:59 ` Alex Bligh
2014-07-19 10:53 ` Paolo Bonzini [this message]
2014-07-19 11:37 ` Alex Bligh
2014-07-21 10:22 ` Paolo Bonzini
2014-07-21 13:59 ` Alex Bligh
2014-07-21 14:11 ` Paolo Bonzini
2014-07-21 14:35 ` Alex Bligh
2014-07-21 14:14 ` Paolo Bonzini
2014-07-22 7:11 ` Amit Shah
2014-07-22 9:50 ` Amit Shah
2014-07-22 9:55 ` Paolo Bonzini
2014-07-22 10:22 ` Amit Shah
2014-07-22 10:32 ` Alex Bligh
2014-07-22 10:54 ` Amit Shah
2014-07-22 11:38 ` Alex Bligh
2014-07-22 11:54 ` Amit Shah
2014-07-22 12:12 ` Paolo Bonzini
2014-07-22 12:19 ` Alex Bligh
2014-07-22 12:47 ` Amit Shah
2014-07-22 12:40 ` Amit Shah
2014-07-22 12:15 ` Alex Bligh
2014-07-22 12:44 ` Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CA4E3D.1020005@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex@alex.org.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).