]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh migrate: Require --tls for --tls-destination
authorJiri Denemark <jdenemar@redhat.com>
Tue, 17 Dec 2019 13:31:10 +0000 (14:31 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 10 Jan 2020 08:12:57 +0000 (09:12 +0100)
--tls-destination would be just ignored unless --tls is not specified,
which is correct, but let's provide a bit of a guidance is a user
forgets to add --tls.

This is just a virsh-only check targeted to end users as we don't
currently have such checks at the API level for migration parameters
that depend on flags.

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

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

index 931575599044d888d23793973339b5dcfde26eaa..358067dce4c4d9c8ad5ce9c3e739cf650e735c47 100644 (file)
@@ -10964,6 +10964,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
     VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
     VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy");
     VSH_REQUIRE_OPTION("persistent-xml", "persistent");
+    VSH_REQUIRE_OPTION("tls-destination", "tls");
 
     if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
         return false;