You are not logged in.
I have a problem with redirecting USB devices in virt-manager.
It worked some time ago without any hassle but now when I try to redirect usb printer or any other device I get following error message:
spice-client-error-quark: Could not redirect Samsung Electronics Co., Ltd. ML-2160 Series [04e8:330f] at 1-3: Could not open usb device: Access denied (insufficient permissions) [-3] (0)
It says I have insufficient permissions but I haven't changed anything in perms since I installed virt-manager, libvirtd and qemu. I run my guests as nobody:kvm (default config). I'm asked about my user's password when starting virt-manager.
It looks like some recent (about two weeks period) updated messed up with usb redirection or I'm missing some configuration.
$ pacman -Q libvirt qemu virt-manager spice systemd
libvirt 1.3.2-3
qemu 2.5.0-1
virt-manager 1.3.2-3
spice 0.12.6-2
systemd 229-3
Last edited by mmarzantowicz (2016-03-14 23:47:04)
Offline
Running virtual machine as root:root doesn't help either.
I also checked that /usr/bin/spice-client-glib-usb-acl-helper has suid set (according to some recommendation found on other forums).
Nothing helped so far. I hope it's not udev/systemd related.
Offline
Seems to be something with the recent spice-gtk3 and spice-glib package.
My workaround was to force remove spice-gtk3 and spice-glib, install spice-glib, remove some of the files that preventend a downgrade and install the old spice-gtk3 package from the pacman cache.
sudo pacman -Rdd spice-gtk3 spice-glib
sudo pacman -S spice-glib
sudo rm /usr/bin/spicy-screenshot /usr/bin/spicy-stats /usr/include/spice-client-glib-2.0/channel-cursor.h /usr/include/spice-client-glib-2.0/channel-display.h /usr/include/spice-client-glib-2.0/channel-inputs.h /usr/include/spice-client-glib-2.0/channel-main.h /usr/include/spice-client-glib-2.0/channel-playback.h /usr/include/spice-client-glib-2.0/channel-port.h /usr/include/spice-client-glib-2.0/channel-record.h /usr/include/spice-client-glib-2.0/channel-smartcard.h /usr/include/spice-client-glib-2.0/channel-usbredir.h /usr/include/spice-client-glib-2.0/channel-webdav.h /usr/include/spice-client-glib-2.0/smartcard-manager.h /usr/include/spice-client-glib-2.0/spice-audio.h /usr/include/spice-client-glib-2.0/spice-channel-enums.h /usr/include/spice-client-glib-2.0/spice-channel.h /usr/include/spice-client-glib-2.0/spice-client.h /usr/include/spice-client-glib-2.0/spice-glib-enums.h /usr/include/spice-client-glib-2.0/spice-option.h /usr/include/spice-client-glib-2.0/spice-session.h /usr/include/spice-client-glib-2.0/spice-types.h /usr/include/spice-client-glib-2.0/spice-uri.h /usr/include/spice-client-glib-2.0/spice-util.h /usr/include/spice-client-glib-2.0/spice-version.h /usr/include/spice-client-glib-2.0/usb-device-manager.h /usr/include/spice-controller/spice-controller.h /usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib /usr/lib/libspice-client-glib-2.0.so /usr/lib/libspice-client-glib-2.0.so.8 /usr/lib/libspice-client-glib-2.0.so.8.5.0 /usr/lib/libspice-controller.so /usr/lib/libspice-controller.so.0 /usr/lib/libspice-controller.so.0.0.0 /usr/lib/pkgconfig/spice-client-glib-2.0.pc /usr/lib/pkgconfig/spice-controller.pc /usr/share/gir-1.0/SpiceClientGLib-2.0.gir /usr/share/gtk-doc/html/spice-gtk/SpiceAudio.html /usr/share/gtk-doc/html/spice-gtk/SpiceChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceCursorChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceDisplay.html /usr/share/gtk-doc/html/spice-gtk/SpiceDisplayChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceGtkSession.html /usr/share/gtk-doc/html/spice-gtk/SpiceInputsChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceMainChannel.html /usr/share/gtk-doc/html/spice-gtk/SpicePlaybackChannel.html /usr/share/gtk-doc/html/spice-gtk/SpicePortChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceRecordChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceSession.html /usr/share/gtk-doc/html/spice-gtk/SpiceSmartcardChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceSmartcardManager.html /usr/share/gtk-doc/html/spice-gtk/SpiceUsbDeviceManager.html /usr/share/gtk-doc/html/spice-gtk/SpiceUsbDeviceWidget.html /usr/share/gtk-doc/html/spice-gtk/SpiceUsbredirChannel.html /usr/share/gtk-doc/html/spice-gtk/SpiceWebdavChannel.html /usr/share/gtk-doc/html/spice-gtk/annotation-glossary.html /usr/share/gtk-doc/html/spice-gtk/api-index-deprecated.html /usr/share/gtk-doc/html/spice-gtk/api-index-full.html /usr/share/gtk-doc/html/spice-gtk/api-reference.html /usr/share/gtk-doc/html/spice-gtk/application-support.html /usr/share/gtk-doc/html/spice-gtk/ch01.html /usr/share/gtk-doc/html/spice-gtk/ch02.html /usr/share/gtk-doc/html/spice-gtk/ch03.html /usr/share/gtk-doc/html/spice-gtk/home.png /usr/share/gtk-doc/html/spice-gtk/index.html /usr/share/gtk-doc/html/spice-gtk/index.sgml /usr/share/gtk-doc/html/spice-gtk/left-insensitive.png /usr/share/gtk-doc/html/spice-gtk/left.png /usr/share/gtk-doc/html/spice-gtk/object-tree.html /usr/share/gtk-doc/html/spice-gtk/right-insensitive.png /usr/share/gtk-doc/html/spice-gtk/right.png /usr/share/gtk-doc/html/spice-gtk/spice-gtk-SpiceURI.html /usr/share/gtk-doc/html/spice-gtk/spice-gtk-Utilities.html /usr/share/gtk-doc/html/spice-gtk/spice-gtk-spice-version.html /usr/share/gtk-doc/html/spice-gtk/spice-gtk.devhelp2 /usr/share/gtk-doc/html/spice-gtk/style.css /usr/share/gtk-doc/html/spice-gtk/up-insensitive.png /usr/share/gtk-doc/html/spice-gtk/up.png /usr/share/locale/fr/LC_MESSAGES/spice-gtk.mo /usr/share/man/man1/spice-client.1.gz /usr/share/vala/vapi/spice-client-glib-2.0.deps /usr/share/vala/vapi/spice-client-glib-2.0.vapi /usr/share/vala/vapi/spice-protocol.vapi
sudo pacman -U spice-gtk3-0.30-2-x86_64.pkg.tar.xz
Offline
It works indeed. It's a bit complicated but thanks to your instructions I managed to make USB redirection work again.
Someone knows if it is a know and reported bug or should we file one somewhere?
Offline
I have faced the same issue - glad, that I'm not the only one. I could "temporarily" fix this issue by starting virt-manager as root via console: sudo virt-manager. I've tried several configurations, added my user to kvm and libvirt groups, but nothing helped. Wonder, what's the problem, cause this used to work without any hassle in the past.
Offline
I had the exact same error, so it's definitely a bug upstream somewhere. Unfortunately, you're fix didn't work for me. After I ran the commands I just got another error:
spice-client-error-quark: Could not redirect Silicon Labs CP2104 USB to UART Bridge Controller [---] at 1-3: Error setting USB device node ACL: 'Not authorized' (0)
Offline
@windozupdate: I've read on another forum that for ACL errors the following command might help: chmod u+s /usr/bin/spice-client-glib-usb-acl-helper
Offline
@tolga9009 tried your method, didn't work
Offline
Upstream packages are bugged. Issue https://bugs.archlinux.org/task/48829 seems to be related. It has been updated to 0.31 upstream and flagged out-of-date in Arch repo on 21th march. The update should be available soon (and most probably fixes our issues). Also, they have changed **alot** USB related stuff after releasing 0.31, better be prepared to downgrade next time.
Offline
Here are PKGBUILD's for spice-glib, spice-gtk3, and spice-protocol (version 0.31):
spice-glib:
# $Id: PKGBUILD 164477 2016-03-03 13:24:42Z foutrelis $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stefano Facchini <stefano.facchini@gmail.com>
# Contributor: Jonathan Lestrelin <zanko@daemontux.org>
# Contributor: Lucio Zara <pennega@gmail.com>
pkgname=spice-glib
pkgver=0.31
pkgrel=1
pkgdesc="Gtk client and libraries for SPICE remote desktop servers (gtk3 version)"
arch=('i686' 'x86_64')
url="http://spice-space.org"
license=('LGPL2.1')
depends=('celt0.5.1' 'dbus-glib' 'libcacard' 'libpulse' 'usbredir' 'libsoup'
'cairo' 'libjpeg')
makedepends=('gobject-introspection' 'intltool' 'python2-pyparsing' 'spice-protocol' 'usbutils'
'vala' 'sdl' 'python2-six' 'pixman')
options=('!emptydirs')
source=("http://www.spice-space.org/download/gtk/spice-gtk-$pkgver.tar.bz2")
md5sums=('1ef438eabc19b0f339d746a93cab4f56')
build() {
cd "$srcdir/spice-gtk-$pkgver"
PYTHON=python2 ./configure --prefix=/usr \
--disable-static --enable-vala --with-gtk=no \
--with-audio=pulse \
--with-coroutine=gthread --sbindir=/usr/bin \
--enable-smartcard
make
}
package() {
cd "$srcdir/spice-gtk-$pkgver"
make DESTDIR="$pkgdir/" install
}
spice-gtk3:
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stefano Facchini <stefano.facchini@gmail.com>
# Contributor: Jonathan Lestrelin <zanko@daemontux.org>
# Contributor: Lucio Zara <pennega@gmail.com>
pkgname=spice-gtk3
pkgver=0.31
pkgrel=1
pkgdesc="Gtk client and libraries for SPICE remote desktop servers (gtk3 version)"
arch=('i686' 'x86_64')
url="http://spice-space.org"
license=('LGPL2.1')
depends=('celt0.5.1' 'dbus-glib' 'gtk3' 'libcacard' 'libpulse' 'usbredir' 'libsoup' 'spice-glib')
makedepends=('gobject-introspection' 'intltool' 'python2-pyparsing' 'spice-protocol' 'usbutils'
'vala' 'sdl' 'python2-six')
options=('!emptydirs')
source=("http://www.spice-space.org/download/gtk/spice-gtk-$pkgver.tar.bz2")
md5sums=('1ef438eabc19b0f339d746a93cab4f56')
build() {
cd "$srcdir/spice-gtk-$pkgver"
PYTHON=python2 LIBS=-lX11 ./configure --prefix=/usr \
--disable-static --enable-vala --with-gtk=3.0 \
--with-audio=pulse \
--with-coroutine=gthread --sbindir=/usr/bin \
--enable-smartcard
make
}
package() {
cd "$srcdir/spice-gtk-$pkgver"
make DESTDIR="$pkgdir/" install
pacman -Ql spice-glib | cut -f2 -d' ' | while read f; do
[ -f $pkgdir/$f ] && rm -f $pkgdir/$f || true
f=$(echo $f | sed 's|.gz$||')
[ -f $pkgdir/$f ] && rm -f $pkgdir/$f || true
done
}
spice-protocol:
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Patryk Kowalczyk < patryk at kowalczyk dot ws>
pkgname=spice-protocol
pkgver=0.12.11
pkgrel=1
pkgdesc="Headers for SPICE protocol"
arch=(any)
url="http://spice-space.org"
license=('BSD' 'LGPL2.1')
source=(http://spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2)
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
md5sums=('422bf0bc1eb34c8af3479a78b28e969b')
Offline
I've the same problem. Is there any solution for it? I don't know what to do with the answer from aeden
Offline
I've the same problem. Is there any solution for it? I don't know what to do with the answer from aeden
Copy the text for each box into a text editor and save them into three separate directories named 'PKGBUILD'. Then cd into each of those directories in the order 1. spice-protocol 2. spice-glib 3. spice-gtk3, and type 'makepkg -s' followed by 'pacman -U *.xz'.
Offline
Okay, thanks for you detailed explanation. But it doesn't work with "spice-glib" and I get the "error", that it's already installed....
After I updated the other packages I get the message in my windows-vm again:
"spice-client-error-quark: Could not redirect Garmin International Device [091e:26e5] at 2-4: Could not open usb device: Access denied (insufficient permissions) [-3] (0)"
Offline
Okay, thanks for you detailed explanation. But it doesn't work with "spice-glib" and I get the "error", that it's already installed....
After I updated the other packages I get the message in my windows-vm again:"spice-client-error-quark: Could not redirect Garmin International Device [091e:26e5] at 2-4: Could not open usb device: Access denied (insufficient permissions) [-3] (0)"
What I did was uninstall spice-glib (pacman -R) before installing the newer version. As a consequence this uninstalled virt-manager for me, but I reinstalled virt-manager at the end of the process.
Offline
Disregard my remarks; it looks like spice-glib and spice-gtk3 have finally been updated in the Archlinux repositories.
Last edited by aeden (2016-04-19 16:45:27)
Offline
Disregard my remarks; it looks like spice-glib and spice-gtk3 have finally been updated in the Archlinux repositories.
Okay, I don't understand it.... I just removed virt-manager, spice-glib and spice-gtk3 and did an "pacman -Syu" after it. It updated the system and after I reinstalled virt-manager and the other packages....
But the problem is there anymore ...
Offline
Does anyone managed to fix this issue? I have latest spice-gtk3 and spice-glib packages installed (0.31-1) but still can't redirect USB devices.
Offline
I've the problem also anymore. Is there a solution for it? There where no updates of spice-glib and spice-gtk3 in my Archlinux repositories since the last post of aeden
Offline
I can confirm that this problem persists.
Alas, it lets me redirect my scanner, but not any type of storage device (which is what i would need the most), but that was the already the case before version 0.31.
Offline
I used to do :
cat <<EOF >/etc/polkit-1/rules.d/50-spice.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.spice-space.lowlevelusbaccess" &&
subject.isInGroup("spice")) {
return polkit.Result.YES;
}
});
EOF
usermod -a -G spice $USER
It worked until today :-(
Offline
Same thing here, I am still getting
Access denied (insufficient permissions) [-3] (0)
with spice-glib 0.31-1. Should we reopen that bug report?
Offline
But is there any bug reported so it can be reopened? The only one https://bugs.archlinux.org/task/48829 was closed as fixed which is certainly not true. Either USB redirection is not so important and rarely used feature by only few people or this issue is very specific to configuration and/or hardware and isn't very common.
Offline
Offline
Thanks for opening bug report!
Offline
It might help to get yourself on the "watching" list or vote for the bug.
--
Milan Knizek
http://knizek.net
Offline