[ovirt-users] Guest VM Console Creation/Access using REST API and noVNC

Shanil S xielesshanil at gmail.com
Wed Jul 16 04:06:20 UTC 2014


Hi All,

We are waiting for your suggestions or comments on the same. If anyone
knows, please help us to sort out this issue.

-- 
Regards
Shanil


On Tue, Jul 15, 2014 at 3:55 PM, Shanil S <xielesshanil at gmail.com> wrote:

> Hi All,
>
> We want to access vm console by using noVNC and Rest api. We are using
> websocket proxy on the same machine where engine runs and we try to get the
> console access from the another server that is outside from this cluster.
>
> But when we try to connect the vnc_auto.html from the server using host
> ip, port and the password which we get from the ticket creation… it shows a
> Failed to connect to server (code: 1006).
>
> The following are the codes which we use to create the ticket… host,port
> and the password will get from the ticket and with the same details
> (host,port & password) we are able to connect the console using the vnc
> clients(TigerVNC etc.)
>
> try {
>                 var host = WebUtil.getQueryVar('host', '<?php echo
> $host?>');
>                 var port = WebUtil.getQueryVar('port', '<?php echo
> $port?>');
>   var path = WebUtil.getQueryVar('path', 'websockify');
>
>   var password = '<?php echo $password?>';
>
>         if ((!host) || (!port)) {
>                     updateState('failed',
>                         "Must specify host and port in URL");
>                     return;
>                 }
>
>                 rfb = new RFB({'target':       $D('noVNC_canvas'),
>                            'encrypt':      WebUtil.getQueryVar('encrypt',
>                                    (window.location.protocol ===
> "https:")),
>                            'true_color':
> WebUtil.getQueryVar('true_color', true),
>                            'local_cursor': WebUtil.getQueryVar('cursor',
> true),
>                            'shared':       WebUtil.getQueryVar('shared',
> true),
>                            'view_only':
> WebUtil.getQueryVar('view_only', false),
>                            'updateState':  updateState,
>                            'onPasswordRequired':  passwordRequired});
>                            rfb.connect(host, port, password, path);
>             }catch(e) {alert(e);
>
>
> Could you please check if there any issues with it and guide me how to get
> rid of this failed to connect error?
>
> I have attached the screen shots for further reference…
>
> --
> Regards
> Shanil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140716/0f84cc1c/attachment-0001.html>


More information about the Users mailing list