[SOLVED] Debian container fails to start

GarlicToe

Active Member
Jul 19, 2018
11
1
43
36
Hi there,

After a sudden power outage one single container is not able to boot for some reason. It is a debian webserver installed with this template: debian-12-standard_12.0-1_amd64. I'm still running promox 7.3-3. Mounting via 'pct mount 111' works as expected. Any help would be greatly appreciated.


Code:
root@pve:~# lxc-start -n 111 -F -lDEBUG -o lxc-111.log
lxc-start: 111: ../src/lxc/conf.c: run_buffer: 321 Script exited with status 25
lxc-start: 111: ../src/lxc/start.c: lxc_init: 847 Failed to run lxc.hook.pre-start for container "111"
lxc-start: 111: ../src/lxc/start.c: __lxc_start: 2008 Failed to initialize container "111"
lxc-start: 111: ../src/lxc/tools/lxc_start.c: main: 306 The container failed to start
lxc-start: 111: ../src/lxc/tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

Code:
root@pve:~# cat lxc-111.log
lxc-start 111 20231108083126.971 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2267 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 111 20231108083126.971 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2267 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-start 111 20231108083126.971 INFO     lsm - ../src/lxc/lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver AppArmor
lxc-start 111 20231108083126.971 INFO     conf - ../src/lxc/conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "111", config section "lxc"
lxc-start 111 20231108083127.426 DEBUG    conf - ../src/lxc/conf.c:run_buffer:310 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 111 lxc pre-start produced output: unsupported debian version '12.1'

lxc-start 111 20231108083127.437 ERROR    conf - ../src/lxc/conf.c:run_buffer:321 - Script exited with status 25
lxc-start 111 20231108083127.437 ERROR    start - ../src/lxc/start.c:lxc_init:847 - Failed to run lxc.hook.pre-start for container "111"
lxc-start 111 20231108083127.437 ERROR    start - ../src/lxc/start.c:__lxc_start:2008 - Failed to initialize container "111"
lxc-start 111 20231108083127.437 INFO     conf - ../src/lxc/conf.c:run_script_argv:337 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "111", config section "lxc"
lxc-start 111 20231108083127.939 INFO     conf - ../src/lxc/conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "111", config section "lxc"
lxc-start 111 20231108083128.352 DEBUG    conf - ../src/lxc/conf.c:run_buffer:310 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 111 lxc post-stop produced output: umount: /var/lib/lxc/.pve-staged-mounts/mp0: not mounted.

lxc-start 111 20231108083128.353 DEBUG    conf - ../src/lxc/conf.c:run_buffer:310 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 111 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp0' failed: exit code 32

lxc-start 111 20231108083128.377 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:main:306 - The container failed to start
lxc-start 111 20231108083128.377 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options


Code:
root@pve:~# cat /etc/pve/lxc/111.conf
arch: amd64
cores: 1
features: nesting=1
hostname: trek
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.1,hwaddr=1A:38:48:6C:8E:78,ip=192.168.178.111/24,ip6=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-111-disk-0,size=22G
swap: 2048
unprivileged: 1
 
Last edited:
Please never run apt upgrade on Proxmox as it does not upgrade all necessary components. Always use apt dist-upgrade or the web GUI: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_system_software_updates

Thank you. It is up to date apparently...

Code:
Starting system upgrade: apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Your System is up-to-date

starting shell
root@pve:/#
 
What is the output of apt update? Do you have the right repositories configured? Debian 12.1 is running fine with up-to-date no-subscription.


Code:
root@pve:~# apt update
Hit:1 http://ftp.nl.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org bullseye-security InRelease
Hit:3 http://ftp.nl.debian.org/debian bullseye-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Code:
root@pve:~# cat /etc/apt/sources.list
deb http://ftp.nl.debian.org/debian bullseye main contrib

deb http://ftp.nl.debian.org/debian bullseye-updates main contrib

# security updates
deb http://security.debian.org bullseye-security main contrib

Code:
root@pve:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

The host is running bullseye (standard install via proxmox iso) and the lxc container runs debian 12 from the template i mentioned
 
Last edited:
Code:
root@pve:~# apt update
Hit:1 http://ftp.nl.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org bullseye-security InRelease
Hit:3 http://ftp.nl.debian.org/debian bullseye-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
You'll need to (also) configure a Proxmox repository to get updates for your Proxmox. The link I provides points to the repositories for PVE 8 but it describes the general idea. You'll need to configure the right repository for PVE 7.
 
You'll need to (also) configure a Proxmox repository to get updates for your Proxmox. The link I provides points to the repositories for PVE 8 but it describes the general idea. You'll need to configure the right repository for PVE 7.

Oh my.. of course... :oops:

I added
Code:
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
to the sources.list and updated around 50 packages. The host is back online! There is some minor issue but that is for another day.

Thanks for helping :)
 
  • Like
Reactions: leesteken