From 04597a7038482688fb2cc8b0b1869392f6f78016 Mon Sep 17 00:00:00 2001 From: Kothapally Madhu Pavan Date: Fri, 2 Sep 2016 07:52:13 -0400 Subject: [PATCH] Make --postcopy flag mandatory with --postcopy-after-precopy --postcopy-after-precopy is just an aditional flag for postcopy migration. Signed-off-by: Kothapally Madhu Pavan --- tools/virsh-domain.c | 6 +++--- tools/virsh.pod | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c9ad0d7a52..a614512838 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10318,10 +10318,10 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd) } if (vshCommandOptBool(cmd, "postcopy-after-precopy")) { - if (!live_flag) { + if (!vshCommandOptBool(cmd, "postcopy")) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", - _("post-copy migration is not supported with " - "non-live or paused migration")); + _("--postcopy-after-precopy can only be used with " + "--postcopy")); goto cleanup; } iterEvent = virConnectDomainEventRegisterAny( diff --git a/tools/virsh.pod b/tools/virsh.pod index 1e36ee16ae..e056eb0f51 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1617,8 +1617,8 @@ migration. I<--postcopy> enables post-copy logic in migration, but does not actually start post-copy, i.e., migration is started in pre-copy mode. Once migration is running, the user may switch to post-copy using the B command sent from another virsh instance or use -I<--postcopy-after-precopy> to let libvirt automatically switch to -post-copy after the first pass of pre-copy is finished. +I<--postcopy-after-precopy> along with I<--postcopy> to let libvirt +automatically switch to post-copy after the first pass of pre-copy is finished. I<--auto-converge> forces convergence during live migration. The initial guest CPU throttling rate can be set with I. If the