openstack novnc


OpenStack VNC console
In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the RFB protocol to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network. In IaaS system like OpenStack, VNC is a very convenient tool for end user to access the VMs by GUI.
 
 Nova provides two kinds of VNC proxies: noVNC and nova-xvpvncproxy.

Components

 To enable VNC console to access VMs started by OpenStack, we need many components to collaborate:
  • Components on controller node
    • nova-api, which is API server of OpenStack
    • nova-consoleauth, which is used to authorize VNC client
    • noVNC, which is a VNC proxy for browser. An alternative proxy is nova-xvpvncproxy, which can be accessed by a Java client at https://github.com/cloudbuilders/nova-xvpvncviewer.
  • Components on compute node
    • nova-compute, which is a nova binary to instantiate VMs
    • libvirt driver, which is used by nova-compute to interact with libvirt server
    • VNC server, which is part of hypervisor?

Steps for user to access VNC console

openstack novnc_第1张图片  
 The picture above shows the process how the noVNC starts to work:
 1. user requests the noVNC console URL by command:
[root@robinlinux utils]# nova  get-vnc-console myserver20 novnc
 

nova-api accepts this request, and then sends out "get_vnc_console" message to VM's related compute host

2. nova-compute running on that compute host accepts that message, generates a token and calls libvirt driver's get_vnc_console methods.

3. Libvirt driver will connect with libvirt server to get VM's vnc port, and look up the vnc host from FLAGS.vncserver_proxyclient_address.

4. nova-api will send out "authorize_console" message to nova-consoleauth, which then caches the connection information returned by compute-node with token as key

5. user browsers the URL returned the previous command, like below:

[root@robinlinux utils]# nova  get-vnc-console myserver20 novnc
+-------+----------------------------------------------------------------------------------+
|  Type |                                       Url                                        |
+-------+----------------------------------------------------------------------------------+
| novnc | http://controlnode:6080/vnc_auto.html?token=34ce7a44-6186-43d8-be14-2ea9e028b8fa |
+-------+----------------------------------------------------------------------------------+
 

6. noVNC, which is listening on 6080 HTTP port, accepts the URL request, sends out "check_token" message to nova-consoleauth

7. nova-consoleauth checks the cached connections and returns one according to the requested token key

8. noVNC begins the proxy work, connecting the VNC server

About configuration items in nova.conf

#read by nova-compute to compose vnc-console URL
# for novnc
novncproxy_base_url=http://controlnode:6080/vnc_auto.html
# for xvpvnc
xvpvncproxy_base_url=http://controlnode:6081/console
#read by nova-compute to instantiate VMs
vncserver_listen=0.0.0.0

#read by libvirt driver to compute vnc-console URL
vncserver_proxyclient_address=compute_node
 

  

 

你可能感兴趣的:(openstack novnc)