Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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. –  user1039462 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. –  user1039462 Jun 12 '13 at 13:59
1  
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

1 Answer 1

up vote 1 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.