在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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM