SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Powered by OpenStack 
GMOインターネット株式会社 
システム本部 第2サービス開発部 
河田 幸博 
Openstack SPICE console の検証(icehouse)
Powered by OpenStack 
•背景 
–VNC(RFB )consoleはGMOのサービスにも使用しているが、spiceは試したことがない。 
•目的 
–どんなものか動かしてみる、ポイントは 
•Guest OS とClient間でのテキストのコピーペースト機能 
•Guest OS 上のAudio device 動作 
•VNCとの違いやメリット・デメリット 
•結論 
–Horizonも対応しているがwebで操作させるconsoleとしての実装はwebproxy経由となる ので期待するコピーペースト機能やaudio機能は動作せず、VNC からみてメリットは全く ない。conoHa web console の実装の方が優れている。 
–spice-html5 (Javascript -webproxy arbiter)は開発途上の感あり、keymapはusしか対応し ていない。Ctrl-Alt-Del を送れないのでwindowsにログイン出来ないとか・・・ 
–Spice client にて直接接続する場合には、テキストのコピーペースト、audioの再生とかは 実際に動作する。まぁ面白い。 
–nova(cnode)にspiceの実装は存在するが、device config(xml)の設定がないので実際に 試すには、少々修正(後述)が必要となる。 
–nova-api やHorizonは修正する必要がなく、vnc かspice か動いている方へ接続する。 
Y. Kawada 
2014/10/2 
2
Powered by OpenStack 
2014/10/2 
Y. Kawada 
3 
•結果 
–Spice client から直接接続すれば、テキストのコピーペーストも可能 
–同様に audioデバイスも動作可能。Videoとかの音声が再生されます。 
•考察 
–VNC or SPICE を使用するかは instance 毎に設定がしたい。 
•instance_metadata とかに console device の設定やkeymap の設定を入れて、それ が反映されるようにするのが良いのだと思う。(conoHaではkeymap やvirtio on/off 等の設定は独自に組み込んでいる。) 
•現状では設定が、host(cnode)のnova.confに書かれる。 
–Guest OS側では、spice-vdagent + vdagentd が動いている必要がある。これがcopy/paste などの通信を行います。
Powered by OpenStack 
•Guest OS 
–CentOS 7 install 
•端末モードでは意味がないのでgnome環境等のインストールが必要 
–Windows 2008 server 
•conoHaで提供しているwindows osを使用した 
•http://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-0.74.exe 
これをインストールすればよい 
•Spice client (windows) 
–http://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-1.0.msi 
これを使用した 
2014/10/2 
Y. Kawada 
4 
# yum install spice-vdagent 
# cd /etc/systemd/system 
# cp ./spice-vdagentd.target.wants/spice-vdagentd.service ./graphical.target.wants 
# systemctl enable spice-vdagentd.service
Powered by OpenStack 
2014/10/2 
Y. Kawada 
5 
horizon -> CentOS 7 
Spice client -> window 2008 server 
サンプル
Powered by OpenStack 
•nova 
–nova-api server にwebproxy も置く 
2014/10/2 
Y. Kawada 
6 
[root@ih-api-p1]# cat /usr/bin/nova-spicehtml5proxy 
#!/usr/bin/python 
# PBR Generated from u'console_scripts' 
import sys 
from nova.cmd.spicehtml5proxy import main 
if __name__ == "__main__": 
sys.exit(main()) 
[root@ih-api-p1 ]# cd /usr/share/ 
[root@ih-api-p1 ]# git clone git://anongit.freedesktop.org/spice/spice-html5 ./spice-html5 
[root@ih-api-p1 ]# cat /etc/httpd/conf.d/spice.conf 
# 
# spice-html5 is a Javascript SPICE client 
# 
Alias /spice /usr/share/spice-html5 
<Directory /usr/share/spice-html5> 
# This page is broadly available, tune here to make it more restricted. 
Require all granted 
DirectoryIndex spice.html 
</Directory> 
[root@ih-api-p1 ]# cat /usr/lib/systemd/system/openstack-nova-spicehtml5proxy.service 
[Unit] 
Description=OpenStack Nova Spice HTML5 Proxy Server 
After=syslog.target network.target 
[Service] 
Type=simple 
User=nova 
ExecStart=/usr/bin/nova-spicehtml5proxy 
[Install] 
WantedBy=multi-user.target 
[root@ih-api-p1 ]# systemctl start openstack-nova-spicehtml5proxy.service
Powered by OpenStack 
•nova (api) 
–/etc/nova/nova.conf 
Spice に関係のある箇所だけ 
2014/10/2 
Y. Kawada 
7 
# # Options defined in nova.cmd.spicehtml5proxy # # Host on which to listen for incoming requests (string value) spicehtml5proxy_host=0.0.0.0 # Port on which to listen for incoming requests (integer # value) spicehtml5proxy_port=6082 [spice] # # Options defined in nova.spice # html5proxy_base_url=http://xxx.xxx.xxx.xxx:6082/spice_auto.html # nova-api(proxy) のアドレス # IP address on which instance spice server should listen # (string value) server_listen=0.0.0.0 # Enable spice related features (boolean value) enabled=True # Enable spice guest agent support (boolean value) agent_enabled=true
Powered by OpenStack 
•nova (cnode) 
–/etc/nova/nova.conf 
Spice に関係のある箇所だけ 
2014/10/2 
Y. Kawada 
8 
[DEFAULT] # Enable VNC related features (boolean value) vnc_enabled=False [spice] # # Options defined in nova.spice # html5proxy_base_url=http://xxx.xxx.xxx.xxx:6082/spice_auto.html # nova-api(proxy) のアドレス # IP address on which instance spice server should listen # (string value) server_listen=0.0.0.0 # The address to which proxy clients (like nova- # spicehtml5proxy) should connect (string value) server_proxyclient_address=10.0.0.22 # cnode (host)のアドレス # Enable spice related features (boolean value) enabled=True # Enable spice guest agent support (boolean value) agent_enabled=true
Powered by OpenStack 
2014/10/2 
Y. Kawada 
9 
diff --git a/virt/libvirt/config.py b/virt/libvirt/config.py 
index a931b57..e2ac9ea 100644 
--- a/virt/libvirt/config.py 
+++ b/virt/libvirt/config.py 
@@ -950,6 +950,23 @@ class LibvirtConfigGuestVideo(LibvirtConfigGuestDevice): 
return dev 
+class LibvirtConfigGuestSound(LibvirtConfigGuestDevice): # Y.Kawada 
+ 
+ def __init__(self, **kwargs): 
+ super(LibvirtConfigGuestSound, self).__init__(root_name="sound", 
+ **kwargs) 
+ # pcspk PC speaker 
+ # hda Intel HD Audio 
+ # ac97 Intel 82801AA AC97 Audio 
+ self.type = "ich6" # for windows 2008 
+ # self.type = "ac97" # for Centos7 
+ 
+ def format_dom(self): 
+ dev = super(LibvirtConfigGuestSound, self).format_dom() 
+ dev.set("model", self.type) 
+ 
+ return dev 
+ 
class LibvirtConfigGuestController(LibvirtConfigGuestDevice): 
@@ -1053,6 +1070,27 @@ class LibvirtConfigGuestCharBase(LibvirtConfigGuestDevice): 
return dev 
+class LibvirtConfigGuestCharSpiceBase(LibvirtConfigGuestDevice): # Y.Kawada 
+ 
+ def __init__(self, **kwargs): 
+ super(LibvirtConfigGuestCharSpiceBase, self).__init__(**kwargs) 
+ 
+ self.type = "spicevmc" 
+ self.source_path = None 
+ 
+ def format_dom(self): 
+ dev = super(LibvirtConfigGuestCharSpiceBase, self).format_dom() 
+ 
+ dev.set("type", self.type) 
+ if self.type == "file": 
+ dev.append(etree.Element("source", path=self.source_path)) 
+ elif self.type == "unix": 
+ dev.append(etree.Element("source", mode="bind", 
+ path=self.source_path)) 
+ 
+ return dev 
+ 
+ 
class LibvirtConfigGuestChar(LibvirtConfigGuestCharBase): 
def __init__(self, **kwargs): 
@@ -1083,7 +1121,7 @@ class LibvirtConfigGuestConsole(LibvirtConfigGuestChar): 
**kwargs) 
-class LibvirtConfigGuestChannel(LibvirtConfigGuestCharBase): 
+class LibvirtConfigGuestChannel(LibvirtConfigGuestCharSpiceBase): # Y.Kawada 
def __init__(self, **kwargs): 
super(LibvirtConfigGuestChannel, self).__init__(root_name="channel", 
nova (cnode) source 修正1
Powered by OpenStack 
2014/10/2 
Y. Kawada 
10 
diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py 
index 1e14892..c7f0e03 100644 
--- a/virt/libvirt/driver.py 
+++ b/virt/libvirt/driver.py 
@@ -3385,6 +3385,11 @@ class LibvirtDriver(driver.ComputeDriver): 
video.vram = video_ram 
guest.add_device(video) 
+ # Y.Kawada 
+ # VALID_SOUND_DEVICES = ("ac97", "hda", "pcspk", "ich6") 
+ sound = vconfig.LibvirtConfigGuestSound() 
+ guest.add_device(sound) 
+ 
# Qemu guest agent only support 'qemu' and 'kvm' hypervisor 
if CONF.libvirt.virt_type in ('qemu', 'kvm'): 
qga_enabled = False 
nova (cnode) source 修正2 
以上、御参考まで。

Contenu connexe

Tendances

Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region modeJoe Huang
 
ELFの動的リンク
ELFの動的リンクELFの動的リンク
ELFの動的リンク7shi
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haimharryvanhaaren
 
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月VirtualTech Japan Inc.
 
Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network InterfacesKernel TLV
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedBrendan Gregg
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpJames Denton
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみたMasakazu Asama
 
OpenStack with SR-IOV
OpenStack with SR-IOVOpenStack with SR-IOV
OpenStack with SR-IOVHideki Saito
 
NUCで始めるVMware Tanzu
NUCで始めるVMware TanzuNUCで始めるVMware Tanzu
NUCで始めるVMware TanzuHirotaka Sato
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27Kentaro Ebisawa
 
Pacemaker 操作方法メモ
Pacemaker 操作方法メモPacemaker 操作方法メモ
Pacemaker 操作方法メモMasayuki Ozawa
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線Motonori Shindo
 
TripleOの光と闇
TripleOの光と闇TripleOの光と闇
TripleOの光と闇Manabu Ori
 
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차Nalee Jang
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixBrendan Gregg
 

Tendances (20)

Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region mode
 
Deploying IPv6 on OpenStack
Deploying IPv6 on OpenStackDeploying IPv6 on OpenStack
Deploying IPv6 on OpenStack
 
ELFの動的リンク
ELFの動的リンクELFの動的リンク
ELFの動的リンク
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haim
 
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
 
Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network Interfaces
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting Started
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみた
 
OpenStack with SR-IOV
OpenStack with SR-IOVOpenStack with SR-IOV
OpenStack with SR-IOV
 
NUCで始めるVMware Tanzu
NUCで始めるVMware TanzuNUCで始めるVMware Tanzu
NUCで始めるVMware Tanzu
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27
 
Pacemaker 操作方法メモ
Pacemaker 操作方法メモPacemaker 操作方法メモ
Pacemaker 操作方法メモ
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
 
TripleOの光と闇
TripleOの光と闇TripleOの光と闇
TripleOの光と闇
 
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
Keystone fernet token
Keystone fernet tokenKeystone fernet token
Keystone fernet token
 

En vedette

Cloud Based VDI with OpenStack, by Shifen Yang
Cloud Based VDI with OpenStack, by Shifen YangCloud Based VDI with OpenStack, by Shifen Yang
Cloud Based VDI with OpenStack, by Shifen YangHui Cheng
 
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on Demand
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on DemandLinux VDI with OpenStack – How to Deliver Linux Virtual Desktops on Demand
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on DemandLeostream
 
Configuring OpenStack to Use the Xen Project Hypervisor
Configuring OpenStack to Use the Xen Project HypervisorConfiguring OpenStack to Use the Xen Project Hypervisor
Configuring OpenStack to Use the Xen Project HypervisorThe Linux Foundation
 
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!![OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!OpenStack Korea Community
 
Leostream Webinar - OpenStack VDI and DaaS
Leostream Webinar - OpenStack VDI and DaaSLeostream Webinar - OpenStack VDI and DaaS
Leostream Webinar - OpenStack VDI and DaaSLeostream
 
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...Leostream
 
neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_updateAkihiro Motoki
 
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStack
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStackGPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStack
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStackBrian Schott
 
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...OpenStack Korea Community
 

En vedette (9)

Cloud Based VDI with OpenStack, by Shifen Yang
Cloud Based VDI with OpenStack, by Shifen YangCloud Based VDI with OpenStack, by Shifen Yang
Cloud Based VDI with OpenStack, by Shifen Yang
 
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on Demand
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on DemandLinux VDI with OpenStack – How to Deliver Linux Virtual Desktops on Demand
Linux VDI with OpenStack – How to Deliver Linux Virtual Desktops on Demand
 
Configuring OpenStack to Use the Xen Project Hypervisor
Configuring OpenStack to Use the Xen Project HypervisorConfiguring OpenStack to Use the Xen Project Hypervisor
Configuring OpenStack to Use the Xen Project Hypervisor
 
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!![OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
 
Leostream Webinar - OpenStack VDI and DaaS
Leostream Webinar - OpenStack VDI and DaaSLeostream Webinar - OpenStack VDI and DaaS
Leostream Webinar - OpenStack VDI and DaaS
 
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...
OpenStack VDI and DaaS with Leostream and the Teradici Pervasive Cloud Comput...
 
neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_update
 
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStack
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStackGPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStack
GPU Accelerated Virtual Desktop Infrastructure (VDI) on OpenStack
 
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
[OpenStack Days Korea 2016] Track3 - VDI on OpenStack with LeoStream Connecti...
 

Similaire à Openstack SPICE console (icehouse) verification

Cloudstack user group meeting in osaka
Cloudstack user group meeting in osakaCloudstack user group meeting in osaka
Cloudstack user group meeting in osakaNaotaka Jay HOTTA
 
OpenStack Liberty をインストールしてみた
OpenStack Liberty をインストールしてみたOpenStack Liberty をインストールしてみた
OpenStack Liberty をインストールしてみたTakashi Umeno
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)Daisuke Ikeda
 
成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略Hiroshi SHIBATA
 
ネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefnpsg
 
Server side Swift & Photo Booth
Server side Swift & Photo Booth Server side Swift & Photo Booth
Server side Swift & Photo Booth LINE Corporation
 
OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門VirtualTech Japan Inc.
 
Apache cloudstack4.0インストール
Apache cloudstack4.0インストールApache cloudstack4.0インストール
Apache cloudstack4.0インストールYasuhiro Arai
 
ゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せますゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せますinfinite_loop
 
サーバー設定自動化は経営課題
サーバー設定自動化は経営課題 サーバー設定自動化は経営課題
サーバー設定自動化は経営課題 Maho Takara
 
Ansibleで始めるinfraTDD(初級編)
Ansibleで始めるinfraTDD(初級編)Ansibleで始めるinfraTDD(初級編)
Ansibleで始めるinfraTDD(初級編)佐久本正太
 
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)Takamasa Maejima
 
OpenStack base public cloud service by GMO Internet Inc., at 2013/12/12 Okin...
OpenStack base public cloud service by GMO Internet Inc.,  at 2013/12/12 Okin...OpenStack base public cloud service by GMO Internet Inc.,  at 2013/12/12 Okin...
OpenStack base public cloud service by GMO Internet Inc., at 2013/12/12 Okin...Naoto Gohko
 
Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)Yasuhiro Arai
 
Hive undocumented feature
Hive undocumented featureHive undocumented feature
Hive undocumented featuretamtam180
 

Similaire à Openstack SPICE console (icehouse) verification (20)

Cloudstack user group meeting in osaka
Cloudstack user group meeting in osakaCloudstack user group meeting in osaka
Cloudstack user group meeting in osaka
 
OpenStack Liberty をインストールしてみた
OpenStack Liberty をインストールしてみたOpenStack Liberty をインストールしてみた
OpenStack Liberty をインストールしてみた
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
 
Hadoop on LXC
Hadoop on LXCHadoop on LXC
Hadoop on LXC
 
成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略
 
ネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chef
 
Hbstudy41 auto scaling
Hbstudy41 auto scalingHbstudy41 auto scaling
Hbstudy41 auto scaling
 
Server side Swift & Photo Booth
Server side Swift & Photo Booth Server side Swift & Photo Booth
Server side Swift & Photo Booth
 
OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門
 
Apache cloudstack4.0インストール
Apache cloudstack4.0インストールApache cloudstack4.0インストール
Apache cloudstack4.0インストール
 
ゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せますゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せます
 
サーバー設定自動化は経営課題
サーバー設定自動化は経営課題 サーバー設定自動化は経営課題
サーバー設定自動化は経営課題
 
Ansibleで始めるinfraTDD(初級編)
Ansibleで始めるinfraTDD(初級編)Ansibleで始めるinfraTDD(初級編)
Ansibleで始めるinfraTDD(初級編)
 
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
 
Ansible handson
Ansible handsonAnsible handson
Ansible handson
 
No SSH (@nojima; KMC関東例会)
No SSH (@nojima; KMC関東例会)No SSH (@nojima; KMC関東例会)
No SSH (@nojima; KMC関東例会)
 
OpenStack base public cloud service by GMO Internet Inc., at 2013/12/12 Okin...
OpenStack base public cloud service by GMO Internet Inc.,  at 2013/12/12 Okin...OpenStack base public cloud service by GMO Internet Inc.,  at 2013/12/12 Okin...
OpenStack base public cloud service by GMO Internet Inc., at 2013/12/12 Okin...
 
Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)
 
Hive undocumented feature
Hive undocumented featureHive undocumented feature
Hive undocumented feature
 
Tottoruby 20110903
Tottoruby 20110903Tottoruby 20110903
Tottoruby 20110903
 

Openstack SPICE console (icehouse) verification

  • 1. Powered by OpenStack GMOインターネット株式会社 システム本部 第2サービス開発部 河田 幸博 Openstack SPICE console の検証(icehouse)
  • 2. Powered by OpenStack •背景 –VNC(RFB )consoleはGMOのサービスにも使用しているが、spiceは試したことがない。 •目的 –どんなものか動かしてみる、ポイントは •Guest OS とClient間でのテキストのコピーペースト機能 •Guest OS 上のAudio device 動作 •VNCとの違いやメリット・デメリット •結論 –Horizonも対応しているがwebで操作させるconsoleとしての実装はwebproxy経由となる ので期待するコピーペースト機能やaudio機能は動作せず、VNC からみてメリットは全く ない。conoHa web console の実装の方が優れている。 –spice-html5 (Javascript -webproxy arbiter)は開発途上の感あり、keymapはusしか対応し ていない。Ctrl-Alt-Del を送れないのでwindowsにログイン出来ないとか・・・ –Spice client にて直接接続する場合には、テキストのコピーペースト、audioの再生とかは 実際に動作する。まぁ面白い。 –nova(cnode)にspiceの実装は存在するが、device config(xml)の設定がないので実際に 試すには、少々修正(後述)が必要となる。 –nova-api やHorizonは修正する必要がなく、vnc かspice か動いている方へ接続する。 Y. Kawada 2014/10/2 2
  • 3. Powered by OpenStack 2014/10/2 Y. Kawada 3 •結果 –Spice client から直接接続すれば、テキストのコピーペーストも可能 –同様に audioデバイスも動作可能。Videoとかの音声が再生されます。 •考察 –VNC or SPICE を使用するかは instance 毎に設定がしたい。 •instance_metadata とかに console device の設定やkeymap の設定を入れて、それ が反映されるようにするのが良いのだと思う。(conoHaではkeymap やvirtio on/off 等の設定は独自に組み込んでいる。) •現状では設定が、host(cnode)のnova.confに書かれる。 –Guest OS側では、spice-vdagent + vdagentd が動いている必要がある。これがcopy/paste などの通信を行います。
  • 4. Powered by OpenStack •Guest OS –CentOS 7 install •端末モードでは意味がないのでgnome環境等のインストールが必要 –Windows 2008 server •conoHaで提供しているwindows osを使用した •http://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-0.74.exe これをインストールすればよい •Spice client (windows) –http://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-1.0.msi これを使用した 2014/10/2 Y. Kawada 4 # yum install spice-vdagent # cd /etc/systemd/system # cp ./spice-vdagentd.target.wants/spice-vdagentd.service ./graphical.target.wants # systemctl enable spice-vdagentd.service
  • 5. Powered by OpenStack 2014/10/2 Y. Kawada 5 horizon -> CentOS 7 Spice client -> window 2008 server サンプル
  • 6. Powered by OpenStack •nova –nova-api server にwebproxy も置く 2014/10/2 Y. Kawada 6 [root@ih-api-p1]# cat /usr/bin/nova-spicehtml5proxy #!/usr/bin/python # PBR Generated from u'console_scripts' import sys from nova.cmd.spicehtml5proxy import main if __name__ == "__main__": sys.exit(main()) [root@ih-api-p1 ]# cd /usr/share/ [root@ih-api-p1 ]# git clone git://anongit.freedesktop.org/spice/spice-html5 ./spice-html5 [root@ih-api-p1 ]# cat /etc/httpd/conf.d/spice.conf # # spice-html5 is a Javascript SPICE client # Alias /spice /usr/share/spice-html5 <Directory /usr/share/spice-html5> # This page is broadly available, tune here to make it more restricted. Require all granted DirectoryIndex spice.html </Directory> [root@ih-api-p1 ]# cat /usr/lib/systemd/system/openstack-nova-spicehtml5proxy.service [Unit] Description=OpenStack Nova Spice HTML5 Proxy Server After=syslog.target network.target [Service] Type=simple User=nova ExecStart=/usr/bin/nova-spicehtml5proxy [Install] WantedBy=multi-user.target [root@ih-api-p1 ]# systemctl start openstack-nova-spicehtml5proxy.service
  • 7. Powered by OpenStack •nova (api) –/etc/nova/nova.conf Spice に関係のある箇所だけ 2014/10/2 Y. Kawada 7 # # Options defined in nova.cmd.spicehtml5proxy # # Host on which to listen for incoming requests (string value) spicehtml5proxy_host=0.0.0.0 # Port on which to listen for incoming requests (integer # value) spicehtml5proxy_port=6082 [spice] # # Options defined in nova.spice # html5proxy_base_url=http://xxx.xxx.xxx.xxx:6082/spice_auto.html # nova-api(proxy) のアドレス # IP address on which instance spice server should listen # (string value) server_listen=0.0.0.0 # Enable spice related features (boolean value) enabled=True # Enable spice guest agent support (boolean value) agent_enabled=true
  • 8. Powered by OpenStack •nova (cnode) –/etc/nova/nova.conf Spice に関係のある箇所だけ 2014/10/2 Y. Kawada 8 [DEFAULT] # Enable VNC related features (boolean value) vnc_enabled=False [spice] # # Options defined in nova.spice # html5proxy_base_url=http://xxx.xxx.xxx.xxx:6082/spice_auto.html # nova-api(proxy) のアドレス # IP address on which instance spice server should listen # (string value) server_listen=0.0.0.0 # The address to which proxy clients (like nova- # spicehtml5proxy) should connect (string value) server_proxyclient_address=10.0.0.22 # cnode (host)のアドレス # Enable spice related features (boolean value) enabled=True # Enable spice guest agent support (boolean value) agent_enabled=true
  • 9. Powered by OpenStack 2014/10/2 Y. Kawada 9 diff --git a/virt/libvirt/config.py b/virt/libvirt/config.py index a931b57..e2ac9ea 100644 --- a/virt/libvirt/config.py +++ b/virt/libvirt/config.py @@ -950,6 +950,23 @@ class LibvirtConfigGuestVideo(LibvirtConfigGuestDevice): return dev +class LibvirtConfigGuestSound(LibvirtConfigGuestDevice): # Y.Kawada + + def __init__(self, **kwargs): + super(LibvirtConfigGuestSound, self).__init__(root_name="sound", + **kwargs) + # pcspk PC speaker + # hda Intel HD Audio + # ac97 Intel 82801AA AC97 Audio + self.type = "ich6" # for windows 2008 + # self.type = "ac97" # for Centos7 + + def format_dom(self): + dev = super(LibvirtConfigGuestSound, self).format_dom() + dev.set("model", self.type) + + return dev + class LibvirtConfigGuestController(LibvirtConfigGuestDevice): @@ -1053,6 +1070,27 @@ class LibvirtConfigGuestCharBase(LibvirtConfigGuestDevice): return dev +class LibvirtConfigGuestCharSpiceBase(LibvirtConfigGuestDevice): # Y.Kawada + + def __init__(self, **kwargs): + super(LibvirtConfigGuestCharSpiceBase, self).__init__(**kwargs) + + self.type = "spicevmc" + self.source_path = None + + def format_dom(self): + dev = super(LibvirtConfigGuestCharSpiceBase, self).format_dom() + + dev.set("type", self.type) + if self.type == "file": + dev.append(etree.Element("source", path=self.source_path)) + elif self.type == "unix": + dev.append(etree.Element("source", mode="bind", + path=self.source_path)) + + return dev + + class LibvirtConfigGuestChar(LibvirtConfigGuestCharBase): def __init__(self, **kwargs): @@ -1083,7 +1121,7 @@ class LibvirtConfigGuestConsole(LibvirtConfigGuestChar): **kwargs) -class LibvirtConfigGuestChannel(LibvirtConfigGuestCharBase): +class LibvirtConfigGuestChannel(LibvirtConfigGuestCharSpiceBase): # Y.Kawada def __init__(self, **kwargs): super(LibvirtConfigGuestChannel, self).__init__(root_name="channel", nova (cnode) source 修正1
  • 10. Powered by OpenStack 2014/10/2 Y. Kawada 10 diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py index 1e14892..c7f0e03 100644 --- a/virt/libvirt/driver.py +++ b/virt/libvirt/driver.py @@ -3385,6 +3385,11 @@ class LibvirtDriver(driver.ComputeDriver): video.vram = video_ram guest.add_device(video) + # Y.Kawada + # VALID_SOUND_DEVICES = ("ac97", "hda", "pcspk", "ich6") + sound = vconfig.LibvirtConfigGuestSound() + guest.add_device(sound) + # Qemu guest agent only support 'qemu' and 'kvm' hypervisor if CONF.libvirt.virt_type in ('qemu', 'kvm'): qga_enabled = False nova (cnode) source 修正2 以上、御参考まで。