OpenWrt Forum Archive

Topic: Could not create LXC container using busybox template on LEDE OS

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I recently tried LXC tool on LEDE OS for Compex board.
We compiled LXC version 2.0.7 with LEDE source and tried to create an Lxc container using busybox template via following command:

lxc-create -t /usr/share/lxc/templates/lxc-busybox -n myOpenWrt

but we got the following error:

lxc-create: lxccontainer.c: create_run_template: 1292 No such file or directory - failed to execute template /usr/share/lxc/templates/lxc-busybox
lxc-create: lxccontainer.c: create_run_template: 1297 container creation template for myOpenWrt failed
lxc-create: tools/lxc_create.c: main: 318 Error creating container myOpenWrt

we tried to search regarding it over internet but no help.

Does this template has some dependency on any package or did we miss something ?

Please suggest.

Thanks
Sid

several possibilities:
1. check whether your system are using 'bash' as the template first line is a 'bash' environment initializing. If not, then the template file is not executable.
2. as mentions in github lxc, it may due to the template file contains dos format line ending.

The discussion might have continued from here.