Issues with LXC containers

amexuk

New Member
Nov 22, 2024
4
0
1
Hey All,

This is my first post and I'm still pretty new to Proxmox (having moved from vmware) I've got 4 nodes in a cluster and I'm having issues with LXCs where when I try and create one or create one using a script with https://tteck.github.io/Proxmox/#proxmox-ve-tools the LXC will fail to start. Here are the LXC setup details and debug logs for starting one on my cluster which is broken, I've tried doing this on a fresh install of Proxmox but when I join the host to the cluster LXCs will fail. My storage medium is via iscsi and I've also tried via NFS.

root@echa4:~# pct config 100
arch: amd64
cores: 1
features: keyctl=1,nesting=1
hostname: pihole
memory: 512
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:22:42:64,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: ECMEDIA:100/vm-100-disk-0.raw,size=2G
swap: 512
tags: proxmox-helper-scripts
unprivileged: 1

root@echa4:~# lxc-start -n 100 -F -l DEBUG -o /tmp/lxc-CT100.log
lxc-start: 100: ../src/lxc/conf.c: run_buffer: 322 Script exited with status 255
lxc-start: 100: ../src/lxc/start.c: lxc_init: 844 Failed to run lxc.hook.pre-start for container "100"
lxc-start: 100: ../src/lxc/start.c: __lxc_start: 2027 Failed to initialize container "100"
lxc-start: 100: ../src/lxc/conf.c: run_buffer: 322 Script exited with status 1
lxc-start: 100: ../src/lxc/start.c: lxc_end: 985 Failed to run lxc.hook.post-stop for container "100"
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: 311 Additional information can be obtained by setting the --logfile and --logpriority options

If there's anything else I can do to help please let me know!
 
Hi,

First of all, you are using the wrong repo. Or the archived one. Unfortunately, tteck is passed away. You can find the new repo at: https://helper-scripts.com/ or in Github here: https://github.com/community-scripts/ProxmoxVE

And which script exactly do you want to use? I don't see any script output or anything else :)

Feel free, if it is a script problem, to report it as an issue in the project, or in Discussions or in the Discord.
 
Hey having used the new script I'm still having the same issue (pihole as an example) it's not a script issue as far as I'm aware it also happens when manually creating LXCs.
 
Having tested this more if I set the LXC to start on boot it works just fine on the shared storage.
 
Interesting, I have never seen this error in our scripts before.
While I do technically don't have issue with this change, I also do not see the upside of automating it.
Taking the time to add the title by hand as finishing touch on the script.
Also, it is not newcomer friendly. Just studying the scripts is not enough anymore to understand what is happening, as more and more, is tugged away in other functions.


It can only be the pct create command in create_lxc.sh:
# Create container
msg_info "Creating LXC Container"
pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null ||
exit "A problem occured while trying to create container."
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."