From 67af358d119bed1f50a81f0c826ccaf704a2a085 Mon Sep 17 00:00:00 2001 From: Kothapally Madhu Pavan Date: Fri, 26 Aug 2016 05:25:52 -0400 Subject: [PATCH] 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 --- tools/virsh-domain.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- GitLab