noVNC with qemu/KVM on RHEL 6

1,608 views
Skip to first unread message

Madison Kelly

unread,
Oct 14, 2015, 12:15:37 PM10/14/15
to noVNC
Hi all,

  I'm pretty new to websockets in general and noVNC in particular. So I may be asking dumb questions. :)

  I've got a RHEL/CentOS 6 based HA cluster hosting KVM/qemu VMs. Separate from this, I have a management machine users access to do standard stuff like boot VMs, migrate them, etc. I would like to add in-browser access to their servers using noVNC, but I am having trouble getting even a basic test setup running. Though I want to eventually run noVNC on this management machine, to start, I am trying to run noVNC directly on the node hosting the VM.

Here's a sample server I am trying to access:

====
[root@node1 ~]# virsh dumpxml server | grep -e graphics -e listen
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
====

I disabled selinux and iptables for now, to keep things simple. So with the above, I try this:

====
[root@node1 ~]# /usr/bin/novnc_server --vnc localhost:5900
Starting webserver and WebSockets proxy on port 6080
WARNING: no 'numpy' module, HyBi protocol will be slower
WebSocket server settings:
  - Listen on :6080
  - Flash security policy server
  - Web server. Web root: /usr/share/novnc
  - SSL/TLS support
  - proxying from :6080 to localhost:5900


Navigate to this URL:

    http://node1.ccrs.bcn:6080/vnc.html?host=node1.ccrs.bcn&port=6080

Press Ctrl-C to exit
====

I open a browser on the same network and follow the above link, enter the root password and I get "Starting VNC handshake" and it just sits there. On the node, I see this:

====
10.20.255.254 - - [14/Oct/2015 16:06:30] 10.20.255.254: Plain non-SSL (ws://) WebSocket connection
10.20.255.254 - - [14/Oct/2015 16:06:30] 10.20.255.254: Version hybi-13, base64: 'False'
10.20.255.254 - - [14/Oct/2015 16:06:30] 10.20.255.254: Path: '/websockify'
10.20.255.254 - - [14/Oct/2015 16:06:30] connecting to: localhost:5900
====

There it sits, never connecting.

So two-fold question;

1. Any idea why this simple setup might not be working?
2. Is there any documentation on having noVNC on one machine access VMs on a remote machine using something akin to 'qemu+ssh://root@node1/system' like virtual-machine manager does?

Thanks!

digimer

Madison Kelly

unread,
Oct 14, 2015, 12:27:23 PM10/14/15
to noVNC

Additional information:

I enabled logging=debug and tried again (in chrome) and saw this:

====
>> Keyboard.allKeysUp
util.js:214 << Keyboard.allKeysUp
util.js:218
util.js:216 Detected binaryType support in WebSockets
util.js:214 >> RFB.connect
util.js:216 connecting to ws://node1.ccrs.bcn:6080/websockify
util.js:216 Detected binaryType support in WebSockets
util.js:214 << RFB.connect
util.js:214 >> WebSock.onopen
util.js:216 Server choose sub-protocol: binary
util.js:218  Msg: Starting VNC handshake
util.js:214 << WebSock.onopen
====

That's where it hangs.

digimer

Madison Kelly

unread,
Oct 14, 2015, 1:07:02 PM10/14/15
to noVNC
Well, as is often the case, you ask for help just before figuring it out on your own...

Turns out, it was spice. I thought, incorrectly, that because ovirt/rhev/etc used it, it supported spice. When I switched it to vnc, it worked.

Thanks.

digimer


On Wednesday, 14 October 2015 12:15:37 UTC-4, Madison Kelly wrote:
Reply all
Reply to author
Forward
0 new messages