[pve-devel] r5476 - qemu-server/pve2/PVE/API2/Qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Feb 2 10:10:52 CET 2011


Author: dietmar
Date: 2011-02-02 10:10:52 +0100 (Wed, 02 Feb 2011)
New Revision: 5476

Modified:
   qemu-server/pve2/PVE/API2/Qemu/VNC.pm
Log:
try to get real IP


Modified: qemu-server/pve2/PVE/API2/Qemu/VNC.pm
===================================================================
--- qemu-server/pve2/PVE/API2/Qemu/VNC.pm	2011-02-02 09:06:37 UTC (rev 5475)
+++ qemu-server/pve2/PVE/API2/Qemu/VNC.pm	2011-02-02 09:10:52 UTC (rev 5476)
@@ -7,6 +7,7 @@
 use PVE::Tools qw(extract_param);
 use PVE::Exception qw(raise raise_param_exc);
 use PVE::Cluster;
+use PVE::INotify;
 use PVE::JSONSchema qw(get_standard_option);
 use PVE::RESTHandler;
 use PVE::QemuServer;
@@ -57,9 +58,11 @@
 
 	my $port = PVE::Tools::next_vnc_port();
 
-	# fixme:
-	#my $remip = $rpcenv->get_remote_node_ip($node);
-	my $remip = undef;
+	my $remip;
+	
+	if ($node ne PVE::INotify::nodename()) {
+	    $remip = PVE::Cluster::remote_node_ip($node);
+	}
 
 	# fixme: select fastest chipher (none?)
 	my $remcmd = $remip ? ['/usr/bin/ssh', '-T', '-o', 'BatchMode=yes', $remip] : [];




More information about the pve-devel mailing list