I have a problem with GNOME Boxes 3.10.2, but zeenix from #boxes told me it's probably a bug with spice-gtk. My host operating system is Gentoo Linux while my guest operating system is Windows 7. I'm trying to add USB devices (such as a flash drive or a webcam) to the guest operating system via the appropriate interface in GNOME Boxes (Properties > Devices). First of all I make sure the "Redirect new USB devices" option is set to "on", then I set the USB device that appears on the list to "on", too. The problem is that the guest operating system doesn't recognize the device I added. Nothing happens. When I try with my USB flash drive it correctly gets disconnected from the host operating system when switching to "on" and it gets reconnected when switching to "off". But apart from that nothing happens in the guest operating system. ----- $ gnome-boxes Boxes-Message: machine.vala:149: display Microsoft Windows 7 disconnected Nothing else is displayed. ----- gnome-boxes, spice-gtk and qemu packages all have been emerged with the "usbredir" USE flag enabled. $ emerge -pv gnome-boxes spice-gtk qemu These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] net-misc/spice-gtk-0.21 USE="dbus gtk3 introspection policykit pulseaudio usbredir -doc -gstreamer -python -sasl -smartcard -static-libs -vala" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 0 kB [ebuild R ] app-emulation/qemu-1.6.1 USE="aio alsa caps curl fdt filecaps gtk jpeg ncurses opengl png pulseaudio sdl seccomp spice threads usb usbredir uuid vhost-net -accessibility -bluetooth -debug -glusterfs -iscsi -mixemu -python -rbd -sasl (-selinux) -smartcard -ssh -static -static-softmmu -static-user -systemtap -tci {-test} -tls -vde -virtfs -vnc -xattr -xen -xfs" PYTHON_TARGETS="python2_7 -python2_6" QEMU_SOFTMMU_TARGETS="x86_64 -alpha -arm -cris -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="-alpha -arm -armeb -cris -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32 -x86_64" 0 kB [ebuild R ] gnome-extra/gnome-boxes-3.10.2 USE="usbredir -smartcard" 0 kB Total: 3 packages (3 reinstalls), Size of downloads: 0 kB ----- Please tell me if you need further informations.
I'd start by making sure USB redirection is working with a fedora 20 guest. If it does not, it's more likely to be an installation issue/VM configuration issue/... than a spice-gtk issue.
Created attachment 95185 [details] Troubleshooting log from GNOME Boxes I noticed the usb=off option for the qemu-kvm command. Is that OK?
I just installed Fedora 20 as the guest OS, then tried to add a USB flash drive. It doesn't work. Same problem as with Windows.
I assume usbredir is installed on your system? Can you start the VM with Boxes, kill gnome-boxes so that it does not suspend it on exit, and then connect to it with remote-viewer spice://localhost:5900 and check if you can access the "File/USB Device Selection" menu?
Package usbredir is installed on my system: $ emerge -pv usbredir These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-apps/usbredir-0.6 USE="-static-libs" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB ----- I tried with the remote-viewer command. The USB device selection menu is there, but toggling my USB flash drive doesn't make Windows recognize it. Nothing happens, again.
(In reply to comment #5) > I tried with the remote-viewer command. The USB device selection menu is > there, but toggling my USB flash drive doesn't make Windows recognize it. > Nothing happens, again. Hmm, looks like things are mostly fine, can you try with a linux guest ?
I tried running remote-viewer with Fedora 20 as the guest operating system. Inside the guest I kept open a terminal with the following command running: $ watch -n 1 "dmesg | tail" Then I tried toggling my USB flash drive from the USB device selection menu. Unfortunately nothing happens.
Can you retest with the f20 host/remote-viewer after setting export SPICE_DEBUG=1 export G_MESSAGES_DEBUG=all ? Can you also attach the log file from ~/.cache/libvirt/qemu/log/ corresponing to your VM?
Created attachment 95236 [details] remote-viewer log remote-viewer spice://localhost:5900 log after having set SPICE_DEBUG=1 and G_MESSAGES_DEBUG=all
Created attachment 95237 [details] Log from ~/.cache/libvirt/qemu/log/boxes-unknown.log It's the log corresponding to Fedora 20 guest VM.
Are libspice-client-glib.so and your qemu binary both linked with libusbredir?
I think they are: ldd /usr/lib64/libspice-client-glib-2.0.so.8.4.0 | grep libusbredir libusbredirhost.so.1 => /usr/lib64/libusbredirhost.so.1 (0x00007f6521d89000) libusbredirparser.so.1 => /usr/lib64/libusbredirparser.so.1 (0x00007f6521b80000) ldd /usr/bin/qemu-system-x86_64 | grep libusbredir libusbredirparser.so.1 => /usr/lib64/libusbredirparser.so.1 (0x00007f90b1f1b000)
usb redirection was broken with spice-gtk 0.21
Installed spice-gtk-0.23 from here: https://bugs.gentoo.org/show_bug.cgi?id=492778 Now it works! I can finally add USB devices to my Windows guest operating system. I think this bug can be closed now (not sure which status option I should pick).
Marking as FIXED, but this was fixed quite some time ago.
Oh, can you file a bug with your distro so that they update spice-gtk to a newer version or add the patch fixing usb redirection to the 0.21 package?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.