Ubuntu LXC container not starting after upgrade


I am using Proxmox to run a larger number of virtual machines and LXC containers. Recently, after a

apt update && apt upgrade && apt dist-upgrade

followed by a

do-release-upgrade

and a reboot to bring a Ubuntu container up to date, the container failed to start. The Proxmox web frontend was not very verbose as to what the cause may be, so I tried to start the container in a shell:

root@pve:~# pct start 102
Job for pve-container@102.service failed because the control process exited with error code.
See "systemctl status pve-container@102.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@102' failed: exit code 1

Replace 102 with the numerical ID of your container. However, still not many details, so I tried

root@pve:~# journalctl -xe

Oct 30 23:07:24 pve pct[5826]: command 'systemctl start pve-container@102' failed: exit code 1
Oct 30 23:07:24 pve kernel: lxc-start[5837]: segfault at 50 ip 00007fbeae15ff8b sp 00007fff6097a470 error 4 in liblxc.so.1.6.0[7fbeae106000+8a000]

After some research, I stumbled across a file containing logic related to Ubuntu versions. /usr/share/perl5/PVE/LXC/Setup/Ubuntu.pm e.g. contains a section like this:

my $known_versions = {
'19.10' => 1, # eoan
'19.04' => 1, # disco
'18.10' => 1, # cosmic
'18.04' => 1, # bionic
'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
};

It did not contain the Ubuntu version I upgraded to container to. So I edited it to look like this:

my $known_versions = {
'22.04' => 1, # jammy
'20.04' => 1, # focal
'19.10' => 1, # eoan
'19.04' => 1, # disco
'18.10' => 1, # cosmic
'18.04' => 1, # bionic
'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
};

After that, the container was able to boot as expected.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert