QEMU-KVM 1.0 patching to support USB Redirection for Ubuntu Precise as of 12/29/2011

************************************************************************************
UPDATE on 01/13/2012 Libvirt 0.9.9-1 and 0.9.8-2 on Ubuntu Precise (libnl3 > 3.2)

View Build libvirt 0.9.9-1 Build-Depend on libnl-3-dev on Precise
View Build libvirt 0.9.8-2 Build-Depend on libnl-3-dev on Precise
*************************************************************************************
Two options of building patched QEMU-KVM 1.0 are considered bellow.

First one : Qemu-kvm 1.0 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

Second one : Patching QEMU-KVM 1.0 (core git tree) via extracted patches set to support USB redirection on Ubuntu Precise. Generating patches set via commands
$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ git format-patch -M -C –output-directory \
/tmp/patches 30c044521889195f54a9f2c21310894f545994e8

First option) Qemu-kvm 1.0 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

Environment:-
Libusb 1.0.9~rc3 (official version)
Spice 0.10.0
Spice-Gtk-0.7.159
Libvirt 0.9.8
************************************
Setting up system via PPA
************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir53
$ 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 0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ 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

*************************************************************************************************
Second option) Patching QEMU-KVM 1.0 (core git tree) via extracted patches set to support USB redirection on Ubuntu Precise
*************************************************************************************************
Patching QEMU-KVM 1.0 (core git tree) via extracted patches set from

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ git format-patch -M -C –output-directory \
/tmp/patches 30c044521889195f54a9f2c21310894f545994e8

$ ls /tmp/patches
0001-usb-redir-Clear-iso-irq-error-when-stopping-the-stre.patch
0002-usb-redir-Dynamically-adjust-iso-buffering-size-base.patch
0003-usb-redir-Pre-fill-our-isoc-input-buffer-before-send.patch
0004-usb-redir-Try-to-keep-our-buffer-size-near-the-targe.patch
0005-usb-redir-Improve-some-debugging-messages.patch
0006-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
0007-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
0008-iohandlers-Add-enable-disable_write_fd_handler-funct.patch
0009-char-Add-framework-for-a-write-unblocked-callback.patch
0010-char-Update-send_all-to-handle-nonblocking-chardev-w.patch
0011-char-Equip-the-unix-tcp-backend-to-handle-nonblockin.patch
0012-char-Throttle-when-host-connection-is-down.patch
0013-virtio-console-Enable-port-throttling-when-chardev-i.patch
0014-spice-qemu-char.c-add-throttling.patch
0015-spice-qemu-char.c-remove-intermediate-buffer.patch
0016-usb-redir-Add-flow-control-support.patch
0017-virtio-serial-bus-replay-guest_open-on-migration.patch
0018-char-Disable-write-callback-if-throttled-chardev-is-.patch

Patches set applies to snapshot of git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
checkout tag qemu-kvm-1.0.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout qemu-kvm-1.0 -b work
$ cd ..
$ cp -R qemu-kvm qemu-kvm-1.0-release
The last folder is snapshot for patching during debian build

Environment:-
Libusb 1.0.9~rc3 (official version)
Spice 0.10.0
Spice-Gtk-0.7.159
Libvirt 0.9.8

******************************
Setting up system via PPA
******************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir54
$ 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 0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ 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

About these ads

One Response to QEMU-KVM 1.0 patching to support USB Redirection for Ubuntu Precise as of 12/29/2011

  1. [...] 1.0 Spice 0.10 Spice-Gtk-0.7.150 Libvirt 0.9.8. You can follow any responses to this entrance by a RSS 2.0 feed. You can leave a response, or trackback from your possess [...]

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: