Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Can't redirect USB to QEMU-KVM guest.

  1. #11
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,758
    Blog Entries
    2

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Just tying up this thread a bit...

    For anyone who has problems mounting a USB device (not just to a virtual Guest), the spice protocol is an interesting alternative to normal direct USB(and other devices) access... The spice protocol has networking properties which might enable a system to detect and categorize the device differently.

    In fact, the spice protocol can be used to connect directly to a USB device over a TCP/IP network(of course, this also requires the USB device to also be attached directly to the network).

    TSU

  2. #12

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Quote Originally Posted by cyclingGeorgian View Post
    PS and i think you meant /usr/share/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy and not /usb/.../spice-spice
    Exactly. I'm ashamed for these errors and I'm glad to help you.

  3. #13

    Smile Re: Can't redirect USB to QEMU-KVM guest.

    Running the Command chmod u+s /usr/bin/spice-client-glib-usb-acl-helper

    Has helped me.

    Now the redirection works perfectly. Better than what works on Virtualbox.

    I also had missing spice-gtk, I installed it and then I ran chmod u+s /usr/bin/spice-client-glib-usb-acl-helper

    Issue fixed.

    By the way this my first post at OpenSuse forums. I am coming over to OpenSuse Leap from Arch and Ubuntu.

    I am on Leap42.1 with GNOME and I love the system. OpenSuse LEAP is the best experience I have ever had. I have used OpenSuse on and off for a few years, Starting from 11.04 But Leap is just the best. It was a good Decision .

  4. #14

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Same issue with Leap 42.2 and KVM ( using XP SP3 guest vm ).

    solved with

    chmod u+s /usr/bin/spice-client-glib-usb-acl-helper

    To install drivers for windows xp

    1. use Fedora repo and download the .iso
    https://fedorapeople.org/groups/virt...irtio-win.repo2. mount the .iso with image mounter to extract floppy image for XP additional 32 bits drivers

    3. add floppy drive pointing on virtio-win-0.1.126_x86.vfd in XP vm guest

    4. at install procedure choose to add the drivers


    Hope this will help anyone.

    Luco

  5. #15
    Join Date
    Jul 2008
    Location
    Austria
    Posts
    42

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Thank you very much for this solution!!!

  6. #16

    Default Re: Can't redirect USB to QEMU-KVM guest.

    I'm using leap 42.3 with qemu/KVM and libvirt. This thread is still the only reliable source of information about spice usb redirection.

    I'm going to open a bug.

    Thank you very much!

  7. #17

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Just for reference: this is the bug I opened on this issue:
    https://bugzilla.novell.com/show_bug.cgi?id=1072029

  8. #18
    Join Date
    Jul 2008
    Location
    Antwerp, Belgium
    Posts
    42

    Default Re: Can't redirect USB to QEMU-KVM guest.

    I had this thread bookmarked, because I used this workaround also.

    But you can add the following to /etc/permissions.local:

    Code:
    /usr/bin/spice-client-glib-usb-acl-helper    root:root    4755
    and create a file in /etc/polkit-1/rules.d like 20-spice-usbaccess.rules which contains:

    Code:
    /************************************\
    * Overruling default privileges      *
    * see man set_polkit_default_privs   *
    \************************************/
    polkit.addRule(function(action, subject) {
        if (action.id == "org.spice-space.lowlevelusbaccess") {
            return polkit.Result.YES;
        }
    });
    
    // vim: syntax=javascript
    Then you don't have to apply the workaround everytime there is an update
    http://www.philipraets.be
    Hardware: Dell Mini 9, Dell Vostro 1510, Sony Vaio FZ21M, SelfMade PC
    Software: openSUSE, Xen, openLDAP, Samba, Nagios, Apache, MySQL, Oracle, Still no mailserver

  9. #19
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    8

    Default Re: Can't redirect USB to QEMU-KVM guest.

    Quote Originally Posted by philipraets View Post
    ...and create a file in /etc/polkit-1/rules.d like 20-spice-usbaccess.rules which contains:
    May I propose a slight variation of the script with some security checks applied:
    Code:
    /************************************\
    * Overruling default privileges      *
    * see man set_polkit_default_privs   *
    \************************************/
    polkit.addRule(function(action, subject) {
        if (action.id == "org.spice-space.lowlevelusbaccess" && subject.local && 
                subject.active && subject.isInGroup("users")) {
            return polkit.Result.YES;
        }
    });
    
    // vim: syntax=javascript
    This checks whether the users who asks for the permission is local, with active session and belongs to the users group.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •