Skip to content

Instantly share code, notes, and snippets.

@ammgws
Last active October 23, 2024 00:17
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 [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@101' failed: exit code 1

>root@server:~# journalctl -xe
-- Subject: Unit [email protected] has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit [email protected] 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]: [email protected]: Control process exited, code=exited status=1
Jan 11 22:35:02 server systemd[1]: Failed to start PVE LXC Container: 101.
-- Subject: Unit [email protected] has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit [email protected] 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
};
@BinaryPaean
Copy link

ok thanks but i seem not to have upgraded my version of ubuntu how do i check version of ubuntu am using on Proxmox to confirm am on the right path

This issue (and thus fix) is presuming you ran an update such as "do-release-upgrade" within one of your LXC containers, not about upgrades to the Proxmox server itself. Aside from loading that container image in a different environment, it won't launch.

@ArrayIterator
Copy link

wtf !!! You save my time !!
thanks I was never think about declaration on pve setup!

@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