FS#49179 - [spice-gtk3] spice-client-error-quark usb redirection failed. acces denied insufficient permissions

Attached to Project: Community Packages
Opened by teraflops (teraflops) - Monday, 02 May 2016, 16:31 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 23 December 2016, 10:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 20
Private No

Details

Description:
cannot use usb sticks in guest machines.

spice-client-error-quark usb redirection failed. acces denied insufficient permissions. using virt-manager. cannot redirect usb sticks.

as side detail I'm able to access smartphone via mtp (usb) in the guest machines.

packages:

community/spice-glib 0.31-1 [installed]
community/spice-gtk3 0.31-1 [installed]
community/virt-manager 1.3.2-5 [installed]
community/libvirt-glib 0.2.3-1 [installed]
community/libvirt 1.3.3-2 [installed]

Steps to reproduce:

insert a usb stick.

   8-eo.png (23.2 KiB)
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 23 December 2016, 10:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  thank you
Comment by Luis Nabais (luisnabais) - Wednesday, 11 May 2016, 09:40 GMT
I have the same issue, it happens with any USB device I try to redirect.

Packages installed:

libvirt 1.3.4-1
qemu 2.5.1-1
spice 0.12.6-2
spice-glib 0.31-1
spice-gtk3 0.31-1
systemd 229-3
virt-manager 1.3.2-5
Comment by Tolga Cakir (tolga9009) - Wednesday, 11 May 2016, 13:09 GMT
Same issue here aswell. On my desktop, everythings works fine (older package versions). On my laptop, I have latest package versions installed and it doesn't work. I've put my user in the same groups and libvirt / qemu are configured the same way on both systems.

Update: just updated my desktop from spice-gtk3 0.30-1 and spice-glib 0.30-1 to 0.31-1, now I have the same error on my desktop aswell. Configuration files are identical.
Comment by Isaac (isaac) - Tuesday, 14 June 2016, 19:07 GMT
I have the same issue.

Packages:
------------
libvirt 1.3.5-1
qemu 2.6.0-1
spice 0.12.7-1
spice-glib 0.31-1
spice-gtk3 0.31-1
systemd 230-4
virt-manager 1.3.2-5
------------
Comment by Sergej Pupykin (sergej) - Thursday, 16 June 2016, 14:30 GMT
Did you try solution from https://bbs.archlinux.org/viewtopic.php?id=210135&p=2

cat <<EOF >/etc/udev/rules.d/50-spice.rules
SUBSYSTEM=="usb", GROUP="spice", MODE="0660"
SUBSYSTEM=="usb_device", GROUP="spice", MODE="0660"
EOF

usermod -a -G spice $USER

?
Comment by Milan Knížek (MilanKnizek) - Thursday, 16 June 2016, 18:23 GMT
Yes, it did work.

The group "spice" did not exist on my system and I have not found it in the list of standard Arch Linux group names. I created it anyway.

The udev modifies ownership of /dev/bus/usb/XXX/YYY from root:root. I am not sure if it is the best way to set every plugged usb device as group-owned by spice.

Comment by Isaac (isaac) - Friday, 17 June 2016, 02:19 GMT
That solution worked for me as well. I have to agree with Milan regarding concern for setting every plugged usb device as group-owned by spice. However, I realize this is a workaround, so I'm hoping the final solution will address that :)
Comment by Milan Knížek (MilanKnizek) - Tuesday, 21 June 2016, 05:08 GMT
1st broken app: scanbd with Canon flatbed scanner stopped working (this would probably apply to xsane, too): because the USB scanner got "spice" group instead of "scanner"... I might modify the UDEV rule to apply only to flash disks, but because I tend to forget in a few weeks time, it seems better to keep the bug arising each time I need to use USB device in KVM rather then break other applications :-(
Comment by Tolga Cakir (tolga9009) - Tuesday, 21 June 2016, 09:12 GMT
Also, I've noticed this error only occurs in conjunction with USB Redirection module. When I assign USB devices directly to VMs before booting up the VM, I can use them without any issues.

Btw. this issue is not limited to USB storage devices, but all kind of USB devices.
Comment by raphael (rca) - Wednesday, 21 December 2016, 12:22 GMT
I have the same issue and I believe the bug is in the spice-glib package, not in this one. When I build the spice-glib package manually on my machine, usb redirection works as expected (with the same PKGBUILD). I believe the issue is that spice-glib needs polkit as a build time dependency or spice gets built without any mechanism to get the necessary privileges for usb redirection.
Comment by Isaac (isaac) - Wednesday, 21 December 2016, 19:49 GMT
I can confirm that manually building the spice-glib package on my machine fixes the issue. Here's what I did:
--------------
1. Download the PKGBUILD from https://www.archlinux.org/packages/community/x86_64/spice-glib/
2. Run makepkg to build it
3. Install it: pacman -U spice-glib-0.33-1-x86_64.pkg.tar.xz
4. Restart libvirtd for good measure
--------------
I can now use USB redirection without needing root! Thank you raphael for this fix!
Comment by Sergej Pupykin (sergej) - Wednesday, 21 December 2016, 20:56 GMT
I rebuilt spice-glib in repos. Does it fix this issue?
Comment by Isaac (isaac) - Wednesday, 21 December 2016, 21:31 GMT
I unfortunately still get the "insufficient permissions" issue after installing the newly built package. I then downgrade spice-glib using the package I built locally and the issue no longer occurs.
Comment by Sergej Pupykin (sergej) - Thursday, 22 December 2016, 17:28 GMT
spice-glib-0.33-3 should work I think
Comment by Isaac (isaac) - Thursday, 22 December 2016, 23:17 GMT
I just tried this version of the package from the official repo and can confirm that it works! Thank you!
Comment by raphael (rca) - Friday, 23 December 2016, 07:22 GMT
It works for me as well, thanks :)

Loading...