[SOLVED] Proxmox 7 - LXC Privileged with Docker won't start after Proxmox reboot

tamet83

Member
Nov 15, 2019
8
1
8
41
Hi,

I tried to search inside the forum but I didn't find anything that applies on my case.
The problem is the following:

I upgraded from Promox 6.5 to 7 lately and everything went well except for my privileged container based on Debian 11 in which I have installed Docker.
When I restart the Node every node will be restarted without issue excetp the one with Docker.
By diggin the situation I found out that the problem is the bind mount of NFS volume from PVE to LXC.
If I remove the bind mount on container configuration it starts correctly after the Node reboot.

This is the error I receive:


Code:
run_buffer: 316 Script exited with status 2
lxc_init: 816 Failed to run lxc.hook.pre-start for container "102"
__lxc_start: 2007 Failed to initialize container "102"
TASK ERROR: startup for container '102' failed

And following is my container configuration:

Code:
arch: amd64
cores: 2
hostname: Docker
memory: 2048
mp0: /mnt/pve/Cloud/data,mp=/nextcloud/data
mp1: /mnt/pve/Backup/backup_docker,mp=/home/backup
mp2: /mnt/pve/Backup/nextcloud_conf,mp=/home/nextcloud_conf
net0: name=eth0,bridge=vmbr0,hwaddr=3E:AE:23:D2:C9:E3,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-102-disk-1,size=32G
startup: order=8
swap: 512
lxc.apparmor.profile: unconfined
lxc.cgroup2.devices.allow: a
lxc.cap.drop:

Can someone gives me any hint about this behavior?

Many thanks.
 
hi,

could it be that your NFS mount is racing with the container? (container starting before NFS is mounted)

maybe adding a delay to your container start can solve the issue. you can go on the GUI to Datacenter -> Node -> CTID -> Options -> Start/Shutdown order and add a start delay there to test.
 
hi,

could it be that your NFS mount is racing with the container? (container starting before NFS is mounted)

maybe adding a delay to your container start can solve the issue. you can go on the GUI to Datacenter -> Node -> CTID -> Options -> Start/Shutdown order and add a start delay there to test.

Hi,

I set up the container start as last among the others one.
By reading the Wiki on startup delay, I understand that it delay the start of following container and not this one. If I'm right, I should setup the delay on the container that starts before this one. Is it correct?
 
, I understand that it delay the start of following container and not this one. If I'm right, I should setup the delay on the container that starts before this one. Is it correct?
yes.

I set up the container start as last among the others one.
okay, if that doesn't work you can try running the container like pct start CTID --debug and posting the debug output here (use [code][/code] brackets).
 
I think you made my day.
I had to better setup the container start order, by letting start at first container without external resources and then the other one. Now I don't have any issue by rebooting the PVE.
The only strange thing is that the problem occurs only with Docker inside an LXC container with NFS mount, the same mount points on other containers without docker didn't present any issue.

In any case, thank you very much.
 

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!