OpenStack中VNC协议实现多屏共享
by 无若
 
libvirt设置基本说明:
 
  <devices>
<graphics type='sdl' display=':0.0'/>
<graphics type='vnc' port='5904' sharePolicy='allow-exclusive'>
<listen type='address' address='1.2.3.4'/>
</graphics>
<graphics type='rdp' autoport='yes' multiUser='yes' />
<graphics type='desktop' fullscreen='yes'/>
<graphics type='spice'>
<listen type='network' network='rednet'/>
</graphics>
</devices>
 
 
"vnc"
Starts a VNC server. The port attribute specifies the TCP port number (with -1 as legacy syntax indicating that it should be auto-allocated). The autoportattribute is the new preferred syntax for indicating autoallocation of the TCP port to use. The listen attribute is an IP address for the server to listen on. Thepasswd attribute provides a VNC password in clear text. The keymap attribute specifies the keymap to use. It is possible to set a limit on the validity of the password be giving an timestamp passwdValidTo='2010-04-09T15:51:00' assumed to be in UTC. The connected attribute allows control of connected client during password changes. VNC accepts keep value only. since 0.9.3 NB, this may not be supported by all hypervisors.
The optional sharePolicy attribute specifies vnc server display sharing policy. "allow-exclusive" allows clients to ask for exclusive access by dropping other connections. Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -Shared switch). This is the default value. "force-shared" disables exclusive client access, every connection has to specify -Shared switch for vncviewer. "ignore" welcomes every connection unconditionally since 1.0.6.
 
Rather than using listen/port, QEMU supports a socket attribute for listening on a unix domain socket path.Since 0.8.8 For VNC WebSocket functionality,websocket attribute may be used to specify port to listen on (with -1 meaning auto-allocation and autoport having no effect due to security reasons). Since 1.0.6
 
说明:
1、将sharePolicy设置为"ignore"则支持多屏不踢访问,使用安卓多屏共享访问时,需要开启此功能。
2、将sharePolicy设置为'allow-exclusive'则支持token和ip-port方式访问,这是默认设置,注意使用tightvnc有share connection设置,也支持共享连接(不踢)。
3、将sharePolicy设置为"force-shared"则仅支持token方式访问。
 
下面是临时修改:
#/usr/lib/python2.7/dist-packages/nova/virt/libvirt/config.py
class LibvirtConfigGuestGraphics(LibvirtConfigGuestDevice):

    def __init__(self, **kwargs):
super(LibvirtConfigGuestGraphics, self).__init__(root_name="graphics",
**kwargs) self.type = "vnc"
self.autoport = True
self.keymap = None
self.listen = None
self.sharePolicy = "ignore"
#test code compress
#self.image_compression = "auto_glz"
#self.streaming_mode = "filter" def format_dom(self):
dev = super(LibvirtConfigGuestGraphics, self).format_dom() dev.set("type", self.type)
if self.autoport:
dev.set("autoport", "yes")
else:
dev.set("autoport", "no")
if self.keymap:
dev.set("keymap", self.keymap)
if self.listen:
dev.set("listen", self.listen) dev.set("sharePolicy", "ignore")
#test code compress
#self.type == "spice" #drv_image = etree.Element("image")
#drv_image.set("compression", self.image_compression)
#dev.append(drv_image)
 
 
 
#/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py
 
        # NB some versions of libvirt support both SPICE and VNC
# at the same time. We're not trying to second guess which
# those versions are. We'll just let libvirt report the
# errors appropriately if the user enables both.
add_video_driver = False
if ((CONF.vnc_enabled and
CONF.libvirt.virt_type not in ('lxc', 'uml'))):
graphics = vconfig.LibvirtConfigGuestGraphics()
graphics.type = "vnc"
graphics.keymap = CONF.vnc_keymap
graphics.listen = CONF.vncserver_listen graphics.sharePolicy = "ignore" guest.add_device(graphics)
add_video_driver = True
 
 
 
 

