SPICEサーバー2014/12/25 |
|
デスクトップ仮想化 SPICE ( Simple Protocol for Independent Computing Environment )
をインストールし、仮想マシンにリモート接続できるようにします。
VNCのように接続先ホストが待ち受けるのではなく、KVM
ホスト側で仮想マシンへの接続を待ち受けるため、接続先の仮想マシンのネットワークはつながっていなくとも、KVM
ホストさえネットワークにつながっていれば仮想マシンへリモート接続できます。
まずは KVM ホスト側で仮想マシンが SPICE 対応で起動できるように設定します。
|
|
| [1] | SPICE サーバーインストール |
|
[root@dlp ~]# yum -y install spice-server spice-protocol |
| [2] | 既存の仮想マシンの xml ファイルを編集して SPICE 対応で起動します。 当サイトの仮想マシン作成例だとグラフィクスなしで作成しているため以下の変更のみで OK ですが、グラフィクスありで作成した場合は、xml ファイル中の、<graphics>~ と <video>~ のセクションは削除して以下の変更をしてください。 |
|
# 仮想マシン「fedora21」の設定編集 [root@dlp ~]# virsh edit fedora21 <domain type='kvm'> <name>fedora21</name> <uuid>ae4e5582-492a-4292-8da2-48320a7816e6</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>2</vcpu> . . . # 適当に下の方に以下を追記 # passwd=*** は任意のパスワードを設定 # slot='0x0*' は他と重複しない番号を指定
<graphics type='spice' port='5930' autoport='no' listen='0.0.0.0' passwd='password'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='32768' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
Domain fedora21 XML configuration edited.
[root@dlp ~]# virsh start fedora21 # 仮想マシン起動 Domain fedora21 started |
| [3] |
以上でSPICE対応での仮想マシン起動は完了です。SPICEクライアントからの接続は次項を参照ください。
|
| Sponsored Link |
|
|