Can't mount z wave usb controller into container

lazloman

New Member
Jan 22, 2023
11
0
1
I've been trying to get my Nortek controller to mount within a container. I have seen many posts here and elsewhere with similar issues, but I can't find a solution that works for me I'm running PiMox on an Rpi4 with 8GB ram. I found some helper scripts for Proxmox here: Proxmox helper scripts
The zwave container script failed to mount the controller, either priviledged or not.

I found a post here: Mounting Aeotec z wave controller.

This seems to have brought me forward, but I'm dead in the water at this point. I tried to start the container using lxc-start. I set log priority to DEBUG and here is a portion of the log. It appears that the container is setup, but exec'ing /sbin/init' fails. Any ideas would be appreciated.

```
xc-start 101 20230122204039.453 INFO conf - ../src/lxc/conf.c:lxc_transient_proc:3775 - Caller's PID is 1; /proc/self points to 1
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1751 - Attached detached devpts mount 20 to 18/pts
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1837 - Created "/dev/ptmx" file as bind mount target
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1844 - Bind mounted "/dev/pts/ptmx" to "/dev/ptmx"
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_allocate_ttys:1104 - Created tty with ptx fd 22 and pty fd 23 and index 1
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_allocate_ttys:1104 - Created tty with ptx fd 24 and pty fd 25 and index 2
lxc-start 101 20230122204039.454 INFO conf - ../src/lxc/conf.c:lxc_allocate_ttys:1109 - Finished creating 2 tty devices
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_setup_ttys:1065 - Bind mounted "pts/1" onto "tty1"
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_setup_ttys:1065 - Bind mounted "pts/2" onto "tty2"
lxc-start 101 20230122204039.454 INFO conf - ../src/lxc/conf.c:lxc_setup_ttys:1072 - Finished setting up 2 /dev/tty<N> device(s)
lxc-start 101 20230122204039.455 INFO conf - ../src/lxc/conf.c:setup_personality:1917 - Set personality to "0lx0"
lxc-start 101 20230122204039.455 DEBUG conf - ../src/lxc/conf.c:capabilities_deny:3203 - Capabilities have been setup
lxc-start 101 20230122204039.455 NOTICE conf - ../src/lxc/conf.c:lxc_setup:4469 - The container "101" is set up
lxc-start 101 20230122204039.456 DEBUG terminal - ../src/lxc/terminal.c:lxc_terminal_peer_default:702 - Using terminal "/dev/tty" as proxy
lxc-start 101 20230122204039.456 DEBUG terminal - ../src/lxc/terminal.c:lxc_terminal_winsz:59 - Set window size to 136 columns and 30 rows
lxc-start 101 20230122204039.456 NOTICE start - ../src/lxc/start.c:start:2161 - Exec'ing "/sbin/init"
lxc-start 101 20230122204039.466 ERROR start - ../src/lxc/start.c:start:2164 - Exec format error - Failed to exec "/sbin/init"
lxc-start 101 20230122204039.466 ERROR sync - ../src/lxc/sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 7)
lxc-start 101 20230122204039.505 INFO network - ../src/lxc/network.c:lxc_delete_network_priv:3680 - Removed interface "veth101i0" from ""
lxc-start 101 20230122204039.505 DEBUG network - ../src/lxc/network.c:lxc_delete_network:4173 - Deleted network devices
lxc-start 101 20230122204039.505 ERROR start - ../src/lxc/start.c:__lxc_start:2074 - Failed to spawn container "101"
lxc-start 101 20230122204039.505 WARN start - ../src/lxc/start.c:lxc_abort:1039 - No such process - Failed to send SIGKILL via pidfd 16 for process >
lxc-start 101 20230122204039.506 DEBUG conf - ../src/lxc/conf.c:idmaptool_on_path_and_privileged:3520 - The binary "/usr/bin/newuidmap" does have the>
lxc-start 101 20230122204039.506 DEBUG conf - ../src/lxc/conf.c:idmaptool_on_path_and_privileged:3520 - The binary "/usr/bin/newgidmap" does have the>
lxc-start 101 20230122204039.506 INFO conf - ../src/lxc/conf.c:lxc_map_ids:3603 - Caller maps host root. Writing mapping directly
lxc-start 101 20230122204039.507 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1368 - Dropped supplimentary groups

```

My conf file for the container looks this:

```

arch: amd64
cores: 2
features: nesting=1,keyctl=1
hostname: zwave-js-ui
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=4A:DE:A6:18:68:11,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local:101/vm-101-disk-0.raw,size=4G
swap: 512
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: usb-Silicon_Labs_HubZ_Smart_Home_Controller_612011D1-if01-port0 usb-Silicon_Labs_HubZ_Smart_Home_Controller_612011D1-if01-port0 none bi>
lxc.cgroup2.devices.allow: c 204:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file

```

Per the other thread, I added a udev rule:
```
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8a2a", GROUP="users", MODE="0666"

```
10c4 and 8a2a came from 'lsusb -l'
 
Last edited:
I've been trying to get my Nortek controller to mount within a container. I have seen many posts here and elsewhere with similar issues, but I can't find a solution that works for me I'm running PiMox on an Rpi4 with 8GB ram. I found some helper scripts for Proxmox here: Proxmox helper scripts
The zwave container script failed to mount the controller, either priviledged or not.

