Passing devices into containers? Specifically canbus and GPIO

Adam Talbot

Member
Apr 11, 2018
8
3
23
Way off the deep end here. Trying to figure out the Proxmox way to pass GPIO, and can0 (canbus nic 0) into an LXC container.

Proxmox is running on a raspberry Pi 4.
Can0 is comming in over the SPI (spi0.0) bus.

Thanks
 
root@RPi4-01-PVE:/etc/pve/lxc# cat 100.conf arch: arm64 hostname: RatOS memory: 2048 net0: name=eth0,bridge=vmbr0,hwaddr=9A:D9:50:59:6C:7D,ip=dhcp,type=veth ostype: debian rootfs: vmfs:100/subvol-100-disk-0.subvol,size=0T swap: 512 lxc.net.0.type: phys lxc.net.0.flags: down lxc.net.0.link: can0 lxc.net.0.name: can0

root@RPi4-01-PVE:/etc/pve/lxc# lxc-start 100 --logfile=/tmp/dump.txt lxc-start: 100: ../src/lxc/lxccontainer.c: wait_on_daemonized_start: 877 Received container state "ABORTING" instead of "RUNNING" lxc-start: 100: ../src/lxc/tools/lxc_start.c: main: 306 The container failed to start lxc-start: 100: ../src/lxc/tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode lxc-start: 100: ../src/lxc/tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

root@RPi4-01-PVE:/etc/pve/lxc# cat /tmp/dump.txt lxc-start 100 20221130185113.365 ERROR network - ../src/lxc/network.c:lxc_network_setup_in_child_namespaces_common:3880 - Invalid argument - Failed to set network device "can0" up lxc-start 100 20221130185113.367 ERROR network - ../src/lxc/network.c:lxc_setup_network_in_child_namespaces:4017 - Invalid argument - Failed to setup netdev lxc-start 100 20221130185113.367 ERROR conf - ../src/lxc/conf.c:lxc_setup:4352 - Failed to setup network lxc-start 100 20221130185113.368 ERROR start - ../src/lxc/start.c:do_start:1275 - Failed to setup container "100" lxc-start 100 20221130185113.368 ERROR sync - ../src/lxc/sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 3) lxc-start 100 20221130185113.555 ERROR lxccontainer - ../src/lxc/lxccontainer.c:wait_on_daemonized_start:877 - Received container state "ABORTING" instead of "RUNNING" lxc-start 100 20221130185113.557 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:306 - The container failed to start lxc-start 100 20221130185113.557 ERROR start - ../src/lxc/start.c:__lxc_start:2074 - Failed to spawn container "100" lxc-start 100 20221130185113.557 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:309 - To get more details, run the container in foreground mode lxc-start 100 20221130185113.558 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options
 

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!