Problem with USB pass-thru using a symlink

sumnerboy

New Member
Jul 30, 2015
6
0
1
Hi there,

First time poster and pretty green Proxmox user, but have been very impressed in my experiences so far.

I have managed to migrate my entire home automation server to a new box running Proxmox with debian containers. The last thing I am really struggling with is getting my two USB dongles (Z-Wave and RFXCOM) to pass-thru to my openHAB container (which accesses the dongles).

I have setup a udev rule on the host to symlink each dongle to /dev/zwave and /dev/rfxcom (which is what I had on the original Ubuntu server). This is working fine.

I then added these two devices to my container config file;

Code:
DEVNODES="rfxcom:rw zwave:rw "

When I restart the container and enter it, I can't see either /dev/zwave or /dev/rfxcom. But I can see the actual devices from the host, i.e. /dev/ttyUSB1 and /dev/ttyUSB2.

Any ideas why these symlinks are not being persisted when I restart?

Another thing to note, if I run;

Code:
vzctl set 104 --devnode zwave:rw --save

on the host and enter the container I can see /dev/zwave no worries - but as soon as I restart the container it is lost, and I only have the ttyUSB device available.

I have read so many threads about this and can't seem to find anything obvious which leads me to think I am doing something stupid but I have tried everything I have come across.

If anyone has any suggestions or tips I will be all ears!!

Thanks in advance,
Ben
 
Hi again,

So is this something that *just works* for others? Or am I doing something a little out of the ordinary here?

I would have thought this was a relatively common scenario. Surely if you have USB devices getting passed-thru you need to use udev rules to ensure they are available at the same mount point on both the host and your containers?

Cheers,
Ben
 
I am starting to wonder if I have failed to follow some sort of forum etiquette or guidelines? I apologise if so, I would appreciate it if someone pointed out what I have done wrong otherwise.

I also apologise for bumping this thread (twice in the last week) but I am really at a dead end currently with this problem.
 
I am using containers rather than VMs unfortunately. I managed to get it working after noticing the symlinks were being created in my container under /lib/udev/devices/<name>. They weren't being created with the correct permissions but I added a chown and chmod to my rc.local and then updated my home automation software to access the devices via the /lib/udev/devices/<name> path and things seem to be working ok so far. I can restart the container and the device is re-created, with the necessary permissions, and my software can access them ok. I have seen a few strange issues when restarting the automation software, with 'device is in use' exceptions, but I can't be sure if that is related (although I have never seen these errors when access /dev/<name> symlinks on a non-container env).

Anyway - I am happy enough that I can restart with a bit more confidence now, knowing the system will come back up again.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!