From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: wuchenye1995 <wuchenye1995@gmail.com>,
discuss <discuss@edk2.groups.io>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
zhoujianjay <zhoujianjay@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: A problem with live migration of UEFI virtual machines
Date: Mon, 24 Feb 2020 15:28:10 +0000 [thread overview]
Message-ID: <20200224152810.GX635661@redhat.com> (raw)
In-Reply-To: <87sgjhxbtc.fsf@zen.linaroharston>
On Tue, Feb 11, 2020 at 05:39:59PM +0000, Alex Bennée wrote:
>
> wuchenye1995 <wuchenye1995@gmail.com> writes:
>
> > Hi all,
> > We found a problem with live migration of UEFI virtual machines due to size of OVMF.fd changes.
> > Specifically, the size of OVMF.fd in edk with low version such as edk-2.0-25 is 2MB while the size of it in higher version such as edk-2.0-30 is 4MB.
> > When we migrate a UEFI virtual machine from the host with low version of edk2 to the host with higher one, qemu component will report an error in function qemu_ram_resize while
> > checking size of ovmf_pcbios: Length mismatch: pc.bios: 0x200000 in != 0x400000: Invalid argument.
> > We want to know how to solve this problem after updating the
> > version of edk2.
>
> You can only migrate a machine that is identical - so instantiating a
> empty machine with a different EDK image is bound to cause a problem
> because the machines don't match.
I don't believe we are that strict for firmware in general. The firmware
is loaded when QEMU starts, but that only matters for the original
source host QEMU. During migration, the memory content of the original
firmware will be copied during live migration, overwriting whatever the
target QEMU loaded off disk. This works....provided the memory region
is the same size on source & target host, which is where the problem
arises in this case.
If there's a risk that newer firmware will be larger than old firmware
there's only really two options:
- Keep all firmware images forever, each with a unique versioned
filename. This ensures target QEMU will always load the original
smaller firmware
- Add padding to the firmware images. IOW, if the firmware is 2 MB,
add zero-padding to the end of the image to round it upto 4 MB
(whatever you anticipate the largest size wil be in future).
Distros have often taken the latter approach for QEMU firmware in the
past. The main issue is that you have to plan ahead of time and get
this padding right from the very start. You can't add the padding after
the fact on an existing VM.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-02-24 15:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 17:06 A problem with live migration of UEFI virtual machines "wuchenye1995
2020-02-11 17:39 ` Alex Bennée
2020-02-24 15:28 ` Daniel P. Berrangé [this message]
2020-02-25 17:53 ` [edk2-devel] " Laszlo Ersek
2020-02-25 18:56 ` Andrew Fish
2020-02-25 20:40 ` Laszlo Ersek
2020-02-25 21:35 ` Andrew Fish
2020-02-26 9:42 ` Laszlo Ersek
2020-02-28 3:20 ` Zhoujian (jay)
2020-02-28 11:29 ` Laszlo Ersek
2020-02-28 4:04 ` Andrew Fish
2020-02-28 11:47 ` Laszlo Ersek
2020-02-28 11:50 ` Laszlo Ersek
2020-03-02 12:32 ` Dr. David Alan Gilbert
-- strict thread matches above, loose matches on Subject: below --
2020-02-10 8:53 "wuchenye1995
2020-02-20 15:47 ` dgilbert
2020-02-10 4:39 wuchenye1995
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-list 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=20200224152810.GX635661@redhat.com \
--to=devel@edk2.groups.io \
/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