[one-users] Getting VNC Information with Java API

Daniel Molina dmolina at opennebula.org
Wed Aug 14 03:58:20 PDT 2013


Hi,

On 14 August 2013 11:14, <chenxiang at aquala-tech.com> wrote:

> Hi,
>
> I am trying to integrate OpenNebula into an in-house web UI though the OCA
> Java API. I am able to carry out VM life cycle management tasks through
> the Java API. However, I can't find how I can get the VNC information for
> a VM so that I can integrate this into my own noVNC.
>
> With the VirtualMachine class, I can obtain the VNC host and port for any
> particular VM, but that is for direct connection to the host running the
> VM, not the noVNC connection parameters. Then I found the VNC proxy port
> 29876 in sunstone-server.conf, and add the VM-ID to 29876, then trying to
> conned with noVNC to that port, but failed.
>

noVNC is used as a proxy and you have to use tokens to be able to connect
to different vms. For example, this how it's done in Sunstone.

When the vnc icon is clicked a new token is generated in the server:
https://github.com/OpenNebula/one/blob/master/src/sunstone/OpenNebulaVNC.rb#L146

then that token is used to connect to the noVNC proxy:
https://github.com/OpenNebula/one/blob/master/src/sunstone/public/js/plugins/vms-tab.js#L3195

Hope this helps.


>
> Please help.
>
> Chen Xiang
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Join us at OpenNebulaConf2013 <http://opennebulaconf.com/> in Berlin, 24-26
September, 2013
--
Daniel Molina
Project Engineer
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130814/8b180346/attachment-0002.htm>


More information about the Users mailing list