From: Peter Xu <peterx@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Fabiano Rosas <farosas@suse.de>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Mark Kanda <mark.kanda@oracle.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Eric Blake <eblake@redhat.com>,
"Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>,
Jason Wang <jasowang@redhat.com>, Ben Chaney <bchaney@akamai.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Subject: Re: [PATCH RFC 0/2] migration/vl: new -incoming config:* for early migration parameters
Date: Thu, 4 Jun 2026 14:08:14 -0400 [thread overview]
Message-ID: <aiG_Dh3HcUXInXBb@x1.local> (raw)
In-Reply-To: <aiE00jn-z-o_WlRo@redhat.com>
On Thu, Jun 04, 2026 at 09:18:26AM +0100, Daniel P. Berrangé wrote:
> On Wed, Jun 03, 2026 at 02:46:52PM -0400, Peter Xu wrote:
> > On Wed, Jun 03, 2026 at 07:00:07PM +0100, Daniel P. Berrangé wrote:
> > > On Wed, Jun 03, 2026 at 02:51:30PM -0300, Fabiano Rosas wrote:
> > > > Daniel P. Berrangé <berrange@redhat.com> writes:
> > > >
> > > > > In that case they should definitely be independent command line
> > > > > options. The old "-incoming" design is already broken / limited
> > > > > in the non-'defer' case because it is hardcoded to use URI syntax
> > > > > which can't express all the address formats we accept in QAPI
> > > > > syntax. Adding more special cases onto -incoming just makes the
> > > > > bad situation even worse and is not a forward looking design.
> > > > >
> > > > > If we need the ability to specify migration parameters on the
> > > > > CLI, then as a starting point for the design, we should assume that
> > > > > -incoming does not exist, and design a complete solution from scratch
> > > > > that uses QAPI exclusively, both for addresses and configuration.
> > > > >
> > > > > As discussed before, IMHO the "migrate" and "migrate-incoming"
> > > > > commands need to accept both the address(s) and parameters/capabilities
> > > > > as inline data items rather than relying on pre-configured global state
> > > > > from the 'migrate-parameter' / 'migrate-capability' commands.
> > > > >
> > > > > If we did that modelling for 'migrate-incoming' then that modelling of
> > > > > command parmaeters could map directly to a new '-migrate-incoming'
> > > > > command line argument that accepted exactly the same data model.
> > > > >
> > > >
> > > > Maybe a user creatable object would better fit this use case instead of
> > > > a new command. We could expose what is today MigrationParameters plus
> > > > the few compat options from migration_properties. It could work more or
> > > > less the same for the QMP migration commands, QMP set/get commands,
> > > > source and destination command lines, the compatibility use-case and the
> > > > debugging use-case.
> > >
> > > If we can do something using "-object" that is useful both at command
> > > line time and in QMP runtime, then that would be interesting too.
> > >
> > > My general feeling wrt changes to the current command line is that
> > > any suggestion should be desgined with a nod towards a future scenario
> > > where QEMU is 100% configured with QMP. ie the full command line is
> > >
> > > qemu-system-x86_64 -qmp <address>
> > >
> > > In this world, the current -incoming argument is already largely
> > > unsatisfactory for anything other than "defer". A model that uses
> > > -object would fit in well, as would a hypothetical -migrate-incoming
> > > that directly mapped to 'migrate-incoming' QMP including capabilities
> > > and parameters.
> >
> > I don't think even the current -incoming config:* is a blocker or add too
> > much complexity to the full-QMP-based solution.
> >
> > When it comes, we can simply map all -incoming config:* (JSON or not) to
> > QMP command migrate-set-parameters, what we need is teaching that QMP
> > handler to apply parameters to the temporary MigrationParameters rather
> > than migration object when the latter hasn't been initialized.
> >
> > I was talking to Fabiano and he suggested me to mention one more thing I
> > said on the list. It's a matter of whether we should still invest time on
> > supporting migration caps/parameters in QMP migrate/migrate-incoming
> > commands.
> >
> > Requirements like this (allow migration parameters to be accessible during
> > early stage of QEMU) is going towards the other direction of the that idea.
> > That means even if we put all configs (caps/params) into QMP command
> > migrate[-incoming], libvirt will still need to manage these global setup
> > and making sure when invoking migrate[-incoming] QMP commands they match
> > with the globals. Say, if one start QEMU with -incoming config:local=on
> > but then invoke "migrate-incoming,local=off" it's illegal.
> >
> > Considering that it looks like there're solid use cases that we want to
> > support (after CPR's "mode" parameter, now "local"), I want to discuss
> > again whether we want to still spend effort supporting "allow migrate QMP
> > command to specify capabilities/parameters". Ultimately, we still seem to
> > need these global parameters.
>
> This is saying that incoming migration is a multi phase/stage task.
>
> There is a "prepare" phase which sets up QEMU ready to receive an
> incoming migration.
>
> There is a "running" phase where we are waiting for incoming connection
> and/or handling the migration data stream.
>
> The current "migrate_incoming" overloads both tasks into the same QMP
> command such that they always happen at the same point in time.
> "-incoming defer" was a crude hack to partially separate them, allowing
> parameters/capabilities to be set before the real migrate_incoming
> QMP command is invoked.
>
> We can address that by separating the tasks explicitly with a
> "migrate_prepare" command / -migrate-prepare CLI arg that sets all
> the parameters/capabilities atomically, and a "migrate_run" command
> that initiates the processing.
I'm OK with this, or IMHO we can also stick with -incoming treating it as
the preparation phase.
For most of the time, I would slightly prefer keeping old things working
but building new things on top. Obsolete should only happen if very needed
and properly justified.
For this one, I hope the QAPI helpers I used should introduce minimum
overhead even if we're reusing an old paramaeter.. we can still consider
introducing another parmeter besides -incoming, but it'll work similarly
like what this patch does, then.
>
> The "jobs" QAPI design has this explicit concept of different phases
> that a job can be in, and provides commands for lifecycle handling.
We have some rich discussion before on Jobs:
https://lore.kernel.org/qemu-devel/878qg1uhbd.fsf_-_@pond.sub.org/#t
IIRC the consensus was it's only about the interfacing that can be shared or
not, which doesn't seem to be a huge mount of code that we can reuse; what
we can reuse is minimum and we may need to overload the interface when
migration joins the party.
We're definitely open to adopt anything Jobs did right. We don't
necessarily need to switch to Jobs until further justified, which won't be
a trivial task.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2026-06-04 18:08 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 21:29 [PATCH RFC 0/2] migration/vl: new -incoming config:* for early migration parameters Peter Xu
2026-05-28 21:29 ` [PATCH RFC 1/2] migration/vl: Allow set parameters with -incoming config:* Peter Xu
2026-05-28 22:16 ` Fabiano Rosas
2026-05-29 15:06 ` Peter Xu
2026-05-29 16:44 ` Fabiano Rosas
2026-06-01 21:32 ` Peter Xu
2026-06-02 13:37 ` Fabiano Rosas
2026-06-03 15:36 ` Mark Cave-Ayland
2026-06-03 15:55 ` Peter Xu
2026-06-04 9:21 ` Mark Cave-Ayland
2026-06-04 15:34 ` Peter Xu
2026-05-29 7:19 ` Vladimir Sementsov-Ogievskiy
2026-05-29 14:22 ` Peter Xu
2026-05-29 7:26 ` Vladimir Sementsov-Ogievskiy
2026-05-29 14:26 ` Peter Xu
2026-05-28 21:29 ` [PATCH RFC 2/2] migration/cpr: Opt-in "mode" parameter for early boot access Peter Xu
2026-05-28 23:24 ` Fabiano Rosas
2026-05-29 14:50 ` Peter Xu
2026-05-29 17:21 ` Fabiano Rosas
2026-05-28 22:01 ` [PATCH RFC 0/2] migration/vl: new -incoming config:* for early migration parameters Fabiano Rosas
2026-05-29 14:15 ` Peter Xu
2026-06-03 9:48 ` Daniel P. Berrangé
2026-06-03 15:50 ` Peter Xu
2026-06-03 17:15 ` Daniel P. Berrangé
2026-06-03 17:45 ` Peter Xu
2026-06-03 17:56 ` Fabiano Rosas
2026-06-03 17:51 ` Fabiano Rosas
2026-06-03 18:00 ` Daniel P. Berrangé
2026-06-03 18:46 ` Peter Xu
2026-06-03 22:00 ` Vladimir Sementsov-Ogievskiy
2026-06-04 18:01 ` Peter Xu
2026-06-05 7:35 ` Vladimir Sementsov-Ogievskiy
2026-06-05 14:08 ` Peter Xu
2026-06-05 14:37 ` Vladimir Sementsov-Ogievskiy
2026-06-05 15:02 ` Peter Xu
2026-06-04 8:18 ` Daniel P. Berrangé
2026-06-04 18:08 ` Peter Xu [this message]
2026-06-04 10:03 ` Mark Cave-Ayland
2026-06-03 15:27 ` Mark Cave-Ayland
2026-06-03 17:32 ` Fabiano Rosas
2026-06-03 15:41 ` Mark Cave-Ayland
2026-06-03 15:59 ` Peter Xu
2026-06-04 10:00 ` Mark Cave-Ayland
2026-06-04 13:19 ` Peter Xu
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=aiG_Dh3HcUXInXBb@x1.local \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=bchaney@akamai.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=maciej.szmigiero@oracle.com \
--cc=mark.kanda@oracle.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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.