[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 24/29] migration, vl: start migration via qmp_migrate_incomin
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 24/29] migration, vl: start migration via qmp_migrate_incoming |
Date: |
Wed, 2 Dec 2020 14:36:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 02/12/20 14:10, Dr. David Alan Gilbert wrote:
I'm more worried about how this stops a repeated 'migrate incoming'
or a 'migrate_incoming' that's issued following a qemu that's been
started with -incoming tcp:... but which a socket hasn't yet connected
to.
Good question, fortunately it is simply handled answer:
void qmp_migrate_incoming(const char *uri, Error **errp)
{
Error *local_err = NULL;
static bool once = true;
if (!once) {
error_setg(errp, "The incoming migration has already been
started");
return;
}
if (!runstate_check(RUN_STATE_INMIGRATE)) {
error_setg(errp, "'-incoming' was not specified on the command
line");
return;
}
qemu_start_incoming_migration(uri, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
}
once = false;
}
This patch can simplify things because every incoming migrations (no
matter if '-incoming defer' or '-incoming tcp:...') goes through the
qmp_migrate_incoming function above.
Paolo