Skip to content

Instantly share code, notes, and snippets.

@ammgws
Last active October 23, 2024 00:17
Show Gist options
  • Select an option

  • Save ammgws/6c959cf60ba3fb3d6f91698efb7be3a9 to your computer and use it in GitHub Desktop.

Select an option

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
};
@ConD3

ConD3 commented Nov 28, 2018

Copy link
Copy Markdown

bro, i did that and work but then after shutting down the VM and start again appears the same error...
TASK ERROR: command 'lxc-start -n 108' failed: exit code 1

@psantini13

Copy link
Copy Markdown

Thank you so much

@meroupatate

meroupatate commented Feb 28, 2020

Copy link
Copy Markdown

Thanks for the tip it helped me a lot!

Had the same issue with Debian containers not starting:

Edited /usr/share/perl5/PVE/LXC/Setup/Debian.pm and added version 11 to the list:

$version = 9.1 if $version eq 'stretch/sid';
$version = 10 if $version eq 'buster/sid';
$version = 11 if $version eq 'bullseye/sid';

Then changed the line

if !($version >= 4 && $version <= 10);

to match

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

and then it was fixed!

@stryker2k2

Copy link
Copy Markdown

You Rock!

@ea3hsp

ea3hsp commented Oct 16, 2021

Copy link
Copy Markdown

You save my live bro thank you.

@assel

assel commented Nov 4, 2021

Copy link
Copy Markdown

Thank you! That helped me a lot today!

@shugyo

shugyo commented Nov 29, 2021

Copy link
Copy Markdown

Thanks, you saved my day.

@georgehndz

Copy link
Copy Markdown

Thanks, save my job :)

@BinaryPaean

Copy link
Copy Markdown

This gotcha is still alive and well with upgrades to Ubuntu impish. Your answer just helped me today, too.

@hbojo

hbojo commented Jun 23, 2022

Copy link
Copy Markdown

my proxmox containers giving the same error to start up "Job for pve-container@115.service failed because the control process exited with error code.
See "systemctl status pve-container@115.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@115' failed: exit code 1

hoe do i resolve...save a soul urgently.
checked usr/share/perl5/ubuntu.pm have this
my $known_versions = {
'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

@BinaryPaean

Copy link
Copy Markdown

my proxmox containers giving the same error to start up "Job for pve-container@115.service failed because the control process exited with error code. See "systemctl status pve-container@115.service" and "journalctl -xe" for details. TASK ERROR: command 'systemctl start pve-container@115' failed: exit code 1

hoe do i resolve...save a soul urgently. checked usr/share/perl5/ubuntu.pm have this my $known_versions = { '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

You need to add not just '18.10' but whatever more recent version(s) of Ubuntu you have upgraded your container to use. For example, adding # Focal '20.04' => 1, or # Jammy LTS '22.04 => 1.

In a more serious production scenario, you would also be best served with support from Proxmox which would a) update this list with system updates, and b) have verified compatibility for the versions that are being asserted in the list.

@hbojo

hbojo commented Jun 24, 2022

Copy link
Copy Markdown

my proxmox containers giving the same error to start up "Job for pve-container@115.service failed because the control process exited with error code. See "systemctl status pve-container@115.service" and "journalctl -xe" for details. TASK ERROR: command 'systemctl start pve-container@115' failed: exit code 1
hoe do i resolve...save a soul urgently. checked usr/share/perl5/ubuntu.pm have this my $known_versions = { '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

You need to add not just '18.10' but whatever more recent version(s) of Ubuntu you have upgraded your container to use. For example, adding # Focal '20.04' => 1, or # Jammy LTS '22.04 => 1.

In a more serious production scenario, you would also be best served with support from Proxmox which would a) update this list with system updates, and b) have verified compatibility for the versions that are being asserted in the list.

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

@BinaryPaean

Copy link
Copy Markdown

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
Copy Markdown

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

@2803media

Copy link
Copy Markdown

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