Proxmox Container with Debian 10 does not work after upgrade

September 8, 2019

I just did an apt update / upgrade of a Debian 10 container and restarted it afterwards and got following:

# pct start 105
Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xe" for details.
command 'systemctl start pve-container@105' failed: exit code 1

with a more verbose startup I got following

# lxc-start -n 105 -F -l DEBUG -o /tmp/lxc-ID.log
lxc-start: 105: conf.c: run_buffer: 335 Script exited with status 25
lxc-start: 105: start.c: lxc_init: 861 Failed to run lxc.hook.pre-start for container "105"
lxc-start: 105: start.c: __lxc_start: 1944 Failed to initialize container "105"
lxc-start: 105: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: 105: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options

and a look into /tmp/lxc-ID.log shows the problem:

lxc-start 105 20190908130857.595 DEBUG conf - conf.c:run_buffer:326 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 105 lxc pre-start with output: unsupported debian version '10.1'
lxc-start 105 20190908130857.604 ERROR conf - conf.c:run_buffer:335 - Script exited with status 25
lxc-start 105 20190908130857.604 ERROR start - start.c:lxc_init:861 - Failed to run lxc.hook.pre-start for container "105"

The problem was that the Debian version, which changed from 10.0 to 10.1, was not recognized by the Proxmox script. The responsible code is in /usr/share/perl5/PVE/LXC/Setup/Debian.pm, but in this case I didn’t need to change anything as I just needed to update the Proxmox host to the newest minor version and it worked again, as the code in Debian.pm got changed by the developers. I just though to share this, as maybe others run into that problem, as the error reporting is not that good in that case. 🙂

5 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Thank you, this save my day.
    — /usr/share/perl5/PVE/LXC/Setup/Debian.pm.orig 2019-09-12 08:49:19.601256996 +0200
    +++ /usr/share/perl5/PVE/LXC/Setup/Debian.pm 2019-09-12 08:49:36.193338308 +0200
    @@ -29,7 +29,7 @@
    $version = $1;

    die “unsupported debian version ‘$version’\n”
    – if !($version >= 4 && $version = 4 && $version $conf, rootdir => $rootdir, version => $version };

    Comment by Frank Neuber — September 12, 2019 #

  2. – if !($version >= 4 && $version = 4 && $version <= 11);

    Comment by Frank Neuber — September 12, 2019 #

  3. there is a problem to post a diff.
    you need to change the the debian verstion to 11 in line 32

    Comment by Frank Neuber — September 12, 2019 #

  4. thx, I know the “apt update” changed the file as you describe.

    Comment by robert — September 16, 2019 #

  5. Hi Robert! Excellent article! Thank you. It saved my day/night BR Uwe

    Comment by Uwe Degenhardt — March 16, 2022 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 36 queries. 0.061 seconds.