CentOS 6
Sponsored Link

SPICE Server2014/08/03

 
Install Desktop Virtualization "SPICE ( Simple Protocol for Independent Computing Environment )". It's possible to connect to virtual machines from remote client computer.
[1] Install SPICE Server if it's not installed yet. ( Normally it's already installed with KVM for dependency )
[root@dlp ~]#
yum -y install spice-server

[2] Edit existing virtual machine's xml-file and start virtual machine with SPICE like follows. This site's example has created a virtual machine without graphics, so it's OK to change settings like follows, but if you created virtual machine with a graphics, Remove "<graphics>***" and "<video>***" sections in xml file because qxl is used for graphics.
[root@dlp ~]#
virsh edit www
   
# edit the configration for a virtual machine "www"
<domain type='kvm'>
  <name>www</name>
  <uuid>3930e834-1bef-ba7e-9bc2-aaf2ff5cc359</uuid>
  <memory unit='KiB'>8491456</memory>
  <currentMemory unit='KiB'>8491456</currentMemory>
  <vcpu placement='static'>4</vcpu>
  .
  .
  .
     
# add following lines

     
# set any password for "passwd=***" section

     
# specify unique number for slot='0xxx' on sound section

     
# specify "slot='0x02'" on video section, that is fixed value for graphics

    <graphics type='spice' port='5900' 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='0x06' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='32768' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Domain www XML configuration edited.
[root@dlp ~]#
virsh start www
   
# start the virtual machine

Domain www started
[3]
Configuration of SPICE server is OK. See next page to connect to SPICE server from SPICE client.
[4] By the way, if you'd like to enable SPICE on initial creating a virtual machine, specify like follows. Then, it's possible to install Systems with SPICE which requires GUI like Windows without installing Desktop Environment on KVM Host computer.
[root@dlp ~]#
virt-install \
--name Win2k12R2 \
--ram 4096 \
--disk path=/var/kvm/images/Win2k12R2.img,size=80 \
--vcpus=2 \
--os-type windows \
--os-variant=win2k8 \
--network bridge=br0 \
--graphics spice,listen=0.0.0.0,password=password \
--video qxl \
--cdrom /tmp/X64FRE_SERVER_EVAL_JA-JP-IRM_SSS_X64FREE_JA-JP_DV5.ISO
  It's possible to install Windows from Client Machine with SPICE.
Matched Content