Public bug reported:

Binary package hint: kvm

Since kvm-83 in Jaunty, KVM/QEMU has supported /sys/ file-system access
to USB devices.

There is, however, an issue with insufficient permissions for a non-root
KVM/QEMU guest to access host USB devices.

There was discussion of this issue as part of bug #156085 "Could not
open /proc/bus/usb/devices" but no resolution.

In the PPA packages I built of kvm-74 which included my sys-fs patches I
also included a revised man-page that explained how to enable
permissions.

       If the guest is running as non-root the permissions to /dev/bus/usb/*/* 
will need altering
       to allow the VM read/write access to the USB devices.

       Create a new group "vm" and add users that require USB access for
VMs to it:

       sudo addgroup vm
       sudo addgroup $USER vm

       Log-out/log-in to effect the new group membership.

       Add a udev rule to assign USB devices to the vm group:

       # Virtual Machine hypervisor access to USB devices
       SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vm"
       SUBSYSTEM=="usb_device", GROUP="vm"

       Save the file as /etc/udev/rules.d/41-vm-usb.rules and reload
udevd:

       sudo /etc/init.d/udev restart

       The guest virtual machines should now be able to access the USB devices 
without root priv‐
       ileges.

There was quite a bit of discussion between myself, Matt Zimmerman and
Martin Pitt from 2008-09-05 onwards about this but no decision made on
how to proceed.

This bug is intended to focus the attention on the permissions issue.

** Affects: kvm (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: qemu (Ubuntu)
   Importance: Undecided
       Status: New

-- 
Non-root guest doesn't have permission to access sys-fs USB devices
https://bugs.launchpad.net/bugs/331331
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to