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

Tomahawk

Member
Feb 11, 2022
17
0
6
41
Dear All,

I have upgraded proxmox from 7.4 to 8.1.10 and trying to restore LXC from backup. Unfortunately I am getting error below:

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

Debug log:

root@nuc11phki7c:~# lxc-start -n 100 -F -l DEBUG -o /tmp/lxc-100.log
lxc-start: 100: ../src/lxc/utils.c: run_buffer: 571 Script exited with status 2
lxc-start: 100: ../src/lxc/start.c: lxc_init: 845 Failed to run lxc.hook.pre-start for container "100"
lxc-start: 100: ../src/lxc/start.c: __lxc_start: 2034 Failed to initialize container "100"
lxc-start: 100: ../src/lxc/tools/lxc_start.c: lxc_start_main: 307 The container failed to start
lxc-start: 100: ../src/lxc/tools/lxc_start.c: lxc_start_main: 312 Additional information can be obtained by setting the --logfile and --logpriority options

---------------------------------------------------------------

root@nuc11phki7c:~# tail -f /tmp/lxc-100.log
lxc-start 100 20240419233648.937 ERROR start - ../src/lxc/start.c:lxc_init:845 - Failed to run lxc.hook.pre-start for container "100"
lxc-start 100 20240419233648.937 ERROR start - ../src/lxc/start.c:__lxc_start:2034 - Failed to initialize container "100"
lxc-start 100 20240419233648.937 INFO utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "100", config section "lxc"
lxc-start 100 20240419233649.227 DEBUG utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 100 lxc post-stop produced output: umount: /var/lib/lxc/.pve-staged-mounts/mp0: not mounted.

lxc-start 100 20240419233649.227 DEBUG utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 100 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp0' failed: exit code 32

lxc-start 100 20240419233649.254 INFO utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "100", config section "lxc"
lxc-start 100 20240419233649.756 ERROR lxc_start - ../src/lxc/tools/lxc_start.c:lxc_start_main:307 - The container failed to start
lxc-start 100 20240419233649.756 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

Do you know what could be wrong ?
 
I found the root cause namely I restored the LXC on different machine on which the attached disk has not been mounted mp0: /mnt/pve/smb/share,mp=/mnt/share that cause the issue. When femoved it then it works fine.