Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322169 - app-emulation/libvirt-0.8.1-r1: vm could not open USB device
Summary: app-emulation/libvirt-0.8.1-r1: vm could not open USB device
Status: RESOLVED DUPLICATE of bug 329427
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 04:01 UTC by fkhp
Modified: 2010-08-31 03:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fkhp 2010-05-31 04:01:57 UTC
log message in /var/log/libvirt/qemu/vm.log
husb: open device 5.3
/dev/bus/usb/005/003: Operation not permitted
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-07 08:38:34 UTC
Hello,

have you checked the read/write permissions of that file/dir for the user this process runs as? you might need to add the user to some additional groups like usb. Please reopen if the problem exists ad add a comment about the file permissions of this dir and `id <user>` of the user you run the emulator as.

Thanks, Michael
Comment 2 fkhp 2010-06-08 04:02:41 UTC
login as user root

# /etc/init.d/libvirtd start
# ls -al /dev/bus/usb/007/004
crw-rw-r-- 1 root root 189, 257  6  8 11:39 /dev/bus/usb/007/004
# chmod 777 /dev/bus/usb/007/004
# ls -al /dev/bus/usb/003/002
crwxrwxrwx root root 189, 257  6  8 11:39 /dev/bus/usb/007/004
# gpasswd -a root usb
# grep usb /etc/group
usb:x:85:haldaemon,root
# virsh start vm
# tail -n 6 /var/log/libvirt/qemu/vm.log
husb: open device 7.4
/dev/bus/usb/007/004: Operation not permitted
husb: open device 7.4
/dev/bus/usb/007/004: Operation not permitted
husb: open device 7.4
/dev/bus/usb/007/004: Operation not permitted
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-08 13:52:33 UTC
Ok, since you are running this as root, its no permissions problem, sry.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2010-07-06 17:09:16 UTC
Just because the init script is started up by a root user doesn't mean the processes it spawns are running as root.

Are you using qemu or qemu-kvm for your VM?
Comment 5 fkhp 2010-07-07 23:39:17 UTC
> Are you using qemu or qemu-kvm for your VM?
gentoo root # equery l qemu
 * Searching for qemu ...
!!! No installed packages matching 'qemu'
gentoo root # equery l qemu-kvm
 * Searching for qemukvm ...
[IP-] [  ] app-emulation/qemu-kvm-0.12.4-r1:0


Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2010-07-08 01:57:14 UTC
From /var/log/libvirt/qemu/vm.log, include the entire command line used to execute qemu-kvm and please include the output of "lsusb".
Comment 7 fkhp 2010-07-08 07:20:10 UTC
(In reply to comment #6)
> From /var/log/libvirt/qemu/vm.log, include the entire command line used to
> execute qemu-kvm and please include the output of "lsusb".
> 
# lsusb
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Bus 005 Device 002: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:08da Logitech, Inc. QuickCam Messanger 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# head /var/log/libvirt/qemu/XPE.log
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0:/opt/vmware/bin HOME=/root USER=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -cpu core2duo -enable-kvm -m 512 -smp 1,sockets=1,cores=2,threads=1 -name XPE -uuid e87de8fc-9c22-42df-a33a-85864cf3f490 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/XPE.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=localtime -boot c -drive file=/mnt/sdb2/vm/XPE/C.vmdk,if=none,id=drive-ide0-0-0,boot=on -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/mnt/sdb2/vm/XPE/XPE.vmdk,if=none,id=drive-ide0-0-1 -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:9d:99:9c,bus=pci.0,addr=0x5 -net tap,fd=38,vlan=0,name=hostnet0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga vmware -device usb-host,hostbus=003,hostaddr=002,id=hostdev0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
husb: open device 3.2
/dev/bus/usb/003/002: Operation not permitted
husb: open device 3.2
/dev/bus/usb/003/002: Operation not permitted
husb: open device 3.2
/dev/bus/usb/003/002: Operation not permitted




Comment 9 fkhp 2010-08-31 03:15:37 UTC

*** This bug has been marked as a duplicate of bug 329427 ***