cant start lxc

chamseddine

Active Member
Mar 23, 2018
13
0
41
47
Tunisie
Hello,

note: same 486 lxc work fine in a test-proxmox server recently installed v 7.1

proxmox-prod (not fresh install : latest upgrade from 6.4 to 7.x)

Code:
# pct list
VMID       Status     Lock         Name
386        stopped                 OpenWRT
486        stopped                 deb11

Code:
# lxc-start -n 486 -F
lxc-start: 486: sync.c: sync_wait: 34 An error occurred in another process (expected sequence number 7)
lxc-start: 486: start.c: __lxc_start: 2068 Failed to spawn container "486"
lxc-start: 486: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: 486: tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

from web :
Code:
sync_wait: 34 An error occurred in another process (expected sequence number 7)
__lxc_start: 2068 Failed to spawn container "486"
TASK ERROR: startup for container '486' failed

Code:
# systemctl status lxcfs.service
● lxcfs.service - FUSE filesystem for LXC
     Loaded: loaded (/lib/systemd/system/lxcfs.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-04-06 14:28:11 CET; 6 days ago
       Docs: man:lxcfs(1)
   Main PID: 4939 (lxcfs)
      Tasks: 3 (limit: 154510)
     Memory: 1.1M
        CPU: 6ms
     CGroup: /system.slice/lxcfs.service
             └─4939 /usr/bin/lxcfs /var/lib/lxcfs

Apr 06 14:28:11 r630 lxcfs[4939]: - proc_diskstats
Apr 06 14:28:11 r630 lxcfs[4939]: - proc_loadavg
Apr 06 14:28:11 r630 lxcfs[4939]: - proc_meminfo
Apr 06 14:28:11 r630 lxcfs[4939]: - proc_stat
Apr 06 14:28:11 r630 lxcfs[4939]: - proc_swaps
Apr 06 14:28:11 r630 lxcfs[4939]: - proc_uptime
Apr 06 14:28:11 r630 lxcfs[4939]: - shared_pidns
Apr 06 14:28:11 r630 lxcfs[4939]: - cpuview_daemon
Apr 06 14:28:11 r630 lxcfs[4939]: - loadavg_daemon
Apr 06 14:28:11 r630 lxcfs[4939]: - pidfds

Code:
# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-6-pve)
pve-manager: 7.1-12 (running version: 7.1-12/b3c09de3)
pve-kernel-helper: 7.1-14
pve-kernel-5.13: 7.1-9
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-5-pve: 5.13.19-13
ceph-fuse: 15.2.16-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown: residual config
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-7
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-5
libpve-guest-common-perl: 4.1-1
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.1-1
libqb0: 1.0.5-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-2
proxmox-backup-client: 2.1.5-1
proxmox-backup-file-restore: 2.1.5-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-7
pve-cluster: 7.1-3
pve-container: 4.1-4
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-6
pve-ha-manager: 3.3-3
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.1-2
pve-xtermjs: 4.16.0-1
qemu-server: 7.1-4
smartmontools: 7.2-pve2
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

Code:
# systemctl status pve-container@486.service
● pve-container@486.service - PVE LXC Container: 486
     Loaded: loaded (/lib/systemd/system/pve-container@.service; static)
     Active: failed (Result: exit-code) since Wed 2022-04-13 13:18:16 CET; 1h 4min ago
       Docs: man:lxc-start
             man:lxc
             man:pct
   Main PID: 748508 (code=exited, status=1/FAILURE)
        CPU: 852ms

Apr 13 13:18:12 r630 systemd[1]: Started PVE LXC Container: 486.
Apr 13 13:18:16 r630 systemd[1]: pve-container@486.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 13:18:16 r630 systemd[1]: pve-container@486.service: Failed with result 'exit-code'.

Code:
# lxc-start -n 486 -F -l DEBUG -o /tmp/lxc-486.log
lxc-start: 486: sync.c: sync_wait: 34 An error occurred in another process (expected sequence number 7)
lxc-start: 486: start.c: __lxc_start: 2068 Failed to spawn container "486"
lxc-start: 486: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: 486: tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

Code:
# pct start 486 --debug > /tmp/lxc-486-start.log
startup for container '486' failed

486.conf :
Code:
arch: amd64
cores: 8
features: nesting=1
hostname: deb11
memory: 4096
nameserver: 172.16.0.3
net0: name=eth0,bridge=vmbr1,firewall=1,gw=172.16.0.254,hwaddr=BE:A3:55:BC:85:38,ip=172.16.0.63/16,type=veth
ostype: debian
rootfs: dev_serv:subvol-486-disk-0,size=128G
searchdomain: pct.local
swap: 2048
unprivileged: 1

Code:
# pct mount 486
mounted CT 486 in '/var/lib/lxc/486/rootfs'
# cat /var/lib/lxc/486/rootfs/etc/debian_version
11.3

lxc-486.log
lxc-486-start.log
 

Attachments

  • lxc-486.log
    18 KB · Views: 3
  • lxc-486-start.log
    12.8 KB · Views: 8
Last edited:
hi,

in your log file there are these lines:
Code:
lxc-start 486 20220413130805.579 NOTICE   start - start.c:start:2154 - Exec'ing "/sbin/init"
lxc-start 486 20220413130805.580 ERROR    start - start.c:start:2157 - Permission denied - Failed to exec "/sbin/init"

it seems like:
1. /sbin/init is missing
2. or has wrong permissions
3. or is corrupted (in your disk image)

where did you get the template file you used for the container?

you can use pct mount command on your PVE machine to mount the container disk and inspect the contents.

also have you tried making a fresh debian container with our official templates? [0]

if that works, you could copy your needed files from the broken container to the new one.

[0]: https://pve.proxmox.com/wiki/Linux_Container#pct_supported_distributions
 
hi,

in your log file there are these lines:
Code:
lxc-start 486 20220413130805.579 NOTICE   start - start.c:start:2154 - Exec'ing "/sbin/init"
lxc-start 486 20220413130805.580 ERROR    start - start.c:start:2157 - Permission denied - Failed to exec "/sbin/init"

it seems like:
1. /sbin/init is missing
2. or has wrong permissions
3. or is corrupted (in your disk image)

where did you get the template file you used for the container?

you can use pct mount command on your PVE machine to mount the container disk and inspect the contents.

also have you tried making a fresh debian container with our official templates? [0]

if that works, you could copy your needed files from the broken container to the new one.

[0]: https://pve.proxmox.com/wiki/Linux_Container#pct_supported_distributions
in a fresh installed proxmox (new and different physical server) all works fine (im testing docker in lxc : it looks great)
so how can i fix the old one (its in prod since proxmox v4: cumulative upgrade)
Code:
root@r630:~# pveversion -v
proxmox-ve: 7.3-1 (running kernel: 5.15.74-1-pve)
pve-manager: 7.3-6 (running version: 7.3-6/723bb6ec)
pve-kernel-helper: 7.3-3
pve-kernel-5.15: 7.3-2
pve-kernel-5.13: 7.1-9
pve-kernel-5.15.85-1-pve: 5.15.85-1
pve-kernel-5.15.83-1-pve: 5.15.83-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
pve-kernel-5.13.19-6-pve: 5.13.19-15
ceph-fuse: 16.2.9-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown: residual config
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.3
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.3-1
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-2
libpve-guest-common-perl: 4.2-3
libpve-http-server-perl: 4.1-5
libpve-storage-perl: 7.3-2
libqb0: 1.0.5-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-1
lxcfs: 5.0.3-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.3.2-1
proxmox-backup-file-restore: 2.3.2-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-widget-toolkit: 3.5.5
pve-cluster: 7.3-2
pve-container: 4.4-2
pve-docs: 7.3-1
pve-edk2-firmware: 3.20220526-1
pve-firewall: 4.2-7
pve-firmware: 3.6-3
pve-ha-manager: 3.5.1
pve-i18n: 2.8-2
pve-qemu-kvm: 7.1.0-4
pve-xtermjs: 4.16.0-1
qemu-server: 7.3-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+2
vncterm: 1.7-1
zfsutils-linux: 2.1.9-pve1
root@r630:~#
 
Last edited:
Hi, are you still getting the same error (Permission denied - Failed to exec "/sbin/init") as you posted in April 2022? This sounds like a permission issue. Could you please post the owner and file permissions of /sbin/init on the mounted container filesystem?
Code:
pct mount $CTID # replacing $CTID with your container ID
ls -nl /var/lib/lxc/$CTID/rootfs/sbin/init
ls -nl /var/lib/lxc/$CTID/rootfs/lib/systemd/systemd
 

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!