作者:【吴业亮】云计算开发工程师
博客:http://blog.csdn.net/wylfengyujiancheng
2.2. 实现协议
RDP协议
远程桌面协议(RDP, Remote Desktop Protocol)是一个多通道(multi-channel)的协议,让用户(客户端或称“本地电脑”)连上提供微软终端机服务的电脑(服务器端或称“远程电脑”)。大部分的Windows都有客户端所需软件。其他操作系统也有这些客户端软件,例如Linux、FreeBSD、Mac OS X。服务端电脑方面,则听取送到TCP3389端口的数据。
RDP也是windows流行的协议,但是随着目前的趋势来看还是使用spice更加有前途.
vnc
VNC (Virtual Network Computing)是虚拟网络计算机的缩写。VNC 是一款优秀的远程控制工具软件,由著名的 AT&T 的欧洲研究实验室开发的。VNC 是在基于 UNIX 和 Linux 操作系统的免费的开源软件,远程控制能力强大,高效实用,其性能可以和 Windows 和 MAC 中的任何远程控制软件媲美。 在 Linux 中,VNC 包括以下四个命令:vncserver,vncviewer,vncpasswd,和 vncconnect。大多数情况下我只需要其中的两个命令:vncserver 和 vncviewer。
spice
spice包括3个组件:
SPICE Driver :SPICE驱动器 存在于每个虚拟桌面内的组件;
SPICE Device:SPICE设备 存在于红帽企业虚拟化Hypervisor内的组件;
SPICE Client:SPICE客户端 存在于终端设备上的组件,可以是瘦客户机或专用的PC,用于接入每个虚拟桌面。
spice实现架构:
3. spice与vnc的区别
4. 开源spice协议支持的功能
当前支持功能:
图形界面 - processes and transmits 2D graphic commands
视频流 - heuristically identifies video streams and transmits M-JPEG video streams
图片压缩 - offers verios compression algorithm that were built specifically for Spice, including QUIC (based on SFALIC), LZ, GLZ (history-based global dictionary), and auto (heuristic compression choice per image)
硬件鼠标- processes and transmits cursor-specific commands
图像,颜色,鼠标缓存 - manages client caches to reduce bandwidth requirements
在线切换 - supports clients while migrating Spice servers to new hosts, thus avoiding interruptions
Windows 驱动 - Windows drivers for QXL display device and VDI-port
多监视器
客户端支持linux和windows - can be easily ported to additional platforms.
立体声音频 - supports audio playback and captures; audio data stream is optionally compressed using CELT
加密 - using OpenSSL
两种鼠标模式- provides client (more user-friendly) and server (increased accuracy and fully synchronized) modes
音频视频同步 - synchronizes video streams with audio clocks
Spice 代理 - running on the guest and performs tasks for the client
剪切板共享 - allows copy paste between clients and the virtual machine
未来将支持的新功能:
网络隧道 (in progress) - using virtual network interface to enable sharing of network resources. Currently the focus is on printer sharing but is not limited to that.
Off-screen surfaces (in progress) - supports off-screen surfaces as infrastructure for future DirectDraw, video acceleration and 3D acceleration. GDI and X11 will also benefit from this feature. It will also lay foundation for multi-head support
共享usb (in progress) - allows clients to share their USB devices with Spice servers
Direct Draw
客户端GUI - Enables user-friendly configuration
屏幕管理 - add support for enabling selection of the screen used by the client
配置文件 - enables persistent user and administrative settings
共享光驱 - share your CD with Spice server
视频加速
3D加速
支持Aero
Linux features parity
OSX client
Simultaneous clients connection
5. 官方文档参数介绍
6. 安装配置
6.1. 修改控制节点
安装源:
# yum install epel* centos-openstack-mitaka –y
# yum install centos-release-openstack-mitaka -y
安装软件
# yum install spice-server spice-protocol openstack-nova-spicehtml5proxy spice-html5
修改配置文件,注释掉原vnc相关配置,添加以下配置信息。
这里需要明确指定vnc_enabled=false,否则即使配置了spice,系统也仍然使用vnc(参考官方文档说明)
# vim /etc/nova/nova.conf
[default]
vnc_enabled=false
[spice]
html5proxy_host=172.16.8.100
html5proxy_port=6082
keymap=en-us
停止novncproxy并取消自启动
# systemctl stop openstack-nova-novncproxy.service
# systemctl disable openstack-nova-novncproxy.service
启用spicehtml5proxy开机自启动并启动它
# systemctl enable openstack-nova-spicehtml5proxy.service
# systemctl start openstack-nova-spicehtml5proxy.service
6.2. 修改计算节点
安装源:
# yum install epel* centos-openstack-mitaka –y
安装软件包
# yum install spice-server spice-protocol spice-html5
修改配置文件,注释掉原vnc相关配置,添加以下配置信息
# vim /etc/nova/nova.conf
[default]
vnc_enabled=false
[spice]
html5proxy_base_url=http://172.16.8.100:6082/spice_auto.html
server_listen=0.0.0.0
server_proxyclient_address=172.16.8.101 #计算计算的管理网IP
enabled=true
keymap=en-us
重启启动nova-compute
# systemctl restart openstack-nova-compute.service
7、其他说明:
基于ubuntu的spice
# apt-get install qemu-kvm-spice
安装完毕后在创建虚拟机时,qemu-kvm-spice自动替代原有虚拟化kvm功能
也可直接用spice专业客户端直接连接计算节点
客户端可直接从http://www.spice-space.org/download.html下载
参考:
http://wenku.baidu.com/view/e50de608a8114431b90dd811.html