mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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,
|
.type = VSH_OT_INT,
|
||||||
.help = N_("post-copy migration bandwidth limit in MiB/s")
|
.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}
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -10767,6 +10775,14 @@ doMigrate(void *opaque)
|
|||||||
goto save_error;
|
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"))
|
if (vshCommandOptBool(cmd, "live"))
|
||||||
flags |= VIR_MIGRATE_LIVE;
|
flags |= VIR_MIGRATE_LIVE;
|
||||||
if (vshCommandOptBool(cmd, "p2p"))
|
if (vshCommandOptBool(cmd, "p2p"))
|
||||||
@ -10815,6 +10831,9 @@ doMigrate(void *opaque)
|
|||||||
if (vshCommandOptBool(cmd, "tls"))
|
if (vshCommandOptBool(cmd, "tls"))
|
||||||
flags |= VIR_MIGRATE_TLS;
|
flags |= VIR_MIGRATE_TLS;
|
||||||
|
|
||||||
|
if (vshCommandOptBool(cmd, "parallel"))
|
||||||
|
flags |= VIR_MIGRATE_PARALLEL;
|
||||||
|
|
||||||
if (flags & VIR_MIGRATE_PEER2PEER || vshCommandOptBool(cmd, "direct")) {
|
if (flags & VIR_MIGRATE_PEER2PEER || vshCommandOptBool(cmd, "direct")) {
|
||||||
if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) == 0)
|
if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) == 0)
|
||||||
ret = '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<--comp-xbzrle-cache>] [I<--auto-converge>] [I<auto-converge-initial>]
|
||||||
[I<auto-converge-increment>] [I<--persistent-xml> B<file>] [I<--tls>]
|
[I<auto-converge-increment>] [I<--persistent-xml> B<file>] [I<--tls>]
|
||||||
[I<--postcopy-bandwidth> B<bandwidth>]
|
[I<--postcopy-bandwidth> B<bandwidth>]
|
||||||
|
[I<--parallel> [I<--parallel-connections> B<connections>]]
|
||||||
|
|
||||||
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
|
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>
|
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
|
the migration of the domain. Usage requires proper TLS setup for both source
|
||||||
and target.
|
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
|
Running migration can be canceled by interrupting virsh (usually using
|
||||||
C<Ctrl-C>) or by B<domjobabort> command sent from another virsh instance.
|
C<Ctrl-C>) or by B<domjobabort> command sent from another virsh instance.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user