From: Kothapally Madhu Pavan Date: Fri, 26 Aug 2016 09:25:52 +0000 (-0400) Subject: Check for --live flag for postcopy-after-precopy migration X-Git-Tag: v2.2.0-rc1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67af358d119bed1f50a81f0c826ccaf704a2a085;p=thirdparty%2Flibvirt.git Check for --live flag for postcopy-after-precopy migration Unlike postcopy migration there is no --live flag check for postcopy-after-precopy. Signed-off-by: Kothapally Madhu Pavan --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 90d2543c9b..c9ad0d7a52 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10318,6 +10318,12 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd) } if (vshCommandOptBool(cmd, "postcopy-after-precopy")) { + if (!live_flag) { + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", + _("post-copy migration is not supported with " + "non-live or paused migration")); + goto cleanup; + } iterEvent = virConnectDomainEventRegisterAny( priv->conn, dom, VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION,