lxc-start fails! --> unsupported Ubuntu version '18.04'

Dutch2005

Active Member
Jun 10, 2017
10
2
43
39
Hello,

today I install an lxc Container with ubuntu 16.04 and do an dist-upgrade (after added the ubuntu 18.04 sources.list files), now I am not able to start the container anymore because I get the Error Message

Code:
root@michael-server:~# lxc-start -F -n 100  --logfile=lxc100.log --logpriority=debug
lxc-start: 100: conf.c: run_buffer: 438 Script exited with status 255.
lxc-start: 100: start.c: lxc_init: 651 Failed to run lxc.hook.pre-start for container "100".
lxc-start: 100: start.c: __lxc_start: 1444 Failed to initialize container "100".
lxc-start: 100: tools/lxc_start.c: main: 371 The container failed to start.
lxc-start: 100: tools/lxc_start.c: main: 375 Additional information can be obtained by setting the --logfile and --logpriority options.

Code:
      lxc-start 100 20180226180707.840 INFO     lxc_start_ui - tools/lxc_start.c:main:280 - using rcfile /var/lib/lxc/100/config
      lxc-start 100 20180226180707.841 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver AppArmor
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .reject_force_umount  # comment this to allow umount -f;  not recommended.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for reject_force_umount action 0(kill).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:276 - Setting Seccomp rule to reject force umounts.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for reject_force_umount action 0(kill).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:276 - Setting Seccomp rule to reject force umounts.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:276 - Setting Seccomp rule to reject force umounts.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .[all].
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .kexec_load errno 1.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for kexec_load action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for kexec_load action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .open_by_handle_at errno 1.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for open_by_handle_at action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for open_by_handle_at action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .init_module errno 1.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for init_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for init_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .finit_module errno 1.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for finit_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for finit_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:435 - processing: .delete_module errno 1.
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:610 - Adding native rule for delete_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:614 - Adding compat rule for delete_module action 327681(errno).
      lxc-start 100 20180226180707.841 INFO     lxc_seccomp - seccomp.c:parse_config_v2:624 - Merging in the compat Seccomp ctx into the main one.
      lxc-start 100 20180226180707.841 INFO     lxc_conf - conf.c:run_script_argv:457 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "100", config section "lxc".
      lxc-start 100 20180226180708.392 DEBUG    lxc_conf - conf.c:run_buffer:429 - Script /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start with output: unsupported Ubuntu version '18.04'
.
      lxc-start 100 20180226180708.400 ERROR    lxc_conf - conf.c:run_buffer:438 - Script exited with status 255.
      lxc-start 100 20180226180708.400 ERROR    lxc_start - start.c:lxc_init:651 - Failed to run lxc.hook.pre-start for container "100".
      lxc-start 100 20180226180708.400 ERROR    lxc_start - start.c:__lxc_start:1444 - Failed to initialize container "100".
      lxc-start 100 20180226180708.400 ERROR    lxc_start_ui - tools/lxc_start.c:main:371 - The container failed to start.
      lxc-start 100 20180226180708.401 ERROR    lxc_start_ui - tools/lxc_start.c:main:375 - Additional information can be obtained by setting the --logfile and --logpriority options.

e.g. the script would need "support" for the next LTS branch of ubuntu e.g. ubuntu 18.04

wiki ubuntu com/ BionicBeaver/ ReleaseSchedule

Its alpha2 at the moment and next month -- 19th/20th --> feature freeze & beta1

April 26th FinalRelease, Ubuntu Ubuntu 18.04

Can support be added in advance?

I found more information with same issue, just a newer version of Debian

Here: forum#proxmox#com/ threads/ lxc-start-fails-unsupported-debian-version-9-1.35860/
 
I fixed it myself btw doing the following

/usr/share/perl5/PVE/LXC/Setup/

Edit the Ubuntu.pm

change:
Code:
my $known_versions = {
  
    '17.10' => 1, # artful
    '17.04' => 1, # zesty
    '16.10' => 1, # yakkety
    '16.04' => 1, # xenial
    '15.10' => 1, # wily
    '15.04' => 1, # vivid
    '14.04' => 1, # trusty LTS
    '12.04' => 1, # precise LTS
};

To this:

Code:
my $known_versions = {
    '18.04' => 1, # Bionic Beaver LTS
    '17.10' => 1, # artful
    '17.04' => 1, # zesty
    '16.10' => 1, # yakkety
    '16.04' => 1, # xenial
    '15.10' => 1, # wily
    '15.04' => 1, # vivid
    '14.04' => 1, # trusty LTS
    '12.04' => 1, # precise LTS
};

E.g. at the top of the line i added:

'18.04' => 1, # Bionic Beaver LTS
 
Why isn't centos 5.8 supported? I had to edit this code or the CentOS in /usr/share/perl5/PVE/LXC/Setup/CentOS.pm.

Changed the 6 to a 5, seems to run ok:

Code:
    if ($release =~ m/release\s+(\d+\.\d+)(\.\d+)?/) {
        if ($1 >= 5 && $1 < 8) {
            $version = $1;
        }
 
Is there a reason versions have to be added to this manually? I am on PVE 6.1 and Ubuntu 20.04 isn't added yet, so upgrading my container broke without me realizing this would happen. I am upgrading my host anyways since I had planned to, but this was very surprising.
 
Is there a reason versions have to be added to this manually?

yes, sometimes it happens that on a version upgrade, some mechanism change, e.g. for setting up networking (e.g. /etc/network/interfaces -> systemd-networkd)
in such cases, we have to add the code to handle that first, and then enable the versions
 
Maybe a big warning can be added to the wiki pages for containers that say not to upgrade them without confirming the new version is supported then, so people don't get stuck in the situation I was in :) I was expecting container support to be more generic and didn't think twice about upgrading my Ubuntu 19.10 container to 20.04.
 
  • Like
Reactions: Helmut101
Happened to me when trying to upgrade from Ubuntu 21.04 to 21.10.

Code:
lxc-start 108 20220104081607.586 DEBUG 
conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook
108 lxc pre-start produced output: unsupported Ubuntu version '21.10'

Use this quick check to verify before dist upgrading:
Code:
cat /usr/share/perl5/PVE/LXC/Setup/Ubuntu.pm | grep -A 10 'my $known_versions'
cat /usr/share/perl5/PVE/LXC/Setup/Debian.pm | grep -A 10 'my $version_map'
 
Last edited:
Ubuntu 21.04 to 21.10.
21.10 is supported since pve-container 4.1-1 (but beware that since ubuntu 21.10 is EOL we don't have an official template for that anymore) so upgrading your packages should fix that
 
Thank you! I am still on Proxmox 6.4-13, so that is perhaps why I am not able to use Ubuntu 21.10.

Code:
pveversion
> pve-manager/6.4-13/9f411e79 (running kernel: 5.4.151-1-pve)
 
Last edited:
  • Like
Reactions: Helmut101

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!