mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Introduce VIR_MIGRATE_PARAM_GRAPHICS_URI parameter
The parameter specifies connection parameters to use for migrating client's connection to domain's graphical console.
This commit is contained in:
parent
bdb6578a42
commit
4669543cb8
@ -1246,6 +1246,27 @@ typedef enum {
|
||||
*/
|
||||
#define VIR_MIGRATE_PARAM_BANDWIDTH "bandwidth"
|
||||
|
||||
/**
|
||||
* VIR_MIGRATE_PARAM_GRAPHICS_URI:
|
||||
*
|
||||
* virDomainMigrate* params field: URI to use for migrating client's connection
|
||||
* to domain's graphical console as VIR_TYPED_PARAM_STRING. If specified, the
|
||||
* client will be asked to automatically reconnect using these parameters
|
||||
* instead of the automatically computed ones. This can be useful if, e.g., the
|
||||
* client does not have a direct access to the network virtualization hosts are
|
||||
* connected to and needs to connect through a proxy. The URI is formed as
|
||||
* follows:
|
||||
*
|
||||
* protocol://hostname[:port]/[?parameters]
|
||||
*
|
||||
* where protocol is either "spice" or "vnc" and parameters is a list of
|
||||
* protocol specific parameters separated by '&'. Currently recognized
|
||||
* parameters are "tlsPort" and "tlsSubject". For example,
|
||||
*
|
||||
* spice://target.host.com:1234/?tlsPort=4567
|
||||
*/
|
||||
#define VIR_MIGRATE_PARAM_GRAPHICS_URI "graphics_uri"
|
||||
|
||||
|
||||
/* Domain migration. */
|
||||
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
||||
|
@ -8324,6 +8324,10 @@ static const vshCmdOptDef opts_migrate[] = {
|
||||
.type = VSH_OT_DATA,
|
||||
.help = N_("migration URI, usually can be omitted")
|
||||
},
|
||||
{.name = "graphicsuri",
|
||||
.type = VSH_OT_DATA,
|
||||
.help = N_("graphics URI to be used for seamless graphics migration")
|
||||
},
|
||||
{.name = "dname",
|
||||
.type = VSH_OT_DATA,
|
||||
.help = N_("rename to new name during migration (if supported)")
|
||||
@ -8373,6 +8377,13 @@ doMigrate(void *opaque)
|
||||
VIR_MIGRATE_PARAM_URI, opt) < 0)
|
||||
goto save_error;
|
||||
|
||||
if (vshCommandOptStringReq(ctl, cmd, "graphicsuri", &opt) < 0)
|
||||
goto out;
|
||||
if (opt &&
|
||||
virTypedParamsAddString(¶ms, &nparams, &maxparams,
|
||||
VIR_MIGRATE_PARAM_GRAPHICS_URI, opt) < 0)
|
||||
goto save_error;
|
||||
|
||||
if (vshCommandOptStringReq(ctl, cmd, "dname", &opt) < 0)
|
||||
goto out;
|
||||
if (opt &&
|
||||
|
@ -1044,7 +1044,7 @@ stats.
|
||||
[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
|
||||
[I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>]
|
||||
[I<--compressed>] [I<--abort-on-error>]
|
||||
I<domain> I<desturi> [I<migrateuri>] [I<dname>]
|
||||
I<domain> I<desturi> [I<migrateuri>] [I<graphicsuri>] [I<dname>]
|
||||
[I<--timeout> B<seconds>] [I<--xml> B<file>]
|
||||
|
||||
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
|
||||
@ -1136,6 +1136,22 @@ order to comply with local firewall policies.
|
||||
|
||||
=back
|
||||
|
||||
Optional I<graphicsuri> overrides connection parameters used for automatically
|
||||
reconnecting a graphical clients at the end of migration. If omitted, libvirt
|
||||
will compute the parameters based on target host IP address. In case the
|
||||
client does not have a direct access to the network virtualization hosts are
|
||||
connected to and needs to connect through a proxy, I<graphicsuri> may be used
|
||||
to specify the address the client should connect to. The URI is formed as
|
||||
follows:
|
||||
|
||||
protocol://hostname[:port]/[?parameters]
|
||||
|
||||
where protocol is either "spice" or "vnc" and parameters is a list of protocol
|
||||
specific parameters separated by '&'. Currently recognized parameters are
|
||||
"tlsPort" and "tlsSubject". For example,
|
||||
|
||||
spice://target.host.com:1234/?tlsPort=4567
|
||||
|
||||
=item B<migrate-setmaxdowntime> I<domain> I<downtime>
|
||||
|
||||
Set maximum tolerable downtime for a domain which is being live-migrated to
|
||||
|
Loading…
Reference in New Issue
Block a user