[SOLVED] Issue starting lxc container

ikwtif

Member
Feb 26, 2021
6
1
8
37
Edit: Fixed the issue, see latest reply

I just moved my proxmox to a new ssd, but I'm having trouble starting one of my lxc containers (with jellyfin installation).

I'm getting this error
root@pve:~# lxc-start 104
lxc-start: 104: lxccontainer.c: wait_on_daemonized_start: 867 Received container state "ABORTING" instead of "RUNNING"
lxc-start: 104: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: 104: tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode
lxc-start: 104: tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options

log file content
lxc-start 104 20211218222858.335 INFO lsm - lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver AppArmor
lxc-start 104 20211218222858.335 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "104", config section "lxc"
lxc-start 104 20211218222858.712 DEBUG seccomp - seccomp.c:parse_config_v2:656 - Host native arch is [3221225534]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "reject_force_umount # comment this to allow umount -f; not recommended"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:524 - Set seccomp rule to reject force umounts
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:524 - Set seccomp rule to reject force umounts
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:524 - Set seccomp rule to reject force umounts
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "[all]"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "kexec_load errno 1"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding native rule for syscall[246:kexec_load] action[327681:errno] arch[0]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[246:kexec_load] action[327681:errno] arch[1073741827]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[246:kexec_load] action[327681:errno] arch[1073741886]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "open_by_handle_at errno 1"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding native rule for syscall[304:eek:pen_by_handle_at] action[327681:errno] arch[0]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[304:eek:pen_by_handle_at] action[327681:errno] arch[1073741827]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[304:eek:pen_by_handle_at] action[327681:errno] arch[1073741886]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "init_module errno 1"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding native rule for syscall[175:init_module] action[327681:errno] arch[0]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[175:init_module] action[327681:errno] arch[1073741827]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[175:init_module] action[327681:errno] arch[1073741886]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "finit_module errno 1"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding native rule for syscall[313:finit_module] action[327681:errno] arch[0]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[313:finit_module] action[327681:errno] arch[1073741827]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[313:finit_module] action[327681:errno] arch[1073741886]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:807 - Processing "delete_module errno 1"
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding native rule for syscall[176:delete_module] action[327681:errno] arch[0]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[176:delete_module] action[327681:errno] arch[1073741827]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:do_resolve_add_rule:564 - Adding compat rule for syscall[176:delete_module] action[327681:errno] arch[1073741886]
lxc-start 104 20211218222858.712 INFO seccomp - seccomp.c:parse_config_v2:1017 - Merging compat seccomp contexts into main context
lxc-start 104 20211218222858.870 INFO start - start.c:lxc_init:883 - Container "104" is initialized
lxc-start 104 20211218222858.882 INFO cgfsng - cgroups/cgfsng.c:cgfsng_monitor_create:1028 - The monitor process uses "lxc.monitor/104" as cgroup
lxc-start 104 20211218222858.882 DEBUG storage - storage/storage.c:storage_query:231 - Detected rootfs type "dir"
lxc-start 104 20211218222858.882 INFO cgfsng - cgroups/cgfsng.c:cgfsng_payload_create:1136 - The container process uses "lxc/104/ns" as inner and "lxc/104" as limit cgroup
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWNS
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWPID
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWUTS
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWIPC
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWNET
lxc-start 104 20211218222858.883 INFO start - start.c:lxc_spawn:1759 - Cloned CLONE_NEWCGROUP
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved mnt namespace via fd 18 and stashed path as mnt:/proc/69963/fd/18
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved pid namespace via fd 19 and stashed path as pid:/proc/69963/fd/19
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved uts namespace via fd 20 and stashed path as uts:/proc/69963/fd/20
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved ipc namespace via fd 21 and stashed path as ipc:/proc/69963/fd/21
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved net namespace via fd 22 and stashed path as net:/proc/69963/fd/22
lxc-start 104 20211218222858.883 DEBUG start - start.c:lxc_try_preserve_namespace:139 - Preserved cgroup namespace via fd 23 and stashed path as cgroup:/proc/69963/fd/23
lxc-start 104 20211218222858.883 WARN cgfsng - cgroups/cgfsng.c:cgfsng_setup_limits_legacy:2732 - Invalid argument - Ignoring legacy cgroup limits on pure cgroup2 system
lxc-start 104 20211218222858.883 INFO cgfsng - cgroups/cgfsng.c:cgfsng_setup_limits:2828 - Limits for the unified cgroup hierarchy have been setup
lxc-start 104 20211218222858.885 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/lxcnetaddbr" for container "104", config section "net"
lxc-start 104 20211218222859.255 DEBUG network - network.c:netdev_configure_server_veth:851 - Instantiated veth tunnel "veth104i0 <--> vethWk4aZY"
lxc-start 104 20211218222859.255 DEBUG conf - conf.c:lxc_mount_rootfs:1432 - Mounted rootfs "/var/lib/lxc/104/rootfs" onto "/usr/lib/x86_64-linux-gnu/lxc/rootfs" with options "(null)"
lxc-start 104 20211218222859.255 INFO conf - conf.c:setup_utsname:875 - Set hostname to "jellyfin"
lxc-start 104 20211218222859.278 DEBUG network - network.c:setup_hw_addr:3807 - Mac address "2A:7F:E7:12:51:97" on "eth0" has been setup
lxc-start 104 20211218222859.278 DEBUG network - network.c:lxc_network_setup_in_child_namespaces_common:3948 - Network device "eth0" has been setup
lxc-start 104 20211218222859.278 INFO network - network.c:lxc_setup_network_in_child_namespaces:4005 - Finished setting up network devices with caller assigned names
lxc-start 104 20211218222859.278 INFO conf - conf.c:mount_autodev:1215 - Preparing "/dev"
lxc-start 104 20211218222859.279 INFO conf - conf.c:mount_autodev:1276 - Prepared "/dev"
lxc-start 104 20211218222859.279 DEBUG conf - conf.c:lxc_mount_auto_mounts:735 - Invalid argument - Tried to ensure procfs is unmounted
lxc-start 104 20211218222859.279 DEBUG conf - conf.c:lxc_mount_auto_mounts:758 - Invalid argument - Tried to ensure sysfs is unmounted
lxc-start 104 20211218222859.279 DEBUG conf - conf.c:mount_entry:2412 - Remounting "/sys/fs/fuse/connections" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/fs/fuse/connections" to respect bind or remount options
lxc-start 104 20211218222859.279 DEBUG conf - conf.c:mount_entry:2431 - Flags for "/sys/fs/fuse/connections" were 4110, required extra flags are 14
lxc-start 104 20211218222859.279 DEBUG conf - conf.c:mount_entry:2475 - Mounted "/sys/fs/fuse/connections" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/fs/fuse/connections" with filesystem type "none"
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2412 - Remounting "/sys/kernel/debug" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/kernel/debug" to respect bind or remount options
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2431 - Flags for "/sys/kernel/debug" were 4110, required extra flags are 14
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2475 - Mounted "/sys/kernel/debug" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/kernel/debug" with filesystem type "none"
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2412 - Remounting "/sys/kernel/security" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/kernel/security" to respect bind or remount options
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2431 - Flags for "/sys/kernel/security" were 4110, required extra flags are 14
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2475 - Mounted "/sys/kernel/security" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/kernel/security" with filesystem type "none"
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2412 - Remounting "/sys/fs/pstore" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/fs/pstore" to respect bind or remount options
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2431 - Flags for "/sys/fs/pstore" were 4110, required extra flags are 14
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2475 - Mounted "/sys/fs/pstore" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/sys/fs/pstore" with filesystem type "none"
lxc-start 104 20211218222859.280 DEBUG conf - conf.c:mount_entry:2475 - Mounted "mqueue" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/dev/mqueue" with filesystem type "mqueue"
lxc-start 104 20211218222859.280 DEBUG cgfsng - cgroups/cgfsng.c:__cgroupfs_mount:1540 - Mounted cgroup filesystem cgroup2 onto 20((null))
lxc-start 104 20211218222859.280 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxcfs/lxc.mount.hook" for container "104", config section "lxc"
lxc-start 104 20211218222859.316 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/hooks/lxc-pve-autodev-hook" for container "104", config section "lxc"
lxc-start 104 20211218222859.380 INFO conf - conf.c:run_script_argv:337 - Executing script "/var/lib/lxc/100/mount_hook.sh" for container "104", config section "lxc"
lxc-start 104 20211218222859.380 DEBUG conf - conf.c:run_buffer:310 - Script exec /var/lib/lxc/100/mount_hook.sh 104 lxc autodev produced output: sh: 1: exec: /var/lib/lxc/100/mount_hook.sh: not found

