OpenVZ Forum


Home » General » Support » How do I access a serial usb device from a VE? (How do I access a serial usb device from a VE?)
How do I access a serial usb device from a VE? [message #37743] Thu, 15 October 2009 18:43 Go to next message
JimL is currently offline  JimL
Messages: 116
Registered: February 2007
Senior Member
I have an embedded processor (Arduino) I want to be able to access from a piece of software that talks with it over a USB connection. I can't seem to figure out how to expose the USB port to a VE.

It's not a disk so bind mount doesn't seem to be the solution.

Thanks,
Jim.
Re: How do I access a serial usb device from a VE? [message #37744 is a reply to message #37743] Thu, 15 October 2009 21:41 Go to previous messageGo to next message
ramjet is currently offline  ramjet
Messages: 16
Registered: September 2009
Junior Member
On a 1U HP sever which only has one on-board serial port I added DEVNODES="ttyS0:rw " to the configuration. It's one year ago so I can't remember if I used vzctl:

from vzctl(8):

Device access management

--devnodes device:r|w|rw|none
Give the container an access (r - read only, w - write only,
rw - read/write, none - no access) to a device designated by
the special file /dev/device. Device file is created in a
container by vzctl.

--devices b|c:major:minor|all:[r|w|rw|none]
Give the container an access to a block or character device
designated by its major and minor numbers. Device file have
to be created manually.

You can also read OpenVZ-Users-Guide.pdf: pg 66 Advanced tasks, Accessing Devices from Inside Virtual Private Server.

You will probably need to add DEVNODES="ttyUSB0:rw" but maybe udev on HN will make it more complicated. I can test it tomorrow at work if above doesn't work for you.
Re: How do I access a serial usb device from a VE? [message #37749 is a reply to message #37744] Fri, 16 October 2009 12:55 Go to previous message
JimL is currently offline  JimL
Messages: 116
Registered: February 2007
Senior Member
ramjet wrote on Thu, 15 October 2009 17:41
On a 1U HP sever which only has one on-board serial port I added DEVNODES="ttyS0:rw " to the configuration. It's one year ago so I can't remember if I used vzctl:


You will probably need to add DEVNODES="ttyUSB0:rw" but maybe udev on HN will make it more complicated. I can test it tomorrow at work if above doesn't work for you.


The DEVNODES="ttyUSB0:rw" worked perfectly.

Thanks,
Jim.
Previous Topic: fork: Cannot allocate memory
Next Topic: tap device support
Goto Forum:
  


Current Time: Fri Nov 15 04:48:09 GMT 2024

Total time taken to generate the page: 0.03128 seconds