Bug 1145968 - [f21 regression] USB Redirection no longer works: Permission Denied
Summary: [f21 regression] USB Redirection no longer works: Permission Denied
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1146550
TreeView+ depends on / blocked
 
Reported: 2014-09-24 08:28 UTC by Lubomir Rintel
Modified: 2014-09-27 09:49 UTC (History)
11 users (show)

Fixed In Version: libvirt-1.2.8-6.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1146550 (view as bug list)
Environment:
Last Closed: 2014-09-27 09:49:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lubomir Rintel 2014-09-24 08:28:40 UTC
Description of problem:

USB Redirection no longer works.

Version-Release number of selected component (if applicable):

libvirt-1.2.8-4.fc21.x86_64

How reproducible:

Easily.

Steps to Reproduce:
1. Create a VM
2. Assign a host USB device (Add Hardware in virt-manager, not the spice redirection)
3. Run the VM, inspect logs

Actual results:

2014-09-24 07:02:48.048+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -name fedora21 -S -machine pc-i440fx-2.1,accel=kvm,usb=off -cpu Haswell -m 2048 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid db064f7c-81cf-44b8-bf7e-d0085c8e37b9 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/fedora21.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-reboot -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/fedora-unknown.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/home/lkundrak/Fedora-Live-Workstation-x86_64-21_Alpha-1.iso,if=none,id=drive-ide0-0-1,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=1 -netdev tap,fd=24,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:08:78:3d,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -chardev spicevmc,id=charredir2,name=usbredir -device usb-redir,chardev=charredir2,id=redir2 -chardev spicevmc,id=charredir3,name=usbredir -device usb-redir,chardev=charredir3,id=redir3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on
char device redirected to /dev/pts/2 (label charserial0)
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 0.292000 ms, bitrate 17066666666 bps (16276.041666 Mbps)
inputs_connect: inputs channel client create
red_dispatcher_set_cursor_peer:
main_channel_handle_parsed: agent start
ehci warning: guest updated active QH
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.

Expected results:

World peace.

Additional info:

Worked fine in Fedora 20.

Comment 1 Ján Tomko 2014-09-24 12:41:50 UTC
I don't see any usb-host device on the command line. Is there a <hostdev> in the domain XML?

Comment 2 Lubomir Rintel 2014-09-24 12:48:12 UTC
(In reply to Jan Tomko from comment #1)
> I don't see any usb-host device on the command line. Is there a <hostdev> in
> the domain XML?

Yep, it is there.

My guess was that libvirt attaches the device via usb_add in the qemu console prior to starting the guest cpu?

Comment 3 Cole Robinson 2014-09-24 15:40:24 UTC
I can reproduce, it's a libvirt regression. I've pinpointed the issue, patch forthcoming

Comment 4 Cole Robinson 2014-09-24 15:52:05 UTC
Patch posted: http://www.redhat.com/archives/libvir-list/2014-September/msg01472.html

Comment 5 Fedora Update System 2014-09-24 17:07:34 UTC
libvirt-1.2.8-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libvirt-1.2.8-6.fc21

Comment 6 Fedora Update System 2014-09-24 18:27:09 UTC
Package libvirt-1.2.8-6.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-1.2.8-6.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11310/libvirt-1.2.8-6.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-09-27 09:49:36 UTC
libvirt-1.2.8-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.