Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to pass a USB device (to be precise: a smart card reader) to a KVM virtual machine, and therefore have to prohibit that it is claimed by any driver on the host machine.

I tried to write a udev rule for it with the help of this site, but appearently the udev option "ignore_device" has been removed a few years ago with no replacement. Thus, the udev rule installed by the driver of the reader is processed and my host machine claims it.

Is there some sort of replacement for "ignore_device" in current udev versions?

share|improve this question
Is it using a specific kernel module? Then it would be possible to blacklist the module in, say, /etc/modprobe.d/no-load-driver.conf. – Stefan Seidel Jun 12 '13 at 11:20
@Stefan Seidel: I know, but no, that is not an option. The driver works in the user space only. – mat Jun 12 '13 at 11:45
So there is no kernel module loaded for that device? What exactly do you want to achieve, then? Why wouldn't you just remove the "udev rule installed by the driver of the reader" if you don't want it to happen? – Stefan Seidel Jun 12 '13 at 13:22
Because I might want to plugin two readers and use one on the host and one in the guest. – mat Jun 12 '13 at 13:59
Then you could make the original udev rule so specific that it will only match the one card reader you don't want to use in the virtual machine, e.g. by adding the serial number or the path (i.e. the hub and slot on this hub where you connect it). – Stefan Seidel Jun 13 '13 at 6:25
up vote 2 down vote accepted

I have found this great link, which contained the answer to my problem. By letting udev execute echo 0 > /sys/bus/usb/devices/1-3/authorized on the usb device, access from the host system to it was blocked.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .