[Pkg-libvirt-maintainers] Bug#563502: Bug#563502: libvirt-bin: cannot use "-usbdevice host:auto:*.*:XXXX:YYYY" since libcap-ng is used

Guido Günther agx at sigxcpu.org
Sun Jan 3 19:16:53 UTC 2010


severity 563502 normal
tag 563502 help

Hi Vincent,
thanks for checking the experimental version!

On Sun, Jan 03, 2010 at 02:33:11PM +0100, Vincent Danjean wrote:
>   Since 0.7.2-4 (ie since the use of libcap-ng), my kvm/qemu virtual machine
> cannot access USB devices declared with "-usbdevice host:auto:*.*:XXXX:YYYY"
> I suspect this is due to a problem with permissions.
That's bad.

>   I use this syntax "host:auto:*.*:XXXX:YYYY" so that the VM can handle
> (dis)connection of my USB printer (not always switched on). Of course,
> to get this argument, I use a wrapper for qemu-kvm in my config file
> (ie <emulator>/usr/local/bin/qemu-kvm</emulator> and
The use of emulators isn't really supported so this is supposed to break
sooner or later - even more since we're now also running kvm as
non-root, see below.

> /usr/local/bin/qemu-kvm is:
> exec /usr/bin/kvm `echo $* | sed 's|-usbdevice host:\([^ ]*\)|-usbdevice host:auto:*.*:\1|g'`
> )
>   When libcap-ng is used, I can see in /var/log/libvirt/qemu/<vm>.log some
> lines such as:
> husb: open device 1.4
> /dev/bus/usb/001/004: Permission denied
> and my VM (ie the linux kernel in my VM) does not see any event when I
> (dis)connect my USB printer.
>   With 0.7.2-3, it works perfectly: the linux kernel in the VM log and handle
> (dis)connect USB event when I switch on/off my printer.
>  
>   I hope this bug will be corrected (or a workaround will be found to disabled
> the effect of libcap-ng) before the package migrate to testing because in my
> use case, I cannot use it at all.
We should really look into fixing this upstream by making the wrapper
superflous - help on this would be appreciated: 
    https://bugzilla.redhat.com/show_bug.cgi?id=508645
Cheers,
 -- Guido





More information about the Pkg-libvirt-maintainers mailing list