All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Mark Mielke <mark.mielke@gmail.com>,
	qemu-devel@nongnu.org, christian.ehrhardt@canonical.com
Subject: Re: [Qemu-devel] Live migration from Qemu 2.12 hosts to Qemu 3.2 hosts, with VMX flag enabled in the guest?
Date: Fri, 18 Jan 2019 13:44:51 +0000	[thread overview]
Message-ID: <20190118134451.GM20660@redhat.com> (raw)
In-Reply-To: <328f912c-e332-3bdc-d333-55c4af1a1fa1@redhat.com>

On Fri, Jan 18, 2019 at 01:57:31PM +0100, Paolo Bonzini wrote:
> On 18/01/19 11:21, Daniel P. Berrangé wrote:
> > On Fri, Jan 18, 2019 at 10:16:34AM +0000, Dr. David Alan Gilbert wrote:
> >> * Paolo Bonzini (pbonzini@redhat.com) wrote:
> >>> On 18/01/19 11:02, Dr. David Alan Gilbert wrote:
> >>>>>
> >>>>> It fails if the flag is set, rather than if any nested virtualization has
> >>>>> been used before.
> >>>>>
> >>>>> I'm concerned I will end up with a requirement for *all* guests to be
> >>>>> restarted in order to migrate them to the new hosts, rather than just the
> >>>>> ones that would have a problem.
> >>>> I think you should be able to migrate from 2.12->3.1 like this, but
> >>>> you'd hit the problem when you then try and migrate again between your
> >>>> new QEMUs.
> >>>>
> >>>> I guess we could modify it to wire it to machine type, so that
> >>>> older machine types didn't block.
> >>>
> >>> That would also be wrong.  The old machine types _could_ be using KVM
> >>> and they have no way to block the live migration.
> >>>
> >>> The solution is to restart the VM using "-cpu host,-vmx".
> >>
> >> The problem as Christian explained in that thread is that it was common
> >> for them to start VMs with vmx enabled but for people not to use it
> >> on most of the VMs, so we break migration for most VMs even though most
> >> don't use it.
> >>
> >> It might not be robust, but it worked for a lot of people most of the
> >> time.
> 
> It's not "not robust" (like, it usually works but sometimes fails
> mysteriously).  It's entirely broken, you just don't notice that it is
> if you're not using the feature.
> 
> > Yes, this is exactly why I said we should make the migration blocker
> > be conditional on any L2 guest having been started. I vaguely recall
> > someone saying there wasn't any way to detect this situation from
> > QEMU though ?
> 
> You can check that and give a warning (check that CR4.VMXE=1 but no
> other live migration state was transferred).  However, without live
> migration support in the kernel and in QEMU you cannot start VMs *for
> the entire future life of the VM* after a live migration.  So even if we
> implemented that kind of blocker, it would fail even if no VM has been
> started, as long as the kvm_intel module is loaded on migration.  That
> would be no different in practice from what we have now.

Ahh, I was mis-understanding that it only applied to L2 VMs that
existed at the time the migration is performed. Given that it breaks
all future possibility of launching an L2 VM, this strict blocker does
make more sense.

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 :|

  parent reply	other threads:[~2019-01-18 13:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18  5:32 [Qemu-devel] Live migration from Qemu 2.12 hosts to Qemu 3.2 hosts, with VMX flag enabled in the guest? Mark Mielke
2019-01-18  6:18 ` Christian Ehrhardt
2019-01-22  7:20   ` Like Xu
2019-01-18 10:02 ` Dr. David Alan Gilbert
2019-01-18 10:11   ` Paolo Bonzini
2019-01-18 10:16     ` Dr. David Alan Gilbert
2019-01-18 10:21       ` Daniel P. Berrangé
2019-01-18 12:57         ` Paolo Bonzini
2019-01-18 13:41           ` Mark Mielke
2019-01-18 15:25             ` Paolo Bonzini
2019-01-18 19:31               ` Dr. David Alan Gilbert
2019-01-22 22:58               ` Mark Mielke
2019-01-18 13:44           ` Daniel P. Berrangé [this message]
2019-01-18 14:09             ` Mark Mielke
2019-01-18 14:48               ` Daniel P. Berrangé

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=20190118134451.GM20660@redhat.com \
    --to=berrange@redhat.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dgilbert@redhat.com \
    --cc=mark.mielke@gmail.com \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.