Ubuntu 24.04 LXC containers fail to boot after upgrade

fuomag9

New Member
Mar 17, 2023
10
1
3
As per title, Ubuntu 24.04 LXC containers fail to boot after upgrade.


Code:
run_buffer: 571 Script exited with status 255
lxc_init: 845 Failed to run lxc.hook.pre-start for container "106"
__lxc_start: 2034 Failed to initialize container "106"
TASK ERROR: startup for container '106' failed


running with more verbose:

Code:
lxc-start -n 106 -F -l DEBUG -o /tmp/lxc-CT106.log


Code:
lxc-start 106 20240425195218.330 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 106 20240425195218.330 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0
 hostid 100000 range 65536
lxc-start 106 20240425195218.331 INFO     lsm - ../src/lxc/lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver AppArmor
lxc-start 106 20240425195218.331 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "106", config section "lxc"
lxc-start 106 20240425195218.849 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 106 lxc pre-start produced output: unsupported Ubuntu version '24.04'

lxc-start 106 20240425195218.859 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 255
lxc-start 106 20240425195218.859 ERROR    start - ../src/lxc/start.c:lxc_init:845 - Failed to run lxc.hook.pre-start for container "106"
lxc-start 106 20240425195218.859 ERROR    start - ../src/lxc/start.c:__lxc_start:2034 - Failed to initialize container "106"
lxc-start 106 20240425195218.859 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "106", config section "lxc"
lxc-start 106 20240425195219.227 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 106 lxc post-stop produced output: umount: /var/lib/lxc/.pve-staged-mounts/mp1: not mounted.

lxc-start 106 20240425195219.227 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 106 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp1' failed: exit code 32

lxc-start 106 20240425195219.230 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 106 lxc post-stop produced output: umount: /var/lib/lxc/.pve-staged-mounts/mp2: not mounted.

lxc-start 106 20240425195219.230 DEBUG    utils - ../src/lxc/utils.c:run_buffer:560 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 106 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp2' failed: exit code 32

lxc-start 106 20240425195219.259 INFO     utils - ../src/lxc/utils.c:run_script_argv:587 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "106", config section "lxc"
lxc-start 106 20240425195219.761 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:lxc_start_main:307 - The container failed to start
lxc-start 106 20240425195219.761 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:lxc_start_main:312 - Additional information can be obtained by setting the --logfile and --logpriority options


Config:


Code:
arch: amd64
cores: 1
features: nesting=1
hostname: testing
memory: 1024
mp0: disco:vm-106-disk-0,mp=/mountedstuff,size=100G
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=CENSOR,ip=dhcp,ip6=auto,tag=CENSOR,type=veth
onboot: 1
ostype: ubuntu
rootfs: nvme-raidz:subvol-106-disk-0,size=4G
swap: 0
unprivileged: 1


I'm using Linux 6.8.4-2-pve on proxmox 8.2.2
 
Last edited:
Ok good find! Where did you get the 24.04 lxc template? Or did you do a 23.10 -> 24.04 dist upgrade?
I did an upgrade from the 20.04 official Ubuntu LXC provided by proxmox to the 22.04 via
Code:
do-release-upgrade -d
 
  • Like
Reactions: sava1e
It seems to be possible to do it ourselves:
https://wiki.chucknemeth.com/proxmox/lxc/lxc-template

There is one already, but no clue how to deploy this:
https://images.linuxcontainers.org/images/ubuntu/noble/
Thats helpfull, but i have no clue how to add them, i think that the proxmox team modifies them anyway a little and they are usually in zstd format not xz (i mean the official Proxmox Templates)

However, i think an 24.04 image is atm in the least Priority, since the Forums are exploding after the 8.2 release with the Kernel Switch :)
Maybe we simply need to wait a week, once everything has calmed down a little.

Cheers
 
  • Like
Reactions: fuomag9 and sava1e
Code:
WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "vm-212-disk-0" created.
  WARNING: Sum of all thin volume sizes (<3.04 TiB) exceeds the size of thin pool pve/data and the size of whole volume group (<1.82 TiB).
Creating filesystem with 8388608 4k blocks and 2097152 inodes
Filesystem UUID: 97e2da20-bd2e-43eb-8f11-1a9eb8619c8f
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624
extracting archive '/var/lib/vz/template/cache/rootfs.tar.xz'
Total bytes read: 531752960 (508MiB, 93MiB/s)
  Logical volume "vm-212-disk-0" successfully removed.
TASK ERROR: unable to create CT 212 - unsupported Ubuntu version '24.04'

Doesn't seem to work...
 
@akidarsa, you still have to wait until Proxmox team will add support for 24.04, or use
Code:
ostype: unmanaged

Example:
Bash:
#!/bin/sh

# Creating LXC Container
pct create 110 /var/lib/vz/template/cache/Ubuntu-24.04-LTS_Noble_Numbat.tar.xz \
--arch amd64 \
--hostname LXC-Ubuntu-24-04 \
--rootfs local-lvm:20 \
--memory 8192 \
--swap 4096 \
--cores 6 \
--ostype unmanaged \
--unprivileged 1 \
--ssh-public-keys /root/.ssh/SSH.pub \
--net0 name=eth0,bridge=vmbr0,ip=dhcp,ip6=auto,type=veth \
--features nesting=1
 
Last edited:
Last edited:
Found one thing that doesn't seem to work yet: I can't set a static ip. It will ignore it...
 
@akidarsa

@Ramalama @fuomag9

nano /usr/share/perl5/PVE/LXC/Setup/Ubuntu.pm
my $known_versions = {
'24.04' => 1, # noble
I made this change as described.Additionally I did this in the same file

if ($version >= '24.04') {$self->setup_systemd_preset({ 'systemd-networkd.service' => 1 });
}

This is what I wrote about

if ($version >= '23.04') {$self->setup_systemd_preset({ 'systemd-networkd.service' => 1 });
}

Then restarted the entire main server.

What can I say after restarting the server, Ubuntu 24.04 runs
wonderfully, the installertion starts and stops cleanly without errors.
Using username "root".
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.4-2-pve x86_64)

I created the images myself (Ubuntu 22.04 update to Ubuntu 24.04). Everything worked wonderfully.
 
@fiona, I appreciate your great work, but I find it a little strange that we have the official 24.04 template now and we can't create an LXC container after downloading it (TASK ERROR: Unable to create CT <ID> - unsupported Ubuntu version '24.04'). Don't you think? Perhaps it would be better to release an update with this fix before creating a new template?
I'm not trying to be disrespectful or anything, it's just a little confusing.
 
There is an update in the test repository for Ubuntu 24.04

Code:
pve-container (5.1.10) bookworm; urgency=medium

  * fix #5414: use proper percentages in `pct df`

  * setup: support Ubuntu 24.04 Noble

  * setup: unlink default netplan configuration even with Ubuntu >= 23.04
 
  • Like
Reactions: Ramalama

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!