diff --git a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java index 4696b98b426..f350fc8c9ad 100644 --- a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java +++ b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java @@ -82,6 +82,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe String _localgw; String _eth1ip; String _eth1mask; + String _pubIp; @Override public Answer executeRequest(final Command cmd) { @@ -158,6 +159,8 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe fillNetworkInformation(cmd); cmd.setProxyPort(_proxyPort); cmd.setProxyVmId(_proxyVmId); + if(_pubIp != null) + cmd.setPublicIpAddress(_pubIp); return new StartupCommand[] {cmd}; } @@ -222,6 +225,8 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe } } + _pubIp = (String)params.get("public.ip"); + if(s_logger.isInfoEnabled()) s_logger.info("Receive proxyVmId in ConsoleProxyResource configuration as " + _proxyVmId); diff --git a/console-proxy/conf.dom0/agent.properties.in b/console-proxy/conf.dom0/agent.properties.in index 100f6532af8..7eaf336e198 100644 --- a/console-proxy/conf.dom0/agent.properties.in +++ b/console-proxy/conf.dom0/agent.properties.in @@ -2,6 +2,7 @@ instance=ConsoleProxy consoleproxy.httpListenPort=8002 +public.ip=65.19.181.3 #resource= the java class, which agent load to execute resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource