fix migration tunnel

This commit is contained in:
Dietmar Maurer 2011-12-08 09:32:09 +01:00
parent 2b5569777b
commit 72afda82a1

View File

@ -320,13 +320,13 @@ sub phase2 {
my $cmd = [@{$self->{rem_ssh}}, 'qm', 'start', my $cmd = [@{$self->{rem_ssh}}, 'qm', 'start',
$vmid, '--stateuri', 'tcp', '--skiplock']; $vmid, '--stateuri', 'tcp', '--skiplock'];
$self->cmd($cmd, outfunc => sub { PVE::Tools::run_command($cmd, outfunc => sub {
my $line = shift; my $line = shift;
if ($line =~ m/^migration listens on port (\d+)$/) { if ($line =~ m/^migration listens on port (\d+)$/) {
$rport = $1; $rport = $1;
} }
}); }, errfunc => sub {});
die "unable to detect remote migration port\n" if !$rport; die "unable to detect remote migration port\n" if !$rport;