From dfd490182ccf41c4cd6d24010e71ce970b1b01d7 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 29 Jul 2011 18:23:15 +0200 Subject: [PATCH] Bug #757: Fix: start vnc proxy setup Fixed the access to the Hostname in which the VM is deployed. Improved proxy start by calling direcly the proxy script and not the launch.sh wrapper script. --- src/sunstone/models/SunstoneServer.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sunstone/models/SunstoneServer.rb b/src/sunstone/models/SunstoneServer.rb index d387b77acc..4c045e4872 100644 --- a/src/sunstone/models/SunstoneServer.rb +++ b/src/sunstone/models/SunstoneServer.rb @@ -246,15 +246,14 @@ class SunstoneServer end # The VM host and its VNC port - host = resource['HISTORY/HOSTNAME'] + host = resource['/VM/HISTORY_RECORDS/HISTORY[last()]/HOSTNAME'] vnc_port = resource['TEMPLATE/GRAPHICS/PORT'] # The noVNC proxy_port proxy_port = config[:vnc_proxy_base_port].to_i + vnc_port.to_i begin - novnc_cmd = "#{config[:novnc_path]}/utils/launch.sh" - pipe = IO.popen("#{novnc_cmd} --listen #{proxy_port} \ - --vnc #{host}:#{vnc_port}") + novnc_cmd = "#{config[:novnc_path]}/utils/wsproxy.py" + pipe = IO.popen("#{novnc_cmd} #{proxy_port} #{host}:#{vnc_port}") rescue Exception => e error = Error.new(e.message) return [500, error.to_json]