[PATCH] Check for --live flag for postcopy-after-precopy migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unlike postcopy migration there is no --live flag check for
postcopy-after-precopy.

Signed-off-by: Kothapally Madhu Pavan <kmp@xxxxxxxxxxxxxxxxxx>
---
 tools/virsh-domain.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index de2a22c..798a1ff 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10317,6 +10317,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,

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]