KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

USB Passthrough for FTDI-device

4 replies [Last post]
Budgreg
Offline
Joined: Mar 13 2012
Points: 9

Hi there,

I hope that someone can assist me in this case - the guys in the german forum @ http://forum.ubuntuusers.de/topic/usb-mapping-bei-kvm/ could not.

Anyway more than a year ago I successfully configured KVM and VIRSH on my UBUNTU server 10.04 and installed Windows XP as a virtual machine. This is used for my home automatisation software called IP-Symcon (http://www.ip-symcon.de/) which runs on Windows only. It controls the heating and some electric switches in my home using an FTDI-device called FHZ-1300 which is connected by USB to my Ubuntu server. Somehow I was able to make this device visible to my Windows machine to install the needed driver and IP-Symcon was able to communicate with my device using this device.

Since about X-mas last year I installed some security updates to my Ubuntu host and after the reboot (which I did several times in the past successfully) my Windows installation could not find the FTDI-device anymore. Unfortunately I did not document the steps it tool to enable this feature in the past.

Using lsusb on the host I find the USB device:

Bus 003 Device 011: ID 0403:e0e8 Future Technology Devices International, Ltd

Can anyone point me to the right direction to re-enable USB passthrough for this device to my virtual machine?

Thanks in advance.

br, Gregor

Budgreg
Offline
Joined: Mar 13 2012
Points: 9
News?

Hello again,

there are no changes on my side. But is there really no one out there who can assist me with my troubles?

Or do you need some more input?

br, Gregor

Nakarti (not verified)
Apparmor

Your mention of security patches finally reminded me what I hoped was blocking my MagicJack from a similar detachment. Sadly not, I don't have AppArmor on my Debian host, but you probably do, and need to stop it from guarding your hardware from the guest, per this Ubuntu guide to KVM:
https://help.ubuntu.com/community/KVM/Managing#Adding_USB_Device_Pass-th...

Budgreg
Offline
Joined: Mar 13 2012
Points: 9
Hello Nakarti, thanks for

Hello Nakarti,

thanks for your post. After I´ve read your link regarding the apparmor configuration change I checked the configuration and it was correct. At least it appeared to be correct.

One specific line in this article is listed as
"/sys/devices/*/*/usb[0-9]*/** r,".
But /var/log/messages tells me (when running the machine): "blabla...requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/pci0000:00/0000:00:07.0/0000:04:00.0/usb8/devnum""

So I´ve changed the apparmor configuration to "/sys/devices/*/*/*/usb[0-9]*/** r," - now at least the error messages in /var/log/messages are gone. But Windows XP is still not able to communicate with the USB device.

When I´m back to the server i´ll try to replug the device and check it again. Allthough I´m not sure what caused this circumstance I am happy for this valuable hint.

br, Gregor

Budgreg
Offline
Joined: Mar 13 2012
Points: 9
Fixed

Hello again,

it works again. After half a year I´m back in action with my application. After replugging the device and restarting the virtual machine everything is allright.

Obviously naming convention for USB devices has changed - either in the apparmor config file or in Ubuntu itselve.

br, Gregor

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.