lxc-start 104 20211218222859.380 ERROR conf - conf.c:run_buffer:321 - Script exited with status 127
lxc-start 104 20211218222859.380 ERROR conf - conf.c:lxc_setup:4398 - Failed to run autodev hooks
lxc-start 104 20211218222859.380 ERROR start - start.c:do_start:1274 - Failed to setup container "104"
lxc-start 104 20211218222859.380 ERROR sync - sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 4)
lxc-start 104 20211218222859.381 DEBUG network - network.c:lxc_delete_network:4159 - Deleted network devices
lxc-start 104 20211218222859.381 ERROR start - start.c:__lxc_start:2068 - Failed to spawn container "104"
lxc-start 104 20211218222859.381 WARN start - start.c:lxc_abort:1038 - No such process - Failed to send SIGKILL via pidfd 17 for process 69995
lxc-start 104 20211218222859.567 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "104", config section "lxc"
lxc-start 104 20211218222900.110 INFO conf - conf.c:run_script_argv:337 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "104", config section "lxc"
lxc-start 104 20211218222900.612 ERROR lxc_start - tools/lxc_start.c:main:306 - The container failed to start
lxc-start 104 20211218222900.612 ERROR lxc_s

Now, the lxc on my previous drive was 100. And I notice in the logs it is looking for this
lxc-start 104 20211218222859.380 DEBUG conf - conf.c:run_buffer:310 - Script exec /var/lib/lxc/100/mount_hook.sh 104 lxc autodev produced output: sh: 1: exec: /var/lib/lxc/100/mount_hook.sh: not found

