Debian 11 container can't start after apt-get upgrade

maudam

Renowned Member
Oct 5, 2011
8
0
66
Hi,
i have a proxmox 6.1.3 and just made a new CT with debian 11 image from official repo:
http://download.proxmox.com/images/system/debian-11-standard_11.0-1_amd64.tar.gz

I can start the container, login in console, create users, login via ssh, reboot and do everything

But when i make apt-get update && apt-get upgrade, the CT won't start after reboot

With actual updates, debian version change from 11.0 to 11.1

I got error:
Code:
Job for pve-container@138.service failed because the control process exited with error code.
See "systemctl status pve-container@138.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@138' failed: exit code 1

start in debug mode:
Code:
lxc-start -n 138 -F -l DEBUG -o /tmp/lxc-138.log

Logfile:
Code:
lxc-start 138 20211109011147.526 INFO     lsm - lsm/lsm.c:lsm_init:50 - LSM security driver AppArmor
lxc-start 138 20211109011147.581 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "reject_force_umount  # comment this to allow umount -f;  not recommended"
lxc-start 138 20211109011147.592 INFO     seccomp - seccomp.c:do_resolve_add_rule:535 - Set seccomp rule to reject force umounts
lxc-start 138 20211109011147.595 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for reject_force_umount action 0(kill)
lxc-start 138 20211109011147.606 INFO     seccomp - seccomp.c:do_resolve_add_rule:535 - Set seccomp rule to reject force umounts
lxc-start 138 20211109011147.608 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for reject_force_umount action 0(kill)
lxc-start 138 20211109011147.615 INFO     seccomp - seccomp.c:do_resolve_add_rule:535 - Set seccomp rule to reject force umounts
lxc-start 138 20211109011147.618 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for reject_force_umount action 0(kill)
lxc-start 138 20211109011147.620 INFO     seccomp - seccomp.c:do_resolve_add_rule:535 - Set seccomp rule to reject force umounts
lxc-start 138 20211109011147.622 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for reject_force_umount action 0(kill)
lxc-start 138 20211109011147.625 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "[all]"
lxc-start 138 20211109011147.627 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "kexec_load errno 1"
lxc-start 138 20211109011147.633 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for kexec_load action 327681(errno)
lxc-start 138 20211109011147.642 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for kexec_load action 327681(errno)
lxc-start 138 20211109011147.650 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for kexec_load action 327681(errno)
lxc-start 138 20211109011147.653 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for kexec_load action 327681(errno)
lxc-start 138 20211109011147.656 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "open_by_handle_at errno 1"
lxc-start 138 20211109011147.660 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for open_by_handle_at action 327681(errno)
lxc-start 138 20211109011147.669 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for open_by_handle_at action 327681(errno)
lxc-start 138 20211109011147.678 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for open_by_handle_at action 327681(errno)
lxc-start 138 20211109011147.681 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for open_by_handle_at action 327681(errno)
lxc-start 138 20211109011147.684 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "init_module errno 1"
lxc-start 138 20211109011147.688 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for init_module action 327681(errno)
lxc-start 138 20211109011147.699 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for init_module action 327681(errno)
lxc-start 138 20211109011147.707 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for init_module action 327681(errno)
lxc-start 138 20211109011147.710 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for init_module action 327681(errno)
lxc-start 138 20211109011147.713 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "finit_module errno 1"
lxc-start 138 20211109011147.716 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for finit_module action 327681(errno)
lxc-start 138 20211109011147.726 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for finit_module action 327681(errno)
lxc-start 138 20211109011147.739 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for finit_module action 327681(errno)
lxc-start 138 20211109011147.743 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for finit_module action 327681(errno)
lxc-start 138 20211109011147.745 INFO     seccomp - seccomp.c:parse_config_v2:789 - Processing "delete_module errno 1"
lxc-start 138 20211109011147.749 INFO     seccomp - seccomp.c:parse_config_v2:975 - Added native rule for arch 0 for delete_module action 327681(errno)
lxc-start 138 20211109011147.759 INFO     seccomp - seccomp.c:parse_config_v2:984 - Added compat rule for arch 1073741827 for delete_module action 327681(errno)
lxc-start 138 20211109011147.767 INFO     seccomp - seccomp.c:parse_config_v2:994 - Added compat rule for arch 1073741886 for delete_module action 327681(errno)
lxc-start 138 20211109011147.770 INFO     seccomp - seccomp.c:parse_config_v2:1004 - Added native rule for arch -1073741762 for delete_module action 327681(errno)
lxc-start 138 20211109011147.774 INFO     seccomp - seccomp.c:parse_config_v2:1008 - Merging compat seccomp contexts into main context
lxc-start 138 20211109011147.818 INFO     conf - conf.c:run_script_argv:372 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "138", config section "lxc"
lxc-start 138 20211109011147.443 DEBUG    conf - conf.c:run_buffer:340 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 138 lxc pre-start produced output: unable to detect OS distribution

lxc-start 138 20211109011147.451 ERROR    conf - conf.c:run_buffer:352 - Script exited with status 2
lxc-start 138 20211109011147.451 ERROR    start - start.c:lxc_init:897 - Failed to run lxc.hook.pre-start for container "138"
lxc-start 138 20211109011147.452 ERROR    start - start.c:__lxc_start:2032 - Failed to initialize container "138"


On the end of logfile i got:
Code:
lxc-start 138 20211109011147.443 DEBUG    conf - conf.c:run_buffer:340 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 138 lxc pre-start produced output: unable to detect OS distribution

Tried to mount the virtual disk on host and i can browse the fs.

Code:
root@proxmox6:~# pct mount 138
mounted CT 138 in '/var/lib/lxc/138/rootfs'

/etc/debian_version
11.1

/etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
 
hi,
/etc/debian_version
11.1
should be still supported (we check if it's less than 12), but your packages are pretty old (PVE 6.1.3) so likely it's not supported with that version.

if for some reason you're unwilling to upgrade to PVE 7, you can still get the latest upgrades for 6.x (this was backported there).

just try apt update && apt dist-upgrade followed by a reboot. if you're unable to reboot then you can also try installing the latest version for pve-container to temporarily fix your issue.
 
hi,

should be still supported (we check if it's less than 12), but your packages are pretty old (PVE 6.1.3) so likely it's not supported with that version.

if for some reason you're unwilling to upgrade to PVE 7, you can still get the latest upgrades for 6.x (this was backported there).

just try apt update && apt dist-upgrade followed by a reboot. if you're unable to reboot then you can also try installing the latest version for pve-container to temporarily fix your issue.

I can confirm the same issues as OP - apt upgrade inside an LXC would break it. Running apt install pve-container resolved it. I plan to roll up to PVE 7 some time soon anyway.
 

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!