kvm - spice 與 video

 

 

 

XML:

    <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>

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

 


 

Spice

 

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:

http://www.spice-space.org/download.html

 

spice server in qemu-kvm

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

type
"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

 

 

Usage:

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