I can't start my lxc, please help me!

ylqjgm

Member
Nov 6, 2018
2
0
6
38
Job for pve-container@100.service failed because the control process exited with error code.
See "systemctl status pve-container@100.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@100' failed: exit code 1

root@KangKang ~ # systemctl status pve-container@100.service
pve-container@100.service - PVE LXC Container: 100
Loaded: loaded (/lib/systemd/system/pve-container@.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-11-06 17:59:16 CET; 7min ago
Docs: man:lxc-start
man:lxc
man:pct
Process: 10397 ExecStart=/usr/bin/lxc-start -n 100 (code=exited, status=1/FAILURE)

Nov 06 17:59:14 KangKang systemd[1]: Starting PVE LXC Container: 100...
Nov 06 17:59:16 KangKang systemd[1]: pve-container@100.service: Control process exited, code=exited status=1
Nov 06 17:59:16 KangKang systemd[1]: Failed to start PVE LXC Container: 100.
Nov 06 17:59:16 KangKang systemd[1]: pve-container@100.service: Unit entered failed state.
Nov 06 17:59:16 KangKang systemd[1]: pve-container@100.service: Failed with result 'exit-code'.

root@KangKang ~ # journalctl -xe
Nov 06 18:07:00 KangKang systemd[1]: Starting Proxmox VE replication runner...
-- Subject: Unit pvesr.service has begun start-up
-- Defined-By: systemd
-- Support: xxxxxxxx
--
-- Unit pvesr.service has begun starting up.
Nov 06 18:07:01 KangKang systemd[1]: Started Proxmox VE replication runner.
-- Subject: Unit pvesr.service has finished start-up
-- Defined-By: systemd
-- Support: xxxxxxxx
--
-- Unit pvesr.service has finished starting up.
--
-- The start-up result is done.
Nov 06 18:07:05 KangKang postfix/smtpd[10909]: connect from unknown[185.36.81.154]
Nov 06 18:07:05 KangKang postfix/smtpd[10909]: lost connection after AUTH from unknown[185.36.81.154]
Nov 06 18:07:05 KangKang postfix/smtpd[10909]: disconnect from unknown[185.36.81.154] ehlo=1 auth=0/1 commands=1/2
Nov 06 18:08:00 KangKang systemd[1]: Starting Proxmox VE replication runner...
-- Subject: Unit pvesr.service has begun start-up
-- Defined-By: systemd
-- Support: xxxxxxxx
--
-- Unit pvesr.service has begun starting up.
Nov 06 18:08:01 KangKang systemd[1]: Started Proxmox VE replication runner.
-- Subject: Unit pvesr.service has finished start-up
-- Defined-By: systemd
-- Support: xxxxxxxxxx
--
-- Unit pvesr.service has finished starting up.
--
-- The start-up result is done.
Nov 06 18:08:06 KangKang systemd[1]: Starting PVE LXC Container: 100...
-- Subject: Unit pve-container@100.service has begun start-up
-- Defined-By: systemd
-- Support: xxxxxxxx
--
-- Unit pve-container@100.service has begun starting up.
Nov 06 18:08:07 KangKang kernel: EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
Nov 06 18:08:07 KangKang systemd[1]: pve-container@100.service: Control process exited, code=exited status=1
Nov 06 18:08:07 KangKang systemd[1]: Failed to start PVE LXC Container: 100.
-- Subject: Unit pve-container@100.service has failed
-- Defined-By: systemd
-- Support: xxxxxxxxx
--
-- Unit pve-container@100.service has failed.
--
-- The result is failed.
Nov 06 18:08:07 KangKang systemd[1]: pve-container@100.service: Unit entered failed state.
Nov 06 18:08:07 KangKang pvedaemon[1772]: unable to get PID for CT 100 (not running?)
Nov 06 18:08:07 KangKang systemd[1]: pve-container@100.service: Failed with result 'exit-code'.

root@KangKang ~ # pveversion -v
proxmox-ve: 5.2-2 (running kernel: 4.15.18-7-pve)
pve-manager: 5.2-10 (running version: 5.2-10/6f892b40)
pve-kernel-4.15: 5.2-10
pve-kernel-4.15.18-7-pve: 4.15.18-27
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: not correctly installed
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-41
libpve-guest-common-perl: 2.0-18
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-30
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-3
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-20
pve-cluster: 5.0-30
pve-container: 2.0-29
pve-docs: 5.2-9
pve-firewall: 3.0-14
pve-firmware: 2.0-5
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-38
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3

root@KangKang ~ # pct config 100
arch: amd64
cores: 1
hostname: 16MB
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,gw6=xxxxxxxxx,hwaddr=xxxxxx,ip=dhcp,ip6=xxxxxx/64,type=veth
net1: name=eth1,bridge=vmbr1,gw=xxxxx,hwaddr=xxxxxx,ip=xxxxxx/32,type=veth
onboot: 1
ostype: alpine
rootfs: local:100/vm-100-disk-0.raw,size=8G
swap: 512

root@KangKang ~ # lxc-start -n 100 -F
root@KangKang ~ #

root@KangKang ~ # lxc-start -o lxc-start.log -lDEBUG -F -n 100
lxc-start: 100: conf.c: run_buffer: 353 Script exited with status 1
lxc-start: 100: start.c: lxc_init: 828 Failed to run lxc.hook.pre-start for container "100"
lxc-start: 100: start.c: __lxc_start: 1914 Failed to initialize container "100"
lxc-start: 100: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: 100: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options

root@KangKang ~ # cat lxc-start.log
lxc-start 100 20181106170000.539 INFO lsm - lsm/lsm.c:lsm_init:47 - LSM security driver AppArmor
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "reject_force_umount # comment this to allow umount -f; not recommended"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for reject_force_umount action 0(kill)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for reject_force_umount action 0(kill)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for reject_force_umount action 0(kill)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for reject_force_umount action 0(kill)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "[all]"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "kexec_load errno 1"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for kexec_load action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for kexec_load action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for kexec_load action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for kexec_load action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "open_by_handle_at errno 1"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for open_by_handle_at action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for open_by_handle_at action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for open_by_handle_at action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for open_by_handle_at action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "init_module errno 1"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for init_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for init_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for init_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for init_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "finit_module errno 1"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for finit_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for finit_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for finit_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for finit_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "delete_module errno 1"
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for delete_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for delete_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for delete_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for delete_module action 327681(errno)
lxc-start 100 20181106170000.539 INFO seccomp - seccomp.c:parse_config_v2:967 - Merging compat seccomp contexts into main context
lxc-start 100 20181106170000.540 INFO conf - conf.c:run_script_argv:374 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "100", config section "lxc"
lxc-start 100 20181106170001.303 DEBUG conf - conf.c:run_buffer:344 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start with output: close (rename) atomic file '/etc/inittab' failed: Operation not permitted

lxc-start 100 20181106170001.304 DEBUG conf - conf.c:run_buffer:344 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start with output: error in setup task PVE::LXC::Setup::pre_start_hook

lxc-start 100 20181106170001.311 ERROR conf - conf.c:run_buffer:353 - Script exited with status 1
lxc-start 100 20181106170001.311 ERROR start - start.c:lxc_init:828 - Failed to run lxc.hook.pre-start for container "100"
lxc-start 100 20181106170001.311 ERROR start - start.c:__lxc_start:1914 - Failed to initialize container "100"
lxc-start 100 20181106170001.311 ERROR lxc_start - tools/lxc_start.c:main:330 - The container failed to start
lxc-start 100 20181106170001.311 ERROR lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options

root@KangKang ~ # cat /var/lib/lxc/100/config
lxc.arch = amd64
lxc.include = /usr/share/lxc/config/alpine.common.conf
lxc.apparmor.profile = generated
lxc.apparmor.raw = deny mount -> /proc/,
lxc.apparmor.raw = deny mount -> /sys/,
lxc.monitor.unshare = 1
lxc.tty.max = 2
lxc.environment = TERM=linux
lxc.uts.name = 16MB
lxc.cgroup.memory.limit_in_bytes = 536870912
lxc.cgroup.memory.memsw.limit_in_bytes = 1073741824
lxc.cgroup.cpu.shares = 1024
lxc.rootfs.path = /var/lib/lxc/100/rootfs
lxc.net.0.type = veth
lxc.net.0.veth.pair = veth100i0
lxc.net.0.hwaddr = xxxxxxxx
lxc.net.0.name = eth0
lxc.net.1.type = veth
lxc.net.1.veth.pair = veth100i1
lxc.net.1.hwaddr = xxxxxxxx
lxc.net.1.name = eth1
lxc.cgroup.cpuset.cpus = 3
 
Last edited:
lxc-start 100 20181106170001.303 DEBUG conf - conf.c:run_buffer:344 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start with output: close (rename) atomic file '/etc/inittab' failed: Operation not permitted

did you changed the permissions of /etc/inittab to immutable (or something similar resulting in no possible access)?

you should be able to look at it with:
Code:
# pct mount 100
# ls -l /var/lib/lxc/100/rootfs/etc/inittab

If you did that to enforce that PVE does not touches it just create an empty '.pve-ignore.inittab' file in the CT's /etc/
 
did you changed the permissions of /etc/inittab to immutable (or something similar resulting in no possible access)?

you should be able to look at it with:
Code:
# pct mount 100
# ls -l /var/lib/lxc/100/rootfs/etc/inittab

If you did that to enforce that PVE does not touches it just create an empty '.pve-ignore.inittab' file in the CT's /etc/


Thank you very much, it has been solved.
 

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!