Add new migration flag VIR_MIGRATE_TLS

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2017-02-15 08:58:46 -05:00
parent 3f3582d6d4
commit 6a8d898de6
3 changed files with 17 additions and 1 deletions

View File

@ -815,6 +815,14 @@ typedef enum {
* post-copy mode. See virDomainMigrateStartPostCopy for more details.
*/
VIR_MIGRATE_POSTCOPY = (1 << 15),
/* Setting the VIR_MIGRATE_TLS flag will cause the migration to attempt
* to use the TLS environment configured by the hypervisor in order to
* perform the migration. If incorrectly configured on either source or
* destination, the migration will fail.
*/
VIR_MIGRATE_TLS = (1 << 16),
} virDomainMigrateFlags;

View File

@ -45,7 +45,8 @@ typedef qemuMigrationCompression *qemuMigrationCompressionPtr;
VIR_MIGRATE_ABORT_ON_ERROR | \
VIR_MIGRATE_AUTO_CONVERGE | \
VIR_MIGRATE_RDMA_PIN_ALL | \
VIR_MIGRATE_POSTCOPY)
VIR_MIGRATE_POSTCOPY | \
VIR_MIGRATE_TLS)
/* All supported migration parameters and their types. */
# define QEMU_MIGRATION_PARAMETERS \

View File

@ -10222,6 +10222,10 @@ static const vshCmdOptDef opts_migrate[] = {
.type = VSH_OT_STRING,
.help = N_("filename containing updated persistent XML for the target")
},
{.name = "tls",
.type = VSH_OT_BOOL,
.help = N_("use TLS for migration")
},
{.name = NULL}
};
@ -10463,6 +10467,9 @@ doMigrate(void *opaque)
if (vshCommandOptBool(cmd, "postcopy"))
flags |= VIR_MIGRATE_POSTCOPY;
if (vshCommandOptBool(cmd, "tls"))
flags |= VIR_MIGRATE_TLS;
if (flags & VIR_MIGRATE_PEER2PEER || vshCommandOptBool(cmd, "direct")) {
if (virDomainMigrateToURI3(dom, desturi, params, nparams, flags) == 0)
ret = '0';