Bug 1146550
| Summary: | USB Redirection no longer works: Permission Denied | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Ferlan <jferlan> |
| Component: | libvirt | Assignee: | John Ferlan <jferlan> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | agedosier, berrange, clalancette, dyuan, extras-qa, honzhang, itamar, jforbes, jtomko, laine, lcheng, libvirt-maint, lrintel, mzhan, rbalakri, rhaggard, tzheng, veillard |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.8-4.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1145968 | Environment: | |
| Last Closed: | 2015-03-05 07:45:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1145968 | ||
| Bug Blocks: | |||
|
Description
John Ferlan
2014-09-25 13:40:46 UTC
Reproduced this bug with libvirt-1.2.8-3.el7.x86_64. Not find the usb device in guest.
In host:
# lsusb
...
Bus 001 Device 006: ID 8644:8303
# virsh start a
Domain a started
# virsh dumpxml a | grep hostdev -A8
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x8644'/>
<product id='0x8303'/>
<address bus='1' device='6'/>
</source>
<alias name='hostdev0'/>
</hostdev>
...
# vim /var/log/libvirt/qemu/a.log
...
RHEL-6 compat: ich9-usb-uhci1: irq_pin = 3
libusbx: error [op_open] libusbx couldn't open USB device /dev/bus/usb/001/006: Permission denied.
libusbx: error [op_open] libusbx requires write access to USB device nodes.
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 0.115000 ms, bitrate 23813953488 bps (22710.755814 Mbps)
red_dispatcher_set_cursor_peer:
inputs_connect: inputs channel client create
libusbx: error [op_open] libusbx couldn't open USB device /dev/bus/usb/001/006: Permission denied.
libusbx: error [op_open] libusbx requires write access to USB device nodes.
libusbx: error [op_open] libusbx couldn't open USB device /dev/bus/usb/001/006: Permission denied.
libusbx: error [op_open] libusbx requires write access to USB device nodes.
In guest:
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
<== can not find the usb device.
-----------------------------------
Verify it as follows. Can find the usb device in guest. This result is expected.
Version:
libvirt-1.2.8-7.el7.x86_64
qemu-kvm-rhev-2.1.2-8.el7.x86_64
qemu-kvm-1.5.3-79.el7.x86_64
Steps:
In host:
# virsh start a
Domain a started
# virsh dumpxml a | grep hostdev -A8
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x8644'/>
<product id='0x8303'/>
<address bus='1' device='6'/>
</source>
<alias name='hostdev0'/>
</hostdev>
...
In guest:
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 8644:8303 <== can find the usb device.
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Additional test:
libvirt-1.2.8-8.el7.x86_64
qemu-kvm-rhev-2.1.2-12.el7.x86_64
Scenario 1: Hot-plug/hot-unplug usb device
1. Hot-plug usb device on host.
# lsusb
...
Bus 001 Device 004: ID 0951:1656 Kingston Technology DataTraveler Ultimate G2
# cat usb.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0951'/>
<product id='0x1656'/>
</source>
<alias name='hostdev0'/>
</hostdev>
# virsh start r7
Domain r7 started
# virsh attach-device r7 usb.xml
Device attached successfully
# virsh dumpxml r7 | grep hostdev -A10
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0951'/>
<product id='0x1656'/>
<address bus='1' device='4'/>
</source>
<alias name='hostdev0'/>
</hostdev>
2. The usb device exists in guest and works well.
# lsusb
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0951:1656 Kingston Technology DataTraveler Ultimate G2
3. Hot-unplug usb device on host.
# virsh detach-device r7 usb.xml
Device detached successfully
4. Check usb device on guest.
# lsusb
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Scenario 2: Hot-plug/hot-unplug scsi device
1. Hot-plug scsi device on host.
# cat scsi.xml
<hostdev mode='subsystem' type='scsi' managed='no'>
<source protocol='iscsi' name='iqn.yy:server.target1/1'>
<host name='10.66.100.101' port='3260'/>
</source>
<alias name='hostdev0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</hostdev>
# virsh start r7
Domain r7 started
# virsh attach-device r7 scsi.xml
Device attached successfully
2. The scsi device exists in guest and works well.
# fdisk -l
Disk /dev/vda: 9663 MB, 9663676416 bytes, 18874368 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009764c
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 1026047 512000 83 Linux
/dev/vda2 1026048 18874367 8924160 8e Linux LVM
Disk /dev/mapper/rhel-root: 8166 MB, 8166309888 bytes, 15949824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/rhel-swap: 968 MB, 968884224 bytes, 1892352 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
3. Hot-unplug scsi device on host.
# virsh detach-device r7 scsi.xml
Device detached successfully
4. Check scsi device on guest.
# fdisk -l
Disk /dev/vda: 9663 MB, 9663676416 bytes, 18874368 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009764c
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 1026047 512000 83 Linux
/dev/vda2 1026048 18874367 8924160 8e Linux LVM
Disk /dev/mapper/rhel-root: 8166 MB, 8166309888 bytes, 15949824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/rhel-swap: 968 MB, 968884224 bytes, 1892352 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Scenario 3:
1. Start a guest with scsi device.
# virsh start r7
Domain r7 started
# virsh dumpxml r7 | grep hostdev -A10
<hostdev mode='subsystem' type='scsi' managed='no'>
<source protocol='iscsi' name='iqn.yy:server.target1/1'>
<host name='10.66.100.101' port='3260'/>
</source>
<alias name='hostdev0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</hostdev>
...
2. The usb device exists in guest and works well.
# fdisk -l
Disk /dev/vda: 9663 MB, 9663676416 bytes, 18874368 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009764c
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 1026047 512000 83 Linux
/dev/vda2 1026048 18874367 8924160 8e Linux LVM
Disk /dev/mapper/rhel-root: 8166 MB, 8166309888 bytes, 15949824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/rhel-swap: 968 MB, 968884224 bytes, 1892352 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html |