CT Failing to start: Unable to detect OS disribution

Colonal

Active Member
Aug 21, 2018
11
1
43
Background info of the scenario when this started happening. I am running proxmox 5.4-13 with several containers (Deb 9, Ubuntu 16-19) and VMs. I had to switch from a tower to a rack mount chassis, no other hardware has been changed.

Now no containers will start, but my VMs will. When I attempt to start a container via the gui this is what I get:
Code:
Job for pve-container@105.service failed because the control process exited with error code.
See "systemctl status pve-container@105.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@105' failed: exit code 1

So I attempted to start in the shell with command: lxc-start -lDEBUG -o 105.log -F -n 105, and this is what I get in that log file:
Code:
lxc-start 105 20200211035535.478 INFO     lsm - lsm/lsm.c:lsm_init:50 - LSM security driver AppArmor
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "reject_force_umount  # comment this to allow umount -f;  not recommended"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:do_resolve_add_rule:505 - Set seccomp rule to reject force umounts
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for reject_force_umount action 0(kill)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:do_resolve_add_rule:505 - Set seccomp rule to reject force umounts
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for reject_force_umount action 0(kill)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:do_resolve_add_rule:505 - Set seccomp rule to reject force umounts
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for reject_force_umount action 0(kill)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:do_resolve_add_rule:505 - Set seccomp rule to reject force umounts
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for reject_force_umount action 0(kill)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "[all]"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "kexec_load errno 1"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for kexec_load action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for kexec_load action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for kexec_load action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for kexec_load action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "open_by_handle_at errno 1"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for open_by_handle_at action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for open_by_handle_at action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for open_by_handle_at action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for open_by_handle_at action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "init_module errno 1"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for init_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for init_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for init_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for init_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "finit_module errno 1"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for finit_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for finit_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for finit_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for finit_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:759 - Processing "delete_module errno 1"
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:937 - Added native rule for arch 0 for delete_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:946 - Added compat rule for arch 1073741827 for delete_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:956 - Added compat rule for arch 1073741886 for delete_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:966 - Added native rule for arch -1073741762 for delete_module action 327681(errno)
lxc-start 105 20200211035535.478 INFO     seccomp - seccomp.c:parse_config_v2:970 - Merging compat seccomp contexts into main context
lxc-start 105 20200211035535.478 INFO     conf - conf.c:run_script_argv:356 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "105", config section "lxc"
lxc-start 105 20200211035536.222 DEBUG    conf - conf.c:run_buffer:326 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 105 lxc pre-start with output: unable to detect OS distribution

lxc-start 105 20200211035536.231 ERROR    conf - conf.c:run_buffer:335 - Script exited with status 2
lxc-start 105 20200211035536.231 ERROR    start - start.c:lxc_init:861 - Failed to run lxc.hook.pre-start for container "105"
lxc-start 105 20200211035536.232 ERROR    start - start.c:__lxc_start:1944 - Failed to initialize container "105"
lxc-start 105 20200211035536.232 ERROR    lxc_start - tools/lxc_start.c:main:330 - The container failed to start
lxc-start 105 20200211035536.232 ERROR    lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options

The problem I get from this is "unable to detect OS distribution". I've looked at a few posts and tried fixes suggested, with no luck.
Any help would be appreciated.
 
hi,

please post the container config (pct config CTID) as well

also if your containers are on ZFS then it might be possible that the volumes are simply not mounted
 
  • Like
Reactions: Colonal
Wow thank you. I checked with zfs mount and they weren't there. So I just needed to use zfs mount -O xxx for each containers disk and it worked.
 
great! also take a look at this post here[0] for a better fix (culprit is likely zfs cachefile)

[0]: https://forum.proxmox.com/threads/update-broke-lxc.59776/#post-277303

I see what you mean by better fix, every time I reboot I need to remount those drives. I attempted running those 2 commands for each ppol with no change.

But I noticed I'm having issues with some of the sub volumes. Some get mounted on boot, but when I mount the disk it replaces those sub volumes with an empty one.

