host usb device set up for guest, but guest can not find it. the same proble is reported before here: http://bugs.gentoo.org/show_bug.cgi?id=322169 # cat /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 HOME=/root USER=root QEMU_AUDIO_DRV=n one /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 -nodefau lts -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/XPE.monitor,server,now ait -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=i de.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/mnt/sdb2/vm/XPE/XPE.vm dk,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=39,vlan=0,name=hostnet0 -usb -vnc 127.0.0.1:0 -vga v mware -device usb-host,hostbus=003,hostaddr=004,id=hostdev0 -device virtio-ballo on-pci,id=balloon0,bus=pci.0,addr=0x3 22:19:18.928: debug : virCgroupNew:542 : New group /libvirt/qemu/XPE 22:19:18.928: debug : virCgroupDetect:232 : Detected mount/mapping 0:cpu at /dev /cgroup in 22:19:18.928: debug : virCgroupDetect:232 : Detected mount/mapping 4:devices at /dev/cgroup in 22:19:18.928: debug : virCgroupMakeGroup:484 : Make group /libvirt/qemu/XPE 22:19:18.929: debug : virCgroupMakeGroup:496 : Make controller /dev/cgroup/libvi rt/qemu/XPE/ 22:19:18.929: debug : virCgroupMakeGroup:496 : Make controller /dev/cgroup/libvi rt/qemu/XPE/ 22:19:18.929: debug : virCgroupSetValueStr:277 : Set value '/dev/cgroup/libvirt/ qemu/XPE/tasks' to '30321' 22:19:18.962: debug : virCgroupSetValueStr:277 : Set value '/dev/cgroup/libvirt/ qemu/XPE/tasks' to '30321' 22:19:18.962: debug : qemudInitCpuAffinity:2220 : Setting CPU affinity 22:19:18.963: debug : qemuSecurityDACSetProcessLabel:546 : Dropping privileges o f VM to 0:0 husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted husb: open device 3.4 /dev/bus/usb/003/004: Operation not permitted Reproducible: Always
this is because cgroup enabled and usb is blacklisted, so libviirtd can not open it. the usb need to be added to cgroup devices. ===============/etc/libvirt/qemu.conf: # What cgroup controllers to make use of with QEMU guests # # - 'cpu' - use for schedular tunables # - 'devices' - use for device whitelisting # # NB, even if configured here, they won't be used unless # the adminsitrator has mounted cgroups. eg # # mkdir /dev/cgroup # mount -t cgroup -o devices,cpu none /dev/cgroup # # They can be mounted anywhere, and different controlers # can be mounted in different locations. libvirt will detect # where they are located. # # cgroup_controllers = [ "cpu", "devices" ] # This is the basic set of devices allowed / required by # all virtual machines. # # As well as this, any configured block backed disks, # all sound device, and all PTY devices are allowed. # # This will only need setting if newer QEMU suddenly # wants some device we don't already know a bout. # #cgroup_device_acl = [ # "/dev/null", "/dev/full", "/dev/zero", # "/dev/random", "/dev/urandom", # "/dev/ptmx", "/dev/kvm", "/dev/kqemu", # "/dev/rtc", "/dev/hpet", "/dev/net/tun", #]
*** Bug 322169 has been marked as a duplicate of this bug. ***
if disable cgroup still does not help. then try to compile usbmon kernel module and modprobe usbmon before start the vm might resolv the USB problem. this resolve the USB problem here.
Fixed in 0.8.5-r1 and sent upstream.