kvm - spice 與 video





      <model type='vga' vram='9216' heads='1'/>
      <acceleration accel3d='yes' accel2d='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

* 當沒有設定 video 的 xml 時, libvirt 會自動加上 default 的 device





Virtual Device Interfaces (VDI)



  • Encryption - using OpenSSL
  • Live migration
  • Hardware cursor - processes and transmits cursor-specific commands
  • Image, palette and cursor caching - manages client caches to reduce bandwidth requirements
  • Windows drivers - Windows drivers for QXL display device and VDI-port
  • Image compression(QUIC, LZ, GLZ(history-based global dictionary), auto(heuristic compression choice per image))
  • Video streaming - heuristically identifies video streams and transmits M-JPEG video streams
  • Graphic commands - processes and transmits 2D graphic commands
  • Lip-sync - synchronizes video streams with audio clocks
  • Clipboard sharing


Homepage: http://spice-space.org/


Centos Install:

yum install spice-client

ubuntu 12.04:

  • qemu-kvm-spice - Full virtualization on amd64 hardware                   <-- VM hosts
  • spice-client - Implements the client side of the SPICE protocol            <-- Admin PC
  • spice-client-gtk - Simple clients for interacting with SPICE servers
  • spice-vdagent - Spice agent for Linux                                                <-- VM Guest


Window download:



spice server in qemu-kvm

# not require authentication and simply bind the server to on port 5900.
/usr/bin/qemu-kvm   ...    -vga qxl   -spice port=5900,addr=,disable-ticketing

"vga", "cirrus", "vmvga", "xen", "vbox", or "qxl"

# spice agent communication channel

-device virtio-serial-pci \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent

install the spice vdagent in guest

# yum install spice-vdagent
# chkconfig --add spice-vdagentd
# service start spice-vdagentd




spicec -h  [-p | -s PORT]   [-w PW]