[pve-devel] [PATCH] migration : enable mtunnel for insecure migration

Alexandre Derumier aderumier at odiso.com
Thu Aug 10 09:15:29 CEST 2017


We only use it to send commands faster like resume

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuMigrate.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index fc847cc..8271adf 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -635,6 +635,14 @@ sub phase2 {
 	} else {
 	    die "unsupported protocol in migration URI: $ruri\n";
 	}
+    } else {
+	#fork tunnel for insecure migration, to send faster commands like resume
+	$self->log('info', "start remote tunnel");
+	my $pfamily = PVE::Tools::get_host_address_family($nodename);
+	my $lport = PVE::Tools::next_migrate_port($pfamily);
+	my $tunnel_addr = "$lport:localhost:$rport";
+
+	$self->{tunnel} = $self->fork_tunnel($tunnel_addr);
     }
 
     my $start = time();
-- 
2.11.0



More information about the pve-devel mailing list