I did change 100 to 104 in the lxc 104.config for the line lxc.hook.autodev, but it doesn't seem to work. Not sure what the issue is

oot@pve:~# cat /etc/pve/lxc/104.conf
arch: amd64
cores: 6
features: mount=cifs
hostname: jellyfin
memory: 4096
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.1,hwaddr=2A:7F:E7:12:51:97,ip=192.168.1.16/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-104-disk-0,size=100G
startup: order=4
swap: 1024
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/104/mount_hook.sh
 
Last edited:
hi,

what's inside the /var/lib/lxc/104/mount_hook.sh script?

I did change 100 to 104 in the lxc 104.config for the line lxc.hook.autodev, but it doesn't seem to work
if that file above is now found when starting the container, then can you please try running the container again with the debug options and posting the output here? (hint: use a [code][/code] tag when posting)
 
Hi. Apologies, I forgot to close the thread.
The issue was, On my old server I was trying to pass trough the integrated graphics to the lxc (which never ended up working). But I never removed the code from the config file, and I assumed the part for the pass trough was just standard from the config, so I assumed mount_hook should just be there and didn't think much more from it.
So after removing

Code:
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/100/mount_hook.sh

from the config file the container started without issues.
But thanks for the reply!
 
great, thanks for sharing your solution :)
 

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!