]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: make migrate --tunnelled imply --p2p
authorEric Blake <eblake@redhat.com>
Mon, 18 Jul 2011 19:10:29 +0000 (13:10 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 18 Jul 2011 21:19:55 +0000 (15:19 -0600)
We can make the virsh migrate UI friendlier by supplying the
missing bit automatically instead of erroring out when requesting
--tunnelled without --p2p.

* tools/virsh.c (doMigrate): Make --p2p optional when using
--tunnelled.
* tools/virsh.pod (migrate): Tweak wording accordingly.

tools/virsh.c
tools/virsh.pod

index cba249a4fb44cc6ff226943739841c752d7d34c0..d39177689582cd477fd4e0b7c2101ca274f09d7a 100644 (file)
@@ -4460,7 +4460,7 @@ doMigrate (void *opaque)
     if (vshCommandOptBool (cmd, "p2p"))
         flags |= VIR_MIGRATE_PEER2PEER;
     if (vshCommandOptBool (cmd, "tunnelled"))
-        flags |= VIR_MIGRATE_TUNNELLED;
+        flags |= VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER;
 
     if (vshCommandOptBool (cmd, "persistent"))
         flags |= VIR_MIGRATE_PERSIST_DEST;
index 5afa1f2b05e59d951ad2c1cc20d62f38ad16161b..5dc3d2e41e9951b713a55f32e0826b7368c9e56e 100644 (file)
@@ -525,14 +525,15 @@ Provide the maximum number of virtual CPUs supported for a guest VM on
 this connection.  If provided, the I<type> parameter must be a valid
 type attribute for the <domain> element of XML.
 
-=item B<migrate> [I<--live>] [I<--direct>] [I<--p2p> [I<--tunnelled>]]
+=item B<migrate> [I<--live>] [I<--direct>] [I<--p2p>] [I<--tunnelled>]
 [I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
 [I<--copy-storage-inc>] [I<--verbose>] I<domain-id> I<desturi> [I<migrateuri>]
 [I<dname>] [I<--timeout> B<seconds>]
 
 Migrate domain to another host.  Add I<--live> for live migration; I<--p2p>
 for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
-for tunnelled migration.  I<--persistent> leaves the domain persistent on
+for tunnelled migration (I<--tunnelled> implies I<--p2p>).  I<--persistent>
+leaves the domain persistent on
 destination host, I<--undefinesource> undefines the domain on the source host,
 and I<--suspend> leaves the domain paused on the destination host.
 I<--copy-storage-all> indicates migration with non-shared storage with full