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

Advertisements

Set up Spice-Gtk-0.7.4X (USB redirection support), LibUsbredir 0.3.1, Qemu-kvm-0.15.0 (spice enabled), Spice Server&Client 0.9.1 on Ubuntu 11.10

September 30, 2011

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 Spice-Gtk-0.7.4X up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk working stable with development Spice version 0.9.1. Build done on Ubuntu Oneiric include USB redirection support , but due to obvious reasons stays just a feature which cannot be used for real redirection. If USB redirection will appear to be in Qemu-kvm upstream, then Ubuntu will be ready to pick it up.
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.
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. Of course no usb redirection really happens due to version of Qemu-kvm 0.15.0,compare with series of qxl and usbredir patches on top of 0.15.0 in Fedora 16. Version of Libvirt and etc. However, this version of Spice-Gtk >= 0.7.39 and should work stable with Spice 0.9.1
*********************************************************************************************************************
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.2 schema
*********************************************************************************************************************
GTK2 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

Original file spice-gtk-3/gtk/Makefile.am was updated to handle GTK3 build, otherwise GTK3 build failed building spicy.

--- spice-gtk.orig/gtk/Makefile.am      2011-10-03 20:00:55.150133286 +0400
+++ spice-gtk/gtk/Makefile.am   2011-10-03 20:06:51.446137091 +0400
@@ -352,6 +352,7 @@
        libspice-client-glib-2.0.la             \
        $(XRANDR_LIBS)                  \
        $(GTHREAD_LIBS)                 \
+        $(GTK_LIBS)                     \
        $(NULL)

 spicy_CPPFLAGS =                       \

GTK3 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="3.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir3
$ 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

Link to PPA

Following builds have been debianized in current PPA :-

Spice-Gtk 0.7.46-314c
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

Spice-Gtk 0.7.46-314c-dirty
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 3.0

Now type ‘make’ to build spice-gtk


Set up Spice-Gtk 0.7.4X with usb redirection support on Ubuntu 11.10 ( beta 2)

September 28, 2011

Following bellow is attempt to reproduce Hans de Goede blog entry
at http://planet.spice-space.org/ on Ubuntu 11.10 just to fix bug with Windows 7 KVM after set up Spice&KVM Server via PPA “Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.9.1, Spice-Gtk-0.7-2(via Debian)” ([2]). I’ve removed from local system all libspice_* packages after theirs install from mentioned PPA with intent to build and install new Spice-Gtk-0.7 system, based on the most recent snapshot of git://anongit.freedesktop.org/spice/spice-gtk, working stable with Spice 0.9.1. For bug description view [FFE] Please sync spice-gtk (0.7-2) from debian unstable (main) ([3]) #21. Second part of this post is describing Ubuntu PPA with packaged versions of pre (1.0.9) libusb, usbredir 0.3.1 and Spice-Gtk-0.7.4X has been built up on mentioned above git repository with GTK2

$ sudo apt-get install libpixman-1-dev libssl-dev \
libjpeg62-dev libgtk2.0-dev libgtk-3-dev \
libglib2.0-dev libcairo2-dev libpulse-dev \
libsasl2-dev libtext-csv-perl python-pyparsing \
python-gtk2-dev gobject-introspection \
libgirepository1.0-dev libcurl4-gnutls-dev \
librsvg2-dev iasl libaio-dev libasound2-dev \
libgnutls-dev libncurses5-dev libpci-dev \
libsdl1.2-dev libx11-dev nasm perl quilt \
sysv-rc uuid-dev zlib1g-dev \
libgudev-1.0-dev valac libtool gtk-doc-tools

First two steps per Hans de Goede ([1])

*******
Step 1
*******

git clone git://people.freedesktop.org/~jwrdegoede/libusb
cd libusb
git checkout -B for109 origin/for109
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make -j2
sudo make install

ln -s /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/libusb.so

*******
Step 2
*******

tar xvfj usbredir-0.3.1.tar.bz2
cd usbredir-0.3.1
make -j2 PREFIX=/usr LIBDIR=/usr/lib
sudo make PREFIX=/usr LIBDIR=/usr/lib install

*******
Step 3
*******

$ git clone git://anongit.freedesktop.org/spice/spice-gtk
$ cd spice-gtk
$ cat setUSBREDIR.sh
export LIBUSB_CFLAGS="-I/usr/include/libusb-1.0"
export LIBUSB_LIBS="-L/usr/lib/x86_64-linux-gnu -lusb-1.0"
export LIBUSBREDIRHOST_CFLAGS="-I/usr/include"
export LIBUSBREDIRHOST_LIBS="-L/usr/lib -lusbredirhost"
$. ./setUSBREDIR.sh
$ env |grep LIB
LIBUSBREDIRHOST_LIBS=-L/usr/lib -lusbredirhost
LIBUSBREDIRHOST_CFLAGS=-I/usr/include
LIBUSB_LIBS=-L/usr/lib/x86_64-linux-gnu -lusb-1.0
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0

Then run

$ ./autogen.sh --enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib

autoreconf: Entering directory `.’
autoreconf: running: autopoint –force
Copying file po/Makefile.in.in
autoreconf: running: aclocal –force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize –install –copy –force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux’.
libtoolize: copying file `build-aux/config.guess’
libtoolize: copying file `build-aux/config.sub’
libtoolize: copying file `build-aux/install-sh’
libtoolize: copying file `build-aux/ltmain.sh’
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4′.
libtoolize: copying file `m4/libtool.m4′
libtoolize: copying file `m4/ltoptions.m4′
libtoolize: copying file `m4/ltsugar.m4′
libtoolize: copying file `m4/ltversion.m4′
libtoolize: copying file `m4/lt~obsolete.m4′
autoreconf: running: /usr/bin/autoconf –force
autoreconf: running: /usr/bin/autoheader –force
autoreconf: running: automake –add-missing –copy –force-missing
autoreconf: Leaving directory `.’
You should update your ‘aclocal.m4’ by running aclocal.
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking how to print strings… printf
checking for style of include used by make… GNU
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking dependency style of gcc… gcc3
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for fgrep… /bin/grep -F
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking whether ln -s works… yes
checking the maximum length of command line arguments… 1572864
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format… func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format… func_convert_file_noop
checking for /usr/bin/ld option to reload object files… -r
checking for objdump… objdump
checking how to recognize dependent libraries… pass_all
checking for dlltool… no
checking how to associate runtime and link libraries… printf %s\n
checking for ar… ar
checking for archiver @FILE support… @
checking for strip… strip
checking for ranlib… ranlib
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking for sysroot… no
checking for mt… mt
checking if mt is a manifest tool… no
checking how to run the C preprocessor… gcc -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for dlfcn.h… yes
checking for objdir… .libs
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.o… (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking whether to enable maintainer-specific portions of Makefiles… yes
checking whether NLS is requested… yes
checking for intltool >= 0.40.0… 0.41.1 found
checking for intltool-update… /usr/bin/intltool-update
checking for intltool-merge… /usr/bin/intltool-merge
checking for intltool-extract… /usr/bin/intltool-extract
checking for xgettext… /usr/bin/xgettext
checking for msgmerge… /usr/bin/msgmerge
checking for msgfmt… /usr/bin/msgfmt
checking for gmsgfmt… /usr/bin/msgfmt
checking for perl… /usr/bin/perl
checking for perl >= 5.8.1… 5.12.4
checking for XML::Parser… ok
checking for msgfmt… (cached) /usr/bin/msgfmt
checking for gmsgfmt… (cached) /usr/bin/msgfmt
checking for xgettext… (cached) /usr/bin/xgettext
checking for msgmerge… (cached) /usr/bin/msgmerge
checking for ld used by GCC… /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld… yes
checking for shared library run path origin… done
checking for CFPreferencesCopyAppValue… no
checking for CFLocaleCopyCurrent… no
checking for GNU gettext in libc… yes
checking whether to use NLS… yes
checking where the gettext function comes from… libc
checking for pkg-config… /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0… yes
checking for gtkdoc-check… /usr/bin/gtkdoc-check
checking for gtkdoc-rebase… /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf… /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation… no
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking dependency style of gcc… (cached) gcc3
checking for gcc option to accept ISO C99… -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together… yes
checking whether byte ordering is bigendian… no
checking for python2… no
checking for python… /usr/bin/python
checking if -Wl,–version-script works… yes
checking for native Win32… no
checking sys/ipc.h usability… yes
checking sys/ipc.h presence… yes
checking for sys/ipc.h… yes
checking sys/shm.h usability… yes
checking sys/shm.h presence… yes
checking for sys/shm.h… yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking for PROTOCOL… yes
checking for PIXMAN… yes
checking for CELT051… yes
checking for SSL… yes
checking sasl/sasl.h usability… yes
checking sasl/sasl.h presence… yes
checking for sasl/sasl.h… yes
checking for sasl_client_init in -lsasl2… yes
checking which gtk+ version to compile against… 2.0
checking for GTK… yes
checking for XRANDR… yes
checking X11/XKBlib.h usability… yes
checking X11/XKBlib.h presence… yes
checking for X11/XKBlib.h… yes
checking What rendering backend to use….. cairo
checking for GLIB2… yes
checking for GOBJECT2… yes
checking for GIO… yes
checking for CAIRO… yes
checking for GTHREAD… yes
checking for PULSE… yes
checking for jpeg_destroy_decompress in -ljpeg… yes
checking for jpeglib.h…
checking for deflate in -lz… yes
checking for GUDEV… yes
checking for LIBUSB… yes
checking for LIBUSBREDIRHOST… yes
checking for makecontext… yes
checking for swapcontext… yes
checking for getcontext… yes
checking for GOBJECT_INTROSPECTION… yes
checking for gobject-introspection… yes
checking for valac… /usr/bin/valac
checking /usr/bin/valac is at least version 0.11.7… yes
checking for PYGTK… yes
checking for python version… 2.7
checking for python platform… linux2
checking for python script directory… ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory… ${exec_prefix}/lib/python2.7/dist-packages
checking whether /usr/bin/python version >= 2.0… yes
checking for headers required to compile python extensions… found
checking for supported warning flags…
checking whether gcc -std=gnu99 supports -Wall… yes
checking whether gcc -std=gnu99 supports -Wno-sign-compare… yes
checking whether gcc -std=gnu99 supports -Wno-deprecated-declarations… yes
checking which warning flags were supported… -Wall -Wno-sign-compare -Wno-deprecated-declarations
configure: creating ./config.status
config.status: creating Makefile
config.status: creating spice-client-glib-2.0.pc
config.status: creating spice-client-gtk-2.0.pc
config.status: creating spice-client-gtk-3.0.pc
config.status: creating spice-controller.pc
config.status: creating common/Makefile
config.status: creating common/win/Makefile
config.status: creating common/win/my_getopt-1.5/Makefile
config.status: creating data/Makefile
config.status: creating data/spicy.desktop.in
config.status: creating data/spicy.nsis
config.status: creating po/Makefile.in
config.status: creating python_modules/Makefile
config.status: creating gtk/Makefile
config.status: creating gtk/controller/Makefile
config.status: creating doc/Makefile
config.status: creating doc/reference/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing po/stamp-it commands
configure:

Spice-Gtk 0.7.44-3867-dirty
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

$ make -j3
$ sudo make install



Ubuntu Oneiric’s packaged version version of Spice-Gtk-0.7.4X is built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk with GTK2 and GTK3 as two builds.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. Of course no usb redirection really happens due to version of Qemu-kvm 0.15.0,compare with series of qxl and usbredir patches on top of 0.15.0 in Fedora 16. However, this version of Spice-Gtk >= 0.7.39 and should work stable with Spice 0.9.1

GTK2 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

GTK3 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="3.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir3
$ 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 Libvirt 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

Link to PPA
References
1.http://planet.spice-space.org/
2.https://launchpad.net/~bderzhavets/+archive/spice-test3
3.https://bugs.launchpad.net/ubuntu/oneiric/+bug/828785