I found a post here: Mounting Aeotec z wave controller.

This seems to have brought me forward, but I'm dead in the water at this point. I tried to start the container using lxc-start. I set log priority to DEBUG and here is a portion of the log. It appears that the container is setup, but exec'ing /sbin/init' fails. Any ideas would be appreciated.

```
xc-start 101 20230122204039.453 INFO conf - ../src/lxc/conf.c:lxc_transient_proc:3775 - Caller's PID is 1; /proc/self points to 1
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1751 - Attached detached devpts mount 20 to 18/pts
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1837 - Created "/dev/ptmx" file as bind mount target
lxc-start 101 20230122204039.453 DEBUG conf - ../src/lxc/conf.c:lxc_setup_devpts_child:1844 - Bind mounted "/dev/pts/ptmx" to "/dev/ptmx"
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_allocate_ttys:1104 - Created tty with ptx fd 22 and pty fd 23 and index 1
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_allocate_ttys:1104 - Created tty with ptx fd 24 and pty fd 25 and index 2
lxc-start 101 20230122204039.454 INFO conf - ../src/lxc/conf.c:lxc_allocate_ttys:1109 - Finished creating 2 tty devices
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_setup_ttys:1065 - Bind mounted "pts/1" onto "tty1"
lxc-start 101 20230122204039.454 DEBUG conf - ../src/lxc/conf.c:lxc_setup_ttys:1065 - Bind mounted "pts/2" onto "tty2"
lxc-start 101 20230122204039.454 INFO conf - ../src/lxc/conf.c:lxc_setup_ttys:1072 - Finished setting up 2 /dev/tty<N> device(s)
lxc-start 101 20230122204039.455 INFO conf - ../src/lxc/conf.c:setup_personality:1917 - Set personality to "0lx0"
lxc-start 101 20230122204039.455 DEBUG conf - ../src/lxc/conf.c:capabilities_deny:3203 - Capabilities have been setup
lxc-start 101 20230122204039.455 NOTICE conf - ../src/lxc/conf.c:lxc_setup:4469 - The container "101" is set up
lxc-start 101 20230122204039.456 DEBUG terminal - ../src/lxc/terminal.c:lxc_terminal_peer_default:702 - Using terminal "/dev/tty" as proxy
lxc-start 101 20230122204039.456 DEBUG terminal - ../src/lxc/terminal.c:lxc_terminal_winsz:59 - Set window size to 136 columns and 30 rows
lxc-start 101 20230122204039.456 NOTICE start - ../src/lxc/start.c:start:2161 - Exec'ing "/sbin/init"
lxc-start 101 20230122204039.466 ERROR start - ../src/lxc/start.c:start:2164 - Exec format error - Failed to exec "/sbin/init"
lxc-start 101 20230122204039.466 ERROR sync - ../src/lxc/sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 7)
lxc-start 101 20230122204039.505 INFO network - ../src/lxc/network.c:lxc_delete_network_priv:3680 - Removed interface "veth101i0" from ""
lxc-start 101 20230122204039.505 DEBUG network - ../src/lxc/network.c:lxc_delete_network:4173 - Deleted network devices
lxc-start 101 20230122204039.505 ERROR start - ../src/lxc/start.c:__lxc_start:2074 - Failed to spawn container "101"
lxc-start 101 20230122204039.505 WARN start - ../src/lxc/start.c:lxc_abort:1039 - No such process - Failed to send SIGKILL via pidfd 16 for process >
lxc-start 101 20230122204039.506 DEBUG conf - ../src/lxc/conf.c:idmaptool_on_path_and_privileged:3520 - The binary "/usr/bin/newuidmap" does have the>
lxc-start 101 20230122204039.506 DEBUG conf - ../src/lxc/conf.c:idmaptool_on_path_and_privileged:3520 - The binary "/usr/bin/newgidmap" does have the>
lxc-start 101 20230122204039.506 INFO conf - ../src/lxc/conf.c:lxc_map_ids:3603 - Caller maps host root. Writing mapping directly
lxc-start 101 20230122204039.507 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1368 - Dropped supplimentary groups

```

My conf file for the container looks this:

```

arch: amd64
cores: 2
features: nesting=1,keyctl=1
hostname: zwave-js-ui
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=4A:DE:A6:18:68:11,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local:101/vm-101-disk-0.raw,size=4G
swap: 512
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: usb-Silicon_Labs_HubZ_Smart_Home_Controller_612011D1-if01-port0 usb-Silicon_Labs_HubZ_Smart_Home_Controller_612011D1-if01-port0 none bi>
lxc.cgroup2.devices.allow: c 204:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file

```

Per the other thread, I added a udev rule:
```
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8a2a", GROUP="users", MODE="0666"

```
10c4 and 8a2a came from 'lsusb -l'
I finally got ttyAMA1 to mount. I needed to a udev rule to add it a startup. Now the e
 
So I think there are two separate issues here. I got my controller to mount by adding a udev rule to add ttyAMA1. I still have the /sbin/init error. Anyone have any answers?
 
Those scripts (AMD64) WILL NOT work for PiMox (ARM64)!

EDIT: Scripts now have an arch check to block ARM64
 
Last edited:

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!