]> xenbits.xensource.com Git - libvirt.git/commitdiff
Check for --live flag for postcopy-after-precopy migration
authorKothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
Fri, 26 Aug 2016 09:25:52 +0000 (05:25 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 26 Aug 2016 19:38:11 +0000 (21:38 +0200)
Unlike postcopy migration there is no --live flag check for
postcopy-after-precopy.

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
tools/virsh-domain.c

index 90d2543c9bf9b04e0c0bc8bcdae6dd2943a76c62..c9ad0d7a52b255e9c66a1907c346d29429631472 100644 (file)
@@ -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,