Unlike postcopy migration there is no --live flag check for
postcopy-after-precopy.
Signed-off-by: Kothapally Madhu Pavan <kmp(a)linux.vnet.ibm.com>
---
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,