0

I am running Ubuntu Server 22.04.3 LTS and I am trying to use Podman.

I fail to passthrough a device (in my case /dev/ttyUSB0) to the container.

Running

podman --device /dev/ttyUSB0 ...

just does not have any effect, the device isn't there inside the container.

I also disabled AppArmor just to find out if this is causing my problem, yet no luck.

TorstenS
  • 213
  • 1
  • 8

1 Answers1

0

It seems your syntax is wrong. It should be like this: (notice the = between the option and the device)

podman run --device=host-device[:container-device][:permissions] ...

In your case that would be:

podman run --device=/dev/ttyUSB0 ...

Also please note that the --device option should be part of the run command when you start the container.

See the reference manual for more info on this.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
  • Sorry, of course I used the --device together with the run command. And I have seen both --device /dev/xyz as well as --device=/dev/xyz in verious tutorials. Both doesnÄ work. – TorstenS Aug 31 '23 at 10:40
  • It turns out the problem appears when I start the container with --privileged – TorstenS Aug 31 '23 at 11:03