Code:
root@prox:~# zfs get all | grep mount
Security                 mounted               yes                       -
Security                 mountpoint            /Security                 default
Security                 canmount              on                        default
nvme                     mounted               no                        -
nvme                     mountpoint            /nvme                     default
nvme                     canmount              on                        default
nvme/subvol-101-disk-0   mounted               no                        -
nvme/subvol-101-disk-0   mountpoint            /nvme/subvol-101-disk-0   default
nvme/subvol-101-disk-0   canmount              on                        default
nvme/subvol-103-disk-0   mounted               no                        -
nvme/subvol-103-disk-0   mountpoint            /nvme/subvol-103-disk-0   default
nvme/subvol-103-disk-0   canmount              on                        default
nvme/subvol-104-disk-0   mounted               yes                       -
nvme/subvol-104-disk-0   mountpoint            /nvme/subvol-104-disk-0   default
nvme/subvol-104-disk-0   canmount              on                        default
nvme/subvol-105-disk-0   mounted               no                        -
nvme/subvol-105-disk-0   mountpoint            /nvme/subvol-105-disk-0   default
nvme/subvol-105-disk-0   canmount              on                        default
nvme/subvol-107-disk-0   mounted               yes                       -
nvme/subvol-107-disk-0   mountpoint            /nvme/subvol-107-disk-0   default
nvme/subvol-107-disk-0   canmount              on                        default
nvme/subvol-110-disk-0   mounted               no                        -
nvme/subvol-110-disk-0   mountpoint            /nvme/subvol-110-disk-0   default
nvme/subvol-110-disk-0   canmount              on                        default
nvme/subvol-113-disk-0   mounted               no                        -
nvme/subvol-113-disk-0   mountpoint            /nvme/subvol-113-disk-0   default
nvme/subvol-113-disk-0   canmount              on                        default
nvme/subvol-115-disk-0   mounted               yes                       -
nvme/subvol-115-disk-0   mountpoint            /nvme/subvol-115-disk-0   default
nvme/subvol-115-disk-0   canmount              on                        default
nvme/subvol-117-disk-0   mounted               no                        -
nvme/subvol-117-disk-0   mountpoint            /nvme/subvol-117-disk-0   default
nvme/subvol-117-disk-0   canmount              on                        default
nvme/subvol-224-disk-0   mounted               no                        -
nvme/subvol-224-disk-0   mountpoint            /nvme/subvol-224-disk-0   default
nvme/subvol-224-disk-0   canmount              on                        default
nvme/subvol-227-disk-0   mounted               yes                       -
nvme/subvol-227-disk-0   mountpoint            /nvme/subvol-227-disk-0   default
nvme/subvol-227-disk-0   canmount              on                        default
nvme/subvol-228-disk-0   mounted               no                        -
nvme/subvol-228-disk-0   mountpoint            /nvme/subvol-228-disk-0   default
nvme/subvol-228-disk-0   canmount              on                        default
x10TB                    mounted               no                        -
x10TB                    mountpoint            /x10TB                    default
x10TB                    canmount              on                        default
x10TB/subvol-101-disk-1  mounted               yes                       -
x10TB/subvol-101-disk-1  mountpoint            /x10TB/subvol-101-disk-1  default
x10TB/subvol-101-disk-1  canmount              on                        default
x10TB/subvol-102-disk-1  mounted               no                        -
x10TB/subvol-102-disk-1  mountpoint            /x10TB/subvol-102-disk-1  default
x10TB/subvol-102-disk-1  canmount              on                        default
x10TB/subvol-108-disk-0  mounted               yes                       -
x10TB/subvol-108-disk-0  mountpoint            /x10TB/subvol-108-disk-0  default
x10TB/subvol-108-disk-0  canmount              on                        default
x10TB/subvol-110-disk-0  mounted               yes                       -
x10TB/subvol-110-disk-0  mountpoint            /x10TB/subvol-110-disk-0  default
x10TB/subvol-110-disk-0  canmount              on                        default
x10TB/subvol-119-disk-0  mounted               no                        -
x10TB/subvol-119-disk-0  mountpoint            /x10TB/subvol-119-disk-0  default
x10TB/subvol-119-disk-0  canmount              on                        default
x10TB/subvol-225-disk-0  mounted               yes                       -
x10TB/subvol-225-disk-0  mountpoint            /x10TB/subvol-225-disk-0  default
x10TB/subvol-225-disk-0  canmount              on                        default
x10TB/subvol-226-disk-0  mounted               yes                       -
x10TB/subvol-226-disk-0  mountpoint            /x10TB/subvol-226-disk-0  default
x10TB/subvol-226-disk-0  canmount              on                        default

Notice some are mounted yes, and others are mounted noWhat should I do to get them to all mount on their own?
 

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!