mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
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.
This commit is contained in:
1 parent
e55540f0c3
commit
dfd490182c
1 file changed
+3
-4
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user