]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: migrate --timeout-postcopy requires --postcopy
authorJiri Denemark <jdenemar@redhat.com>
Fri, 8 Sep 2017 16:15:13 +0000 (18:15 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 11 Sep 2017 14:29:05 +0000 (16:29 +0200)
Requesting an automated switch to a post-copy migration (using
--timeout-postcopy) without actually enabling post-copy migration (using
--postcopy) doesn't really do anything. Let's make this dependency
explicit to avoid unexpected behavior.

https://bugzilla.redhat.com/show_bug.cgi?id=1455023

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
tools/virsh-domain.c

index f235c66b07df00f6ac9ab587fea757dd890d5d71..a3f3b7c7bdc41f40e6b69ccd01e3ee72ed22b1c7 100644 (file)
@@ -10768,6 +10768,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
     VSH_EXCLUSIVE_OPTIONS("live", "offline");
     VSH_EXCLUSIVE_OPTIONS("timeout-suspend", "timeout-postcopy");
     VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
+    VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy");
     VSH_REQUIRE_OPTION("persistent-xml", "persistent");
 
     if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))