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

在CentOS7下的OpenStack中配置使用Spice协议
by 无若
 
1. 需要的包
在计算节点上
#yum install spice-html5
 
注意:使用yum安装spice-html5不成功时,可以直接使用rpm方式下载后安装
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/s/spice-html5-0.1.6-1.el7.noarch.rpm
rpm -i spice-html5-0.1.6-1.el7.noarch.rpm
 
在控制节点上
yum install openstack-nova-spicehtml5proxy
 
2. 修改配置文件
这里假设
控制节点IP = 192.168.1.100
计算节点IP = 172.16.1.100
 
控制节点
/etc/nova/nova.conf
 
/etc/nova/nova.conf
[DEFAULT]
web=/usr/share/spice-html5
vnc_enabled=false
novnc_enabled=false
...
 
[vnc]
enabled=false
...
 
[spice]
 
html5proxy_host=0.0.0.0
html5proxy_port=6082
html5proxy_base_url=https://192.168.1.100:6082/spice_auto.html
 
# Enable spice related features (boolean value)
enabled=True
 
# Enable spice guest agent support (boolean value)
agent_enabled=true
 
# Keymap for spice (string value)
keymap=en-us
 
在控制节点上修改路由规则
iptables -I INPUT -p tcp -m multiport --dports 6082 -m comment --comment "Allow SPICE connections for console access " -j ACCEPT
 
修改计算节点配置
/etc/nova/nova.conf
[DEFAULT]
web=/usr/share/spice-html5
vnc_enabled=false
novnc_enabled=false
...
 
[vnc]
enabled=false
 
...
[spice]
 
html5proxy_base_url=https://192.168.1.100:6082/spice_auto.html
server_listen=0.0.0.0
server_proxyclient_address=172.16.10.100
 
# Enable spice related features (boolean value)
enabled=True
 
# Enable spice guest agent support (boolean value)
agent_enabled=true
 
# Keymap for spice (string value)
keymap=en-us
 
3. 重启服务
控制节点
# service httpd restart
# service openstack-nova-spicehtml5proxy start
# service openstack-nova-spicehtml5proxy status 
# systemctl enable openstack-nova-spicehtml5proxy
 
计算节点
# service openstack-nova-compute restart

 

posted @ 2016-06-21 15:34  拾穗云谷  阅读(2362)  评论(0编辑  收藏  举报