Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) for Ubuntu Precise

**********************************************************************************************
UPDATE on 12/29/2011
**********************************************************************************************
View PPA https://launchpad.net/~bderzhavets/+archive/lib-usbredir53
Qemu-kvm 1.0 (in this PPA) has been built based on branch qemu-kvm-1.0-usbredir as of 12/29/2011. 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-usbredir1

********************************************************************************************
Procedure following bellow set up Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) on daily build of Ubuntu Precise (kernel 3.2.0-6). Qemu-kvm has been built via git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git, tag qemu-kvm-1.0. There is only one change to official libusb 1.0.9~rc3.

CFLAGS = -fPIC -Wall vs CFLAGS = -Wall in debian/rules.

*****************************
Set up system via PPA
*****************************

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir51
$ 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-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

For Spice-Gtk-0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper. Packaging schema follows [1]
to support gobject-introspection.

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd

RELOGIN

To set up Libvirt 0.9.8 and related packages via PPA mentioned above :-
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Works with QEMU-KVM 1.0 with no special patch.
To succeed with with Spice-Gtk-0.7.159 build I had to spleet GTK2 and GTK3 builds
into two set of packages.
GTK2 build debian/rules contains :-

override_dh_auto_configure:
./configure \
--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:
./configure \
--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'

I was not expecting Qemu&Spice USB redirection to work.
However, it seems to be working.





Snapshot on Server



Snapshot on remote WS


About these ads

One Response to Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) for Ubuntu Precise

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: