845 Failed to run lxc.hook.pre-start for container

make77

New Member
Jan 21, 2024
4
0
1
hi all,

One of my containers suddenly refuses to start.
I'm runninh on Proxmox v 8.2.4

Hope someone here can poijt me in the right direction.
Thanks a lot in advance.

The Error message i'm getting is:

Code:
run_buffer: 571 Script exited with status 16
lxc_init: 845 Failed to run lxc.hook.pre-start for container "102"
__lxc_start: 2034 Failed to initialize container "102"
TASK ERROR: startup for container '102' failed


what i have in the debug log of the start is this:


Code:
lxc-start 102 20240727145246.241 INFO     lsm - ../src/lxc/lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver AppArmor

lxc-start 102 20240727145246.384 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "102", config section "lxc"

lxc-start 102 20240727145247.892 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: failed to remove directory '/sys/fs/cgroup/lxc/102/ns/system.slice/XeomaCoreService.service': Device or resource busy



lxc-start 102 20240727145247.918 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 16

lxc-start 102 20240727145247.918 ERROR    start - ../src/lxc/start.c:lxc_init:845 - Failed to run lxc.hook.pre-start for container "102"

lxc-start 102 20240727145247.918 ERROR    start - ../src/lxc/start.c:__lxc_start:2034 - Failed to initialize container "102"

lxc-start 102 20240727145247.918 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "102", config section "lxc"

lxc-start 102 20240727145248.423 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "102", config section "lxc"

lxc-start 102 20240727145250.225 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 102 lxc post-stop produced output: umount: /var/lib/lxc/102/rootfs: not mounted



lxc-start 102 20240727145250.226 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 102 lxc post-stop produced output: command 'umount --recursive -- /var/lib/lxc/102/rootfs' failed: exit code 1



lxc-start 102 20240727145250.258 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 1

lxc-start 102 20240727145250.259 ERROR    start - ../src/lxc/start.c:lxc_end:986 - Failed to run lxc.hook.post-stop for container "102"

lxc-start 102 20240727145250.259 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:lxc_start_main:307 - The container failed to start

lxc-start 102 20240727145250.259 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:lxc_start_main:312 - Additional information can be obtained by setting the --logfile and --logpriority options
 
Random question, do you have any SMBs or any drives/directories passed into it?

I'm suuuuuper new at proxmox, so take all this with a grain of salt, but playing around with my stuff I tracked down my error that was exactly the same as yours to the way I was bringing the share into the proxmox node. i originally added the SMB via the datacenter, storage, this would make the container fail to start.

When i swapped to mounting the SMB with the fstab it worked, kind of. At lease for me, there needed to be a delay for the network connection, you can google how to do that. And then put a small start up delay on the container so the network can get connected, the SMB can be mounted, then the container can start.

Just something to look at or think about.
 
  • Like
Reactions: fiona
Hi,
the initial error seems to be here related to XeomaCoreService (unfortunately, never heard about that before):
Code:
lxc-start 102 20240727145247.892 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: failed to remove directory '/sys/fs/cgroup/lxc/102/ns/system.slice/XeomaCoreService.service': Device or resource busy
lxc-start 102 20240727145247.918 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 16

Please share the output of pveversion -v and pct config 102.
 
Hi,
the initial error seems to be here related to XeomaCoreService (unfortunately, never heard about that before):
Code:
lxc-start 102 20240727145247.892 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: failed to remove directory '/sys/fs/cgroup/lxc/102/ns/system.slice/XeomaCoreService.service': Device or resource busy
lxc-start 102 20240727145247.918 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 16

Please share the output of pveversion -v and pct config 102.
Hi,

Xeoma is an NVR application running in the container.

output of pveversion -v:

Code:
proxmox-ve: 8.2.0 (running kernel: 6.5.13-5-pve)
pve-manager: 8.2.4 (running version: 8.2.4/faa83925c9641325)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.8: 6.8.8-2
proxmox-kernel-6.8.8-2-pve-signed: 6.8.8-2
proxmox-kernel-6.8.4-3-pve-signed: 6.8.4-3
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
proxmox-kernel-6.5.13-5-pve-signed: 6.5.13-5
proxmox-kernel-6.5: 6.5.13-5
proxmox-kernel-6.5.13-1-pve-signed: 6.5.13-1
proxmox-kernel-6.5.11-8-pve-signed: 6.5.11-8
proxmox-kernel-6.5.11-4-pve-signed: 6.5.11-4
ceph-fuse: 17.2.7-pve1
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx8
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.1
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.1.4
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.0.7
libpve-cluster-perl: 8.0.7
libpve-common-perl: 8.2.1
libpve-guest-common-perl: 5.1.3
libpve-http-server-perl: 5.1.0
libpve-network-perl: 0.9.8
libpve-rs-perl: 0.8.9
libpve-storage-perl: 8.2.3
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.2.7-1
proxmox-backup-file-restore: 3.2.7-1
proxmox-firewall: 0.4.2
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.3
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.6
proxmox-widget-toolkit: 4.2.3
pve-cluster: 8.0.7
pve-container: 5.1.12
pve-docs: 8.2.2
pve-edk2-firmware: 4.2023.08-4
pve-esxi-import-tools: 0.7.1
pve-firewall: 5.0.7
pve-firmware: 3.12-1
pve-ha-manager: 4.0.5
pve-i18n: 3.2.2
pve-qemu-kvm: 9.0.0-6
pve-xtermjs: 5.3.0-3
qemu-server: 8.2.1
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.4-pve1

and pct config 102

Code:
arch: amd64
cores: 10
features: mount=nfs
hostname: Xeoma
memory: 16384
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.254,hwaddr=BC:24:11:D0:50:BA,ip=192.168.1.6/24,type=veth
onboot: 1
ostype: debian
rootfs: NFS:102/vm-102-disk-1.raw,size=20G
swap: 512
 
Random question, do you have any SMBs or any drives/directories passed into it?

I'm suuuuuper new at proxmox, so take all this with a grain of salt, but playing around with my stuff I tracked down my error that was exactly the same as yours to the way I was bringing the share into the proxmox node. i originally added the SMB via the datacenter, storage, this would make the container fail to start.

When i swapped to mounting the SMB with the fstab it worked, kind of. At lease for me, there needed to be a delay for the network connection, you can google how to do that. And then put a small start up delay on the container so the network can get connected, the SMB can be mounted, then the container can start.

Just something to look at or think about.
Hi,

I have within the container an NFS share mounted within the fstab.
 
It might be that the container or in particular the Xeoma service was not shut down cleanly before. If you check the output of ps faxl, do you see anything related to the container or service?

A reboot of the host probably would help, but isn't ideal as a workaround of course.
 

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!