mirror of https://gitee.com/openkylin/libvirt.git
virsh: Add options for parallel migration
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
d3ea986af2
commit
5a303994ff
|
@ -10562,6 +10562,14 @@ static const vshCmdOptDef opts_migrate[] = {
|
|||
.type = VSH_OT_INT,
|
||||
.help = N_("post-copy migration bandwidth limit in MiB/s")
|
||||
},
|
||||
{.name = "parallel",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("enable parallel migration")
|
||||
},
|
||||
{.name = "parallel-connections",
|
||||
.type = VSH_OT_INT,
|
||||
.help = N_("number of connections for parallel migration")
|
||||
},
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
|
@ -10767,6 +10775,14 @@ doMigrate(void *opaque)
|
|||
goto save_error;
|
||||
}
|
||||
|
||||
if (vshCommandOptInt(ctl, cmd, "parallel-connections", &intOpt) < 0)
|
||||
goto out;
|
||||
if (intOpt &&
|
||||
virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||
VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS,
|
||||
intOpt) < 0)
|
||||
goto save_error;
|
||||
|
||||
if (vshCommandOptBool(cmd, "live"))
|
||||
flags |= VIR_MIGRATE_LIVE;
|
||||
if (vshCommandOptBool(cmd, "p2p"))
|
||||
|
@ -10815,6 +10831,9 @@ doMigrate(void *opaque)
|
|||
if (vshCommandOptBool(cmd, "tls"))
|
||||
flags |= VIR_MIGRATE_TLS;
|
||||
|
||||
if (vshCommandOptBool(cmd, "parallel"))
|
||||
flags |= VIR_MIGRATE_PARALLEL;
|
||||
|
||||
if (flags & VIR_MIGRATE_PEER2PEER || vshCommandOptBool(cmd, "direct")) {
|
||||
if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) == 0)
|
||||
ret = '0';
|
||||
|
|
|
@ -1916,6 +1916,7 @@ I<domain> I<desturi> [I<migrateuri>] [I<graphicsuri>] [I<listen-address>] [I<dna
|
|||
[I<--comp-xbzrle-cache>] [I<--auto-converge>] [I<auto-converge-initial>]
|
||||
[I<auto-converge-increment>] [I<--persistent-xml> B<file>] [I<--tls>]
|
||||
[I<--postcopy-bandwidth> B<bandwidth>]
|
||||
[I<--parallel> [I<--parallel-connections> B<connections>]]
|
||||
|
||||
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
|
||||
for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
|
||||
|
@ -2009,6 +2010,12 @@ Providing I<--tls> causes the migration to use the host configured TLS setup
|
|||
the migration of the domain. Usage requires proper TLS setup for both source
|
||||
and target.
|
||||
|
||||
I<--parallel> option will cause migration data to be sent over multiple
|
||||
parallel connections. The number of such connections can be set using
|
||||
I<--parallel-connections>. Parallel connections may help with saturating the
|
||||
network link between the source and the target and thus speeding up the
|
||||
migration.
|
||||
|
||||
Running migration can be canceled by interrupting virsh (usually using
|
||||
C<Ctrl-C>) or by B<domjobabort> command sent from another virsh instance.
|
||||
|
||||
|
|
Loading…
Reference in New Issue