OpenStack中VNC协议实现多屏共享(多屏不踢访问)的更多相关文章

  1. Linux&Windows中VNC协议及使用方法

    [转载]window下使用vnc远程登录ubuntu/linux图形界面_五个粽子_新浪博客http://blog.sina.com.cn/s/blog_677265f601012mqg.html V ...

  2. 在Ubuntu下的OpenStack中配置使用Spice协议

    在Ubuntu下的OpenStack中配置使用Spice协议 by 无若 ####控制节点#安装apt-get install nova-spiceproxy spice-html5 spice-vd ...

  3. 在CentOS7下的OpenStack中配置使用Spice协议

    在CentOS7下的OpenStack中配置使用Spice协议 by 无若   1. 需要的包 在计算节点上 #yum install spice-html5   注意:使用yum安装spice-ht ...

  4. 解决配置Ubuntu中vnc远程显示灰屏

    解决配置Ubuntu中vnc远程显示灰屏a. 缺失图形化工具b.  ~/.vnc/xstartup 权限不对1. Ubuntu 16.04 安装 VNC 及 Mate 桌面环境https://www. ...

  5. 探索 OpenStack 之(14):OpenStack 中 RabbitMQ 的使用

    本文是 OpenStack 中的 RabbitMQ 使用研究 两部分中的第一部分,将介绍 RabbitMQ 的基本概念,即 RabbitMQ 是什么.第二部分将介绍其在 OpenStack 中的使用. ...

  6. VNC协议分析

    VNC协议分析 摘自: http://blog.csdn.net/forever_feng/article/details/4703088 简介 VNC(Virtual Network Computi ...

  7. OpenStack 中 RabbitMQ 的使用

    OpenStack 中 RabbitMQ 的使用 本文是 OpenStack 中的 RabbitMQ 使用研究 两部分中的第一部分,将介绍 RabbitMQ 的基本概念,即 RabbitMQ 是什么. ...

  8. Openstack的vnc界面定制

    先来看一下青云的vnc界面: 在来看一下openstack的自带的vnc界面: 区别于感受 本身原理是一样的,但是vnc上面的html布局不一样而已,但是青云的vnc界面给人的感受是:清晰提示,信息给 ...

  9. 嵌入式操作系统VxWorks中网络协议存储池原理及实现

    嵌入式操作系统VxWorks中网络协议存储池原理及实现 周卫东 蔺妍 刘利强 (哈尔滨工程大学自动化学院,黑龙江 哈尔滨,150001) 摘  要  本文讨论了网络协议存储池的基本原理和在嵌入式操作系 ...

随机推荐

  1. 第14章:部署Java网站项目案例

    1 说明 (1) 项目迁移到k8s平台的流程 1) 制作镜像 dockerfile.docker+jenkins持续集成.镜像分类:基础镜像.中间镜像.项目镜像 2) 控制器管理pod 控制器管理po ...

  2. 第2章:Kubernetes核心概念

    Kubernetes是Google在2014年开源的一个容器集群管理系统,Kubernetes简称K8S. Kubernetes用于容器化应用程序的部署,扩展和管理,目标是让部署容器化应用简单高效. ...

  3. 14、iptables_nat源地址转换(内网共享上网)

    14.1.环境说明: 1.架构图:

  4. POJ 3087 Shuffle'm Up 模拟,看着不像搜索啊

    题意:给定s1,s1两副扑克,顺序从下到上.依次将s2,s1的扑克一张一张混合.例如s1,ABC; s2,DEF. 则第一次混合后为DAEBFC. 然后令前半段为s1, 后半段为s2. 如果可以变换成 ...

  5. Docker:docker部署PXC-5.7.21(mysql5.7.21)集群搭建负载均衡实现双机热部署方案

    单节点数据库弊端 大型互联网程序用户群体庞大,所以架构必须要特殊设计 单节点的数据库无法满足性能上的要求 单节点的数据库没有冗余设计,无法满足高可用 推荐Mysql集群部署方案 PXC (Percon ...

  6. Adaptive AUTOSAR 学习笔记 5 - 架构 - 物理视图

    本系列学习笔记基于 AUTOSAR Adaptive Platform 官方文档 R20-11 版本 AUTOSAR_EXP_PlatformDesign.pdf 缩写 AP:AUTOSAR Adap ...

  7. MQTT 2——服务端安装与客户端测试

    本篇记录一下MQTT服务器,客户端,JAVA客户端的选择开发与测试 MQTT服务端选择与安装过程:MQTT客户端测试工具安装与测试:MQTT JAVA客户端的选择与开发,测试 MQTT服务器选择与安装 ...

  8. 团队开发day01

    进行了项目的划分,负责开发android端的登录注册,网页端的登录注册, 以及服务器端的数据处理,请求响应 第一天任务:编写登录和注册的UI 遇到问题:对android的布局存在不了解,放置的图片lo ...

  9. HCNA Routing&Switching之动态路由协议OSPF DR和BDR

    前文我们了解了OSPF建立邻居关系的条件,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/15032907.html:今天我们来聊一聊OSPF中的DR和BDR: ...

  10. JAVA web环境搭建(使用Tomcat8整合httpd)

    说明:这里是Linux服务综合搭建文章的一部分,本文可以作为单独搭建Tomcat并整合httpd的参考. 注意:这里所有的标题都是根据主要的文章(Linux基础服务搭建综合)的顺序来做的. 如果需要查 ...