[SOLVED] lxc container does not start...

NomarMora

New Member
Aug 14, 2015
27
0
1
Good day:

Have a lxc container and after a hardware node reboot the pve refuses to start, this is the pct start output

Code:
root@proxmox4-eu0:~# pct start 102
Use of uninitialized value $path in concatenation (.) or string at /usr/share/perl5/PVE/LXC.pm line 1110.
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

Running this:
Code:
root@proxmox4-eu0:~# lxc-start -F -f /etc/pve/lxc/102.conf --name backup01 --logfile /tmp/lxc.log --logpriority TRACE
lxc-start: conf.c: setup_rootfs: 1268 Permission denied - Failed to make / rslave
lxc-start: conf.c: do_rootfs_setup: 3687 failed to setup rootfs for 'backup01'
lxc-start: conf.c: lxc_setup: 3769 Error setting up rootfs mount after spawn
lxc-start: start.c: do_start: 702 failed to setup the container
lxc-start: sync.c: __sync_wait: 51 invalid sequence number 1. expected 2
lxc-start: start.c: __lxc_start: 1172 failed to spawn 'backup01'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

This is the logfile:
Code:
      lxc-start 1458919771.968 WARN     lxc_cgmanager - cgmanager.c:cgm_get:993 - do_cgm_get exited with error
      lxc-start 1458919771.968 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver AppArmor
      lxc-start 1458919771.968 DEBUG    lxc_start - start.c:setup_signal_fd:262 - sigchild handler set
      lxc-start 1458919771.968 INFO     lxc_start - start.c:lxc_init:454 - 'backup01' is initialized
      lxc-start 1458919771.968 DEBUG    lxc_start - start.c:__lxc_start:1145 - Not dropping cap_sys_boot or watching utmp
      lxc-start 1458919771.968 INFO     lxc_cgroup - cgroup.c:cgroup_init:65 - cgroup driver cgmanager initing for backup01
      lxc-start 1458919771.971 ERROR    lxc_conf - conf.c:setup_rootfs:1268 - Permission denied - Failed to make / rslave
      lxc-start 1458919771.971 ERROR    lxc_conf - conf.c:do_rootfs_setup:3687 - failed to setup rootfs for 'backup01'
      lxc-start 1458919771.971 ERROR    lxc_conf - conf.c:lxc_setup:3769 - Error setting up rootfs mount after spawn
      lxc-start 1458919771.971 ERROR    lxc_start - start.c:do_start:702 - failed to setup the container
      lxc-start 1458919771.971 ERROR    lxc_sync - sync.c:__sync_wait:51 - invalid sequence number 1. expected 2
      lxc-start 1458919772.006 ERROR    lxc_start - start.c:__lxc_start:1172 - failed to spawn 'backup01'
      lxc-start 1458919772.007 ERROR    lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
      lxc-start 1458919772.007 ERROR    lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.


And at last this is the config file:
Code:
root@proxmox4-eu0:/etc/pve/lxc# cat 102.conf
arch: amd64
cpulimit: 8
cpuunits: 1024
hostname: backup01
memory: 8192
nameserver: 8.8.8.8 4.4.4.4
net0: bridge=vmbr0,gw=XXX.XXX.XXX.XXX,hwaddr=YY:YY:YY:YY:YY:YY,ip=ZZZ.ZZZ.ZZZ.ZZZ/24,name=eth0,type=veth
onboot: 1
ostype: debian
rootfs: local:102/vm-102-disk-1.raw,size=1T
searchdomain: domain.domain
swap: 2048
root@proxmox4-eu0:/etc/pve/lxc#

I reboot the hnode again and the same the container does not start, please any ideas? :-( I do a fsck on raw and is clean :-(

Thanks in advance
Nomar
 
The output of dmesg | grep apparmor is

Code:
[79613.533731] audit: type=1400 audit(1458998507.877:182): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="/usr/bin/lxc-start" name="/" pid=2830 comm="lxc-start" flags="rw, rslave"
 
Good grief:

The error was in the config file, to the pct start script 1T and 1024G is not the same the problem whas there, changed the 1T to 1024G and the container start with no problem at all.
 
I can't reproduce this, Also the size written out into the config is purely informational and not actually being used, so this doesn't make sense?
 
I can't reproduce this, Also the size written out into the config is purely informational and not actually being used, so this doesn't make sense?

Not merely informational, if you put 1T on conf file, the config parser goes bananas and put a empty on the lxc generated config rootfs, that is the source of this error line:

Code:
Use of uninitialized value $path in concatenation (.) or string at /usr/share/perl5/PVE/LXC.pm line 1110.

When the size is expressed on Gigas (1024G), the parser works fine and the lxc config is generated properly and the container starts fine :)
 
Last edited:
I still want this solved and not worked around, though :p
Judging by the line number your packages could use an upgrade. What's your `pveversion -v`?
 
I still want this solved and not worked around, though :p
Judging by the line number your packages could use an upgrade. What's your `pveversion -v`?
:-D no problem :)

Here we go:
Code:
proxmox-ve: 4.0-16 (running kernel: 4.2.2-1-pve)
pve-manager: 4.0-48 (running version: 4.0-48/0d8559d0)
pve-kernel-4.2.2-1-pve: 4.2.2-16
lvm2: 2.02.116-pve1
corosync-pve: 2.3.5-1
libqb0: 0.17.2-1
pve-cluster: 4.0-22
qemu-server: 4.0-30
pve-firmware: 1.1-7
libpve-common-perl: 4.0-29
libpve-access-control: 4.0-9
libpve-storage-perl: 4.0-25
pve-libspice-server1: 0.12.5-1
vncterm: 1.2-1
pve-qemu-kvm: 2.4-9
pve-container: 1.0-6
pve-firewall: 2.0-12
pve-ha-manager: 1.0-9
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.3-1
lxcfs: 0.9-pve2
cgmanager: 0.37-pve2
criu: 1.6.0-1
zfsutils: 0.6.5-pve4~jessie
 
When you put 1T on the /etc/pve/lxc/102.conf file, this line on /var/lib/lxc/102:

Code:
lxc.rootfs = loop:/var/lib/vz/images/102/vm-102-disk-1.raw

ends like this:

Code:
lxc.rootfs =
 
I'd strongly recommend an apt update && apt dist-upgrade there.
 
Hi,
I am very new to all this, and my issue is, that after i create a fresh debian container from the offered templates, it seems like the container is able to start, but as soon as i hit that console button, it is all black, i cant login nor can i do anythiny else. Only thing possible is typing but without any effects.
Would be great, if someone could help out.
Thanks
 
Hi,
I am very new to all this, and my issue is, that after i create a fresh debian container from the offered templates, it seems like the container is able to start, but as soon as i hit that console button, it is all black, i cant login nor can i do anythiny else. Only thing possible is typing but without any effects.
Would be great, if someone could help out.
Thanks
I have this exact issue. The container started, I have spent a lot of time building it and all was fine. But when I shut it down, it would no longer boot. The container starts and sits there. I can type in console, but no output. CPU is at zero, RAM sitting at 10 meg.
How do I get it running? It's based on ubuntu 22.04 template, but same happened on debian.
 

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!