Set up Spice-Gtk 0.12 with USB redirection on Ubuntu Precise

May 2, 2012

Qemu-kvm 1.0 has been built based on branch
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir
as of 04/29/2012. It contains all required usb redirection patches on
top of QEMU-KVM 1.0 release

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir043012

libcap-dev added to debian/control for virtfs support.

Build requires spice and spice-protocol 0.10.1 and the most recent usbredir 0.4.3
as of 04/02/2012.

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir75
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

$ sudo adduser $USER libvirtd
REBOOT

*************************************************************************
Link to PPA Set up Spice-Gtk 0.12 on Ubuntu Precise (v.3)
*************************************************************************


Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)

October 9, 2011

************************************************************************************************************************
UPDATE on 10/14/2011. Works on final release Ubuntu 11.10 . View also Set up Qemu&Spice&Libvirt 0.9.6 USB Redirection on Ubuntu 11.10
************************************************************************************************************************

Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 11.10 with intent to build Qemu-kvm 0.15.0 with usb redirection network support per http://planet.spice-space.org/ via git repository git://people.freedesktop.org/~jwrdegoede/qemu :-

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ git log|more

Spice-Gtk-0.7.4X has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.9.1. Build done on Ubuntu Oneiric.Packaged version version of Spice-Gtk-0.7.4X is built up on mentioned git repository with GTK2 and GTK3 as two sets of packages. Details may be viewed here .
Libusb-1.0-2:1.0.9-3ubuntu9 is built up on git://people.freedesktop.org/~jwrdegoede/libusb (pre 1.0.9). Usbredir-0.3.1-1ubuntu5 is built up on official release usbredir-0.3.1.tar.gz.
*********************************************************************************************************************
Running autogen.sh with exported environment variable NOCONFIGURE allows to perform it in one build per Debian’s Spice-Gtk-0.7-3 building schema.It has been already done as well. View:-
Spice-Gtk-0.7.46-314c been built per debian’s 0-7.3 schema
*********************************************************************************************************************

Currently two PPAs are ready to go :
1. Set up Qemu&Spice USB Redirection on Ubuntu 11.10 (Oneiric) v.1
2. Set up Qemu&Spice USB Redirection on Ubuntu 11.10 (Oneiric) v.2
*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir16
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client seabios \
libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

To install Livbirt and virtinst tools :-

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm

Qemu-kvm debian/rules contains:-

./configure \
--target-list="x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user" \
--prefix=/usr \
--interp-prefix=/etc/qemu-binfmt/%M \
--disable-blobs \
--disable-strip \
--enable-spice \
--enable-usb-redir \
$(conf_arch)

Spicy should be run by root, view http://planet.spice-space.org/. Make sure you’ve done on server

$ sudo apt-get install ipxe

Per Hans de Goede :-
Select the options menu entry and make sure that the “auto redirect newly plugged in USB devices” option is checked. After this make sure the vm has keyboard focus (so close the options menu), plug in a new USB device and watch it show up in your vm



Connection to remote KVM Spice enabled Server with USB Redirection on Oneiric :-



Copy from USB pen to remotely running qemu-kvm VM via spicy session issued by root on local box



Normal guest start via qemu-kvm with enabled usb redirection looks like :-
boris@boris-System-P5Q3:~$ sudo /usr/bin/kvm -cpu host -enable-kvm \
> -name VF15HQ -m 2048 \
> -drive file=/dev/sdb5,if=virtio,media=disk,aio=native,cache=off \
> -net nic,model=virtio -net user -localtime \
> -usb -vga qxl -spice port=5900,disable-ticketing \
> -device virtio-serial \
> -chardev spicevmc,id=vdagent,name=vdagent \
> -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
> -readconfig /etc/qemu/ich9-ehci-uhci.cfg \
> -chardev spicevmc,name=usbredir,id=usbredirchardev1 \
> -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 \
> -chardev spicevmc,name=usbredir,id=usbredirchardev2 \
> -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,debug=3 \
> -chardev spicevmc,name=usbredir,id=usbredirchardev3 \
> -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3,debug=3
do_spice_init: starting 0.9.1
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
ensure_display_channel_created: create display channel
ensure_cursor_channel_created: create cursor channel
*** EHCI support is under development ***
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
handle_dev_input: start
spice_server_char_device_add_interface: CHAR_DEVICE vdagent
reds_handle_auth_mechanism: Auth method: 1
reds_handle_main_link:
reds_disconnect:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
main_channel_link: add main channel client
reds_handle_main_link: NEW Client 0x2687990 mcc 0x26f8e30 connect-id 1804289383
main_channel_handle_parsed: agent start
handle_dev_input: mouse mode 2
main_channel_handle_parsed: net test: latency 0.292000 ms, bitrate 10893617021 bps (10388.962766 Mbps)
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x26f8d90 0x2687a20, 0
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
reds_handle_auth_mechanism: Auth method: 1
handle_dev_input: cursor connect
red_connect_cursor: add cursor channel client
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_display_peer:
handle_dev_input: connect
reds_handle_auth_mechanism: Auth method: 1
handle_new_display_channel: add display channel client
handle_new_display_channel: New display (client 0x2687990) dcc 0x2b76160 stream 0x26f8aa0
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_connect: inputs channel client create
display_channel_client_wait_for_init: creating encoder with id == 0
display_channel_release_item: not pushed (101)
spice_server_char_device_remove_interface: remove CHAR_DEVICE vdagent
handle_dev_input: mouse mode 1
spice_server_char_device_add_interface: CHAR_DEVICE vdagent
handle_dev_input: mouse mode 2
main_channel_handle_parsed: agent start
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x274a830 0x2725900, 0
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x26fddb0 0x2725900, 0
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 9:0, connected successfully, over Non Secure link
kvm: usbredirparser info: Peer version: spice-gtk 0.7.46-314c-dirty

red_channel_client_disconnect: 0x3879d80 (channel 0x23f36d0 type 9 id 0)
spice_server_char_device_remove_interface: remove CHAR_DEVICE vdagent
handle_dev_input: mouse mode 1

KVM itself may run ( via qemu command line) on any Oneiric box on the LAN with Qemu-kvm 0.15.0 with usb network redirection support (say address IP01).Spice-Gtk-0.7.46 should be installed on your local machine. Then run :-

# spicy -h IP01 -p 5900

Plug in USB pen on local box . It will be opened in Spicy session with remote qemu-kvm process.

Libvirt 0.9.6 is required to avoid qemu command line vm start and managing VMs via virsh XML definitions, what consequently allows to start VMs via virt-manager. Current version of libvirt in Oneiric is 0.9.2. I am not sure what version of libvirt will be choosed for Precise (12.04).Debian Unstable already contains 0.9.6.

Fedora 15 KVM running native spice-vdagent started via qemu command line







Oneiric KVM running built for Ubuntu spice-vdagent started via qemu command line






References
1. qemu-kvm-0.15.0-usbredir


Implementation Qemu-kvm 0.15.0,Spice Server and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the most recent approach

August 30, 2011

**********************************************************************************************
UPDATE on 09/21/11 Ubuntu 11.10 beta-2 will be released tomorrow.
Ubuntu 11.10 (Oneiric Ocelot) final release on 10/14/11
**********************************************************************************************
1. Set up Qemu-kvm 0.15.0(spice enabled), Spice Server (0.8.2), Spice-Gtk-0.7-2(via Debian)
Stable Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.8.2, Spice-Gtk-0.7-2 (via Debian)

2. First view :-
https://bderzhavets.wordpress.com/2011/10/09/usb-redirection-on-ubuntu-11-10-oneiric/
3. Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric). Experimental PPA Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
View also “Howto” Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
************************************************************************************************
Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. It’s based on PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled published on 08/20/11. The original version of Spice-Gtk-0.7-2 came from Debian Unstable didn’t support GObject-introspection. Original version 0.7-2 was not supposed to install files like *.gir and *.typelib. View projects /collab-maint/spice-gtk.git/ summary. No tag “unstable/0.7-3”.It also clearly shows that introspection went into Git Repo on 09/01/11. View [2] also regarding this issue. Original version 0.7-2 also required fixes for debian/control and debian/rules. To understand better why this step should be undertaken, please , view Introspection Overivew

Now I feel myself like a detective whose 4 weeks old case, somebody wants to drop. It’s really funny, because lack of understanding GObject-introspection when porting Spice-Gtk-0.7 from F16 do Debian (Ubuntu) is not a crime.

Moreover file http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc (been located at http://mentors.debian.net/package/spice-gtk) doesn’t exist on the Net any longer,which has been used by myself for :
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc

and spice-gtk-0.7-2 was a base I used to rebuild debian packages with introspection enabled, view my PPA
“Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled”. It means I did it on my own . Everything had been done by myself from scratch.
I really did it from scratch but in different way and at different time. View another my PPA : Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10 as of 08/10/11 and my article at LinuxToday Set up Spice-Gtk-0.7 on Ubuntu 11.10
******************************************************************************************************************
UPDATE on 09/12/11. Bug – https://bugzilla.redhat.com/show_bug.cgi?id=734680 doesn’t show up when running with spice (0.8.2) enabled qemu-kvm 0.15.0 with Oneiric patching
******************************************************************************************************************
UPDATE on 09/06/11. As of 09/05/11 Mentioned error has been fixed. Packaging schema changed vs been used on 09/01/11. Original version 0.7-2 (as of 08/16/11) may be viewed now only at QA page http://qa.debian.org/developer.php?login=bluestonechina%40gmail.com. Front page doesn’t contain it any longer. However, page Debian Tracking System shows the history and build logs 0.7-2 pretty clear.View projects /collab-maint/spice-gtk.git/ summary.

Version 0.7-3
Information
Version: 0.7-3
Uploaded: 2011-09-05 15:30
Source package: http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-3.dsc
Section: misc
Priority: optional
Closes bugs: 639936 640136 640138

View PPA Build Spice-Gtk-0.7 via Debian Unstable as of 09/06/11

View also : http://packages.qa.debian.org/s/spice-gtk.html
TODO section :-
mentors.debian.net has version 0.7-3 of this package, you should consider sponsoring its upload.

*****************************************************************************************************************
Now back to rebuild spice-gtk-0.7-2 from Debian (08/16/11) to enable introspection , which had been done on 08/20/11
*****************************************************************************************************************
Port Debian Unstable Spice Server (been built with embedded libcelt051) to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice/spice_0.8.2-2.dsc
$ dpkg-source -x spice_0.8.2-2.dsc
Port Debian Unstable version of Spice-Gtk-0.7 to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc
It requires rebuild to enable gobject-introspection,which was done in PPA "Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled" for Ubuntu 11.10.

Details may be viewed here :
Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

In particular,

1. Added –enable-introspection to debian/rules dh_auto_configure.

dh_auto_configure -B/build/buildd/spice-gtk-0.7/build-gtk3 -- \
--enable-smartcard=no --with-gtk=3.0 --disable-static --enable-introspection


dh_auto_configure -- \
--enable-smartcard=no --with-gtk=2.0 --disable-static --enable-introspection

2. Updated debian/control and added required dependencies

Build-Depends:
debhelper (>= 8.0.0),
libspice-protocol-dev (>= 0.8.1),
libspice-server-dev,
libpixman-1-dev (>= 0.17.7),
libgtk2.0-dev,
libgtk-3-dev,
libglib2.0-dev (>= 2.22),
libcairo2-dev (>= 1.2.0),
libpulse-dev,
python2.7,
python-gtk2-dev (>= 2.0.0),
python-pyparsing,
intltool,
libsasl2-dev,
libjpeg8-dev,
gobject-introspection, <=
libgirepository1.0-dev <=

The last two lines have been added.

3.Several debian/package_name.install files have been updated by adding right full path to corresponding library to accommodate installation of :-

/usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
/usr/share/gir-1.0/SpiceClientGLib-2.0.gir
/usr/share/gir-1.0/SpiceClientGtk-3.0.gir

which otherwise won’t be installed.

Added to libspice-client-glib-2.0-4.install
line usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib

Added to libspice-client-gtk-2.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib

Added to libspice-client-gtk-3.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib

Added to libspice-client-glib-2.0-dev.install
line usr/share/gir-1.0/SpiceClientGLib-2.0.gir

Added to libspice-client-gtk-3.0-dev.install
line usr/share/gir-1.0/SpiceClientGtk-3.0.gir

Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run.
******************************************************************************************************
The most recent snapshot for seabios supporting 64M vram for QXL device uploaded to ppa:bderzhavets/test-deb2,ppa:bderzhavets/test-deb1
******************************************************************************************************
Please, view regarding this issue [Qemu-devel] -vga qxl

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk spice-client \
seabios

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm
$ sudo reboot

In case trouble with “apt-get update” run :-

# sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys 5CC1785DC05C1EB5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.IbkrNcyBsB --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 5CC1785DC05C1EB5
gpg: requesting key C05C1EB5 from hkp server keyserver.ubuntu.com
gpg: key C05C1EB5: public key "Launchpad PPA for Boris Derzhavets" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
# sudo apt-get update

Normal install looks like :-

$ sudo apt-get install qemu-kvm qemu qemu-common \
> libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
> libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
> libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
> python-spice-client-gtk spice-client-gtk spice-client \
> seabios
[sudo] password for boris:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3 libspice-server1
libxerces-c28 msr-tools vgabios
Suggested packages:
kvm-pxe mol-drivers-macosx openbios-sparc ubuntu-vm-builder uml-utilities
The following NEW packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev libspice-client-gtk-2.0-1
libspice-client-gtk-2.0-dev libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev
libspice-server1 libxerces-c28 msr-tools python-spice-client-gtk qemu qemu-common qemu-kvm
seabios spice-client spice-client-gtk vgabios
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,977 kB of archives.
After this operation, 35.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y







References
1. Debian Tracking System
2.http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg3124003.html


Rebuild Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

August 20, 2011

Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. It’s based on PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled published on 08/20/11. The original version of Spice-Gtk-0.7-2 came from Debian Unstable didn’t support GObject-introspection. Original version 0.7-2 was not supposed to install files like *.gir and *.typelib. View projects /collab-maint/spice-gtk.git/ summary.It also clearly shows that introspection went into Git Repo on 09/01/11. View [2] also regarding this issue.
Original version 0.7-2 also required fixes for debian/control and debian/rules. To understand better why this step should be undertaken, please , view Introspection Overivew

Now I feel myself like a detective whose 4 weeks old case, somebody wants to drop. It’s really funny, because lack of understanding GObject-introspection when porting Spice-Gtk-0.7 from F16 do Debian (Ubuntu) is not a crime.

Moreover file http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc ( been located at http://mentors.debian.net/package/spice-gtk) doesn’t exist on the Net any longer,which has been used by myself for :
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc

and spice-gtk-0.7-2 was a base I used to rebuild debian packages with introspection enabled, view my PPA
“Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled”. It means I did it on my own . Everything had been done by myself from scratch.
I really did it from scratch but in different way and at different time. View another my PPA : Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10 as of 08/10/11 and my article at LinuxToday Set up Spice-Gtk-0.7 on Ubuntu 11.10
***********************************************************
Now back to rebuild spice-gtk-0.7-2 done on 08/20/11 :-
***********************************************************
Port Debian Unstable Spice Server (been built with embedded libcelt051) to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice/spice_0.8.2-2.dsc
$ dpkg-source -x spice_0.8.2-2.dsc
Port Debian Unstable version of Spice-Gtk-0.7 to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc
It requires rebuild to enable gobject-introspection,which was done in PPA “Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled” for Ubuntu 11.10.

Details may be viewed here :
Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

In particular,

1. Added –enable-introspection to debian/rules dh_auto_configure.

dh_auto_configure -B/build/buildd/spice-gtk-0.7/build-gtk3 -- \
--enable-smartcard=no --with-gtk=3.0 --disable-static --enable-introspection


dh_auto_configure -- \
--enable-smartcard=no --with-gtk=2.0 --disable-static --enable-introspection

2. Updated debian/control and added required dependencies

Build-Depends:
debhelper (>= 8.0.0),
libspice-protocol-dev (>= 0.8.1),
libspice-server-dev,
libpixman-1-dev (>= 0.17.7),
libgtk2.0-dev,
libgtk-3-dev,
libglib2.0-dev (>= 2.22),
libcairo2-dev (>= 1.2.0),
libpulse-dev,
python2.7,
python-gtk2-dev (>= 2.0.0),
python-pyparsing,
intltool,
libsasl2-dev,
libjpeg8-dev,
gobject-introspection, <=
libgirepository1.0-dev <=

The last two lines have been added.

3.Several debian/package_name.install files have been updated by adding right full path to corresponding library to accommodate installation of :-

/usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
/usr/share/gir-1.0/SpiceClientGLib-2.0.gir
/usr/share/gir-1.0/SpiceClientGtk-3.0.gir

which otherwise won’t be installed.

Added to libspice-client-glib-2.0-4.install
line usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib

Added to libspice-client-gtk-2.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib

Added to libspice-client-gtk-3.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib

Added to libspice-client-glib-2.0-dev.install
line usr/share/gir-1.0/SpiceClientGLib-2.0.gir

Added to libspice-client-gtk-3.0-dev.install
line usr/share/gir-1.0/SpiceClientGtk-3.0.gir

Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run. The most recent snapshot for seabios supporting 64M vram for QXL device
uploaded to ppa:bderzhavets/test-deb2, ppa:bderzhavets/test-deb1

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk spice-client \
seabios

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm
$ sudo reboot







References
1. http://mentors.debian.net/package/spice-gtk
2. http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg3124003.html