Skip to content

Instantly share code, notes, and snippets.

@ammgws
Last active November 16, 2023 14:54
Show Gist options
  • Save ammgws/6c959cf60ba3fb3d6f91698efb7be3a9 to your computer and use it in GitHub Desktop.
Save ammgws/6c959cf60ba3fb3d6f91698efb7be3a9 to your computer and use it in GitHub Desktop.
Fix for Proxmox container failing to start after dist-upgrade
  • Upgraded from Ubuntu 16.04 LTS to 18.04 (pre-release) using dist-upgade
  • Upon restart CT would not start
  • Error displayed in Web GUI: command 'systemctl start pve-container@101' failed: exit code 1
  • SSHd in and manually ran CT with pct start 101:
>root@server:~# pct start 101
Job for pve-container@101.service failed because the control process exited with error code.
See "systemctl status pve-container@101.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@101' failed: exit code 1

>root@server:~# journalctl -xe
-- Subject: Unit pve-container@101.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit pve-container@101.service has begun starting up.
Jan 11 22:35:02 server kernel: EXT4-fs (dm-8): mounted filesystem with ordered data mode. Opts: (null)
Jan 11 22:35:02 server lxc-start[14122]: lxc-start: 101: lxccontainer.c: wait_on_daemonized_start: 751 No such file or directory - Failed to receive the container state
Jan 11 22:35:02 server lxc-start[14122]: lxc-start: 101: tools/lxc_start.c: main: 368 The container failed to start.
Jan 11 22:35:02 server lxc-start[14122]: lxc-start: 101: tools/lxc_start.c: main: 370 To get more details, run the container in foreground mode.
Jan 11 22:35:02 server lxc-start[14122]: lxc-start: 101: tools/lxc_start.c: main: 372 Additional information can be obtained by setting the --logfile and --logpriority options.
Jan 11 22:35:02 server systemd[1]: pve-container@101.service: Control process exited, code=exited status=1
Jan 11 22:35:02 server systemd[1]: Failed to start PVE LXC Container: 101.
-- Subject: Unit pve-container@101.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit pve-container@101.service has failed.
-- 
-- The result is failed.

How to Fix

Edit /usr/share/perl5/PVE/LXC/Setup/Ubuntu.pm and add 18.04 to list of known distros.

my $known_versions = {
    '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
};
@2803media
Copy link

great thanks!

Here is the update code for following versions:

my $known_versions = {
'23.10' => 1, # Mantic
'23.04' => 1, # Lunar
'22.04' => 1, # Jammy
'20.04' => 1, # focal LTS
'19.10' => 1, # eoan
'19.04' => 1, # disco
'18.10' => 1, # cosmic
'18.04' => 1, # bionic LTS
'17.10' => 1, # artful
'17.04' => 1, # zesty
'16.10' => 1, # yakkety
'16.04' => 1, # xenial LTS
'15.10' => 1, # wily
'15.04' => 1, # vivid
'14.04' => 1, # trusty LTS
'12.04' => 1, # precise LTS
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment