Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 12.04 and 11.10 with intend to build Qemu-kvm 1.0 with usb redirection network support per http://planet.spice-space.org/. Current build qemu-kvm for Ubuntu Precise is based on branch http://cgit.freedesktop.org/~jwrdegoede/qemu/. View similar PPA for Ubuntu Oneiric and Linux Mint 12 (Lisa) Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection and Libvirt 0.9.7-2 for Ubuntu Oneiric(v.6).Spice-Gtk-0.7.81 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.10.0. Builds have been done on Ubuntu Precise and Oneiric as well.Packaged version version of Spice-Gtk-0.7.81 is built up on mentioned git repository. 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, however requiring several updates to debian/control and debian/rules due to snapshots have to be done from current git tree.Upgrade version of Libvirt up to 0.9.7-2 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede.
$ 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-usbredir
Intermediate release :-
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir
clearly demonstrates that all usb redirection patches won’t be in Qemu-kvm 1.0 release
Libusb build is based on libusb-1.0.9-rc3 official package
Qemu-kvm 1.0 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)
VirtFS support is available.
*****************************************
To install packages from Precise PPA
*****************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir56
$ 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 \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo adduser $USER libvirtd
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
Successful install looks like :-
boris@UbuntuPrecise:~$ dpkg -l |grep libspice ii libspice-client-glib-2.0-4 0.7.81~4f76-2ubuntu6 GObject for communicating with Spice servers (runtime library) ii libspice-client-glib-2.0-dev 0.7.81~4f76-2ubuntu6 GObject for communicating with Spice servers (development files) ii libspice-client-gtk-2.0-1 0.7.81~4f76-2ubuntu6 GTK2 widget for SPICE clients (runtime library) ii libspice-client-gtk-2.0-dev 0.7.81~4f76-2ubuntu6 GTK2 widget for SPICE clients (development files) ii libspice-client-gtk-3.0-1 0.7.81~4f76-2ubuntu6 GTK3 widget for SPICE clients (runtime library) ii libspice-client-gtk-3.0-dev 0.7.81~4f76-2ubuntu6 GTK3 widget for SPICE clients (development files) ii libspice-protocol-dev 0.10.0-2ubuntu2 SPICE protocol headers ii libspice-server-dev 0.10.0-2ubuntu7 Header files and development documentation for spice-server ii libspice-server1 0.10.0-2ubuntu7 Implements the server side of the SPICE protocol boris@UbuntuPrecise:~$ dpkg -l |grep qemu ii qemu 1.0-usbredir-2ubuntu3 dummy transitional package from qemu to qemu-kvm ii qemu-common 1.0-usbredir-2ubuntu3 qemu common functionality (bios, documentation, etc) ii qemu-kvm 1.0-usbredir-2ubuntu3 Full virtualization on i386 and amd64 hardware boris@UbuntuPrecise:~$ dpkg -l |grep libvirt ii libvirt-bin 0.9.7-2ubuntu2 programs for the libvirt library ii libvirt0 0.9.7-2ubuntu2 library for interfacing with different virtualization systems ii python-libvirt 0.9.7-2ubuntu2 libvirt Python bindings
boris@boris-System-Product-P5Q3:~$ virsh version
Compiled against library: libvir 0.9.7
Using library: libvir 0.9.7
Using API: QEMU 0.9.7
Running hypervisor: QEMU 0.15.92
Per Hans de Goede – first create file /etc/qemu/ich9-ehci-uhci.cfg
[device "ehci"]
driver = "ich9-usb-ehci1"
addr = "1d.7"
multifunction = "on"
[device "uhci-1"]
driver = "ich9-usb-uhci1"
addr = "1d.0"
multifunction = "on"
masterbus = "ehci.0"
firstport = "0"
[device "uhci-2"]
driver = "ich9-usb-uhci2"
addr = "1d.1"
multifunction = "on"
masterbus = "ehci.0"
firstport = "2"
[device "uhci-3"]
driver = "ich9-usb-uhci3"
addr = "1d.2"
multifunction = "on"
masterbus = "ehci.0"
firstport = "4"
Upgrade version of Libvirt up to 0.9.7 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede (September 09, 2011):-
Change the first line from: <domain type=’kvm’> to:
<domain type=’kvm’ xmlns:qemu=’http://libvirt.org/schemas/domain/qemu/1.0′>
And add the following lines at the end, above the “</domain>” line:
<qemu:commandline>
<qemu:arg value=’-readconfig’/>
<qemu:arg value=’/etc/qemu/ich9-ehci-uhci.cfg’/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev1’/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3’/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev2’/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=ehci.0,debug=3’/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev3’/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev3,id=usbredirdev3,bus=ehci.0,debug=3’/>
</qemu:commandline>
Then run :-
# /etc/init.d/libvirt-bin restart
Remote Qemu&Spice USB redirection. WIN7 VM is running on Server. USB pen plugged in workstation located on the same LAN, with Spice-Gtk-0.7.81 installed. Connection installed via spicy running by root.
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package spice-client
E: Unable to locate package libusbredir
E: Unable to locate package libspice-protocol-dev
E: Unable to locate package libspice-client-glib-2.0-4
E: Couldn’t find any package by regex ‘ libspice-client-glib-2.0-4’
E: Unable to locate package libspice-client-gtk-2.0-1
E: Couldn’t find any package by regex ‘ libspice-client-gtk-2.0-1’
E: Unable to locate package python-spice-client-gtk
E: Unable to locate package gir1.2-spice-client-glib-2.0
E: Couldn’t find any package by regex ‘ gir1.2-spice-client-glib-2.0’
E: Unable to locate package gir1.2-spice-client-gtk-2.0
E: Couldn’t find any package by regex ‘ gir1.2-spice-client-gtk-2.0’
E: Unable to locate package gir1.2-spice-client-gtk-3.0
E: Couldn’t find any package by regex ‘ gir1.2-spice-client-gtk-3.0’
It was my fault . It was fixed yesterday night . I just forgot to copy package Spice-Gtk-0.7.81~4f76 to Oneiric PPA.
Now :-
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
seabios spice-client 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 \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0
$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
To start default network :-
sudo virsh net-start default
sudo virsh net-autostart default
If you copy and paste , then copy from HTML page not from from screen output of PPA description.
Successful install looks like :-
I’m getting errors trying to get to your ppa … did you take it offline or move the files?
No , I didn’t. What happens exactly ? Is it for precise or for oneiric ?
I’ve just made install on fresh Oneiric instance. No problems.
I need a detailed bug report. You could submit it to me via
Launchpad.
Install tested via
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir38
with no problems on Precise daily build 12/06/11.
All files are in place. To be able support you I need detailed bug report.
when I try to update my list I get ….
W: Failed to fetch http://ppa.launchpad.net/bderzhavets/lib-usbredir38/ubuntu/dists/oneiric/main/source/Sources 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/bderzhavets/lib-usbredir38/ubuntu/dists/oneiric/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/bderzhavets/lib-usbredir38/ubuntu/dists/oneiric/main/binary-i386/Packages 404 Not Found
info from uname -a
Linux crash 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
and I’m running Mint 12 64bit what else do you need?
Send me via email ( bderzhavets@yahoo.com)
1. Output :-
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir38
If it’s correct , then file bug against toolchain at Launchpad.
I did test on Mint 12 (64 bit) with no problems. But , in general, it
should be Oneiric, they might change policy.
Steve was able to attach ppa, he did mistake latter ( first comment)
This discussion should be brought to private. I am not sure my public
key gets imported
In particular , last summer I had following problem @Launchpad :-
View my PPA :-
https://launchpad.net/~bderzhavets/+archive/test-deb2
. . . . . . . .
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
Oops !
Read carefully post one more time and click on link for Oneiric PPA,
then you will see, that you should run :-
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir39
This PPA is for Oneiric, 38-th for Precise
alright … all better now …
thanks for pointing out that I can’t read 😉