Container won’t start after upgrading to Debian 13

Quick note to myself (and anyone else who hits this). I upgraded one of my LXC containers — the one that hosts my websites — from Debian 12 to Debian 13 (Trixie). After the upgrade, the container refused to start, with a fairly unhelpful error from pct:

[root@genii /root]# pct start 1060
run_buffer: 571 Script exited with status 25
lxc_init: 845 Failed to run lxc.hook.pre-start for container "1060"
__lxc_start: 2034 Failed to initialize container "1060"
startup for container '1060' failed

Status 25 from lxc.hook.pre-start is generic — it just means the pre-start hook failed somewhere. The container’s own logs won’t help because it never got that far.

To see what’s actually going on, run it in foreground mode:

lxc-start -n 1060 -F -l DEBUG -o /tmp/lxc-1060.log

Then check the log:

cat /tmp/lxc-1060.log | grep -i -E 'error|fail|denied'

In my case, the real error was:

unsupported debian version '13.4'

That’s coming from Proxmox’s pre-start setup script. Proxmox does some distro-aware configuration when starting a container (writing /etc/hostname, setting up the network interfaces the way that distro expects, etc.) and to do that it needs to recognise the OS version. The list of supported versions lives in /usr/share/perl5/PVE/LXC/Setup/Debian.pm. If your Proxmox host’s pve-container package predates the Debian release you’re trying to run, it’ll refuse to start the container.

The key thing here is that my Proxmox host is still on Debian 12 (Bookworm) underneath — Proxmox 8.x is built on Debian 12. The pve-container package on a Debian 12-based host doesn’t necessarily know about Debian 13 yet, especially if you haven’t run host updates recently. If your Proxmox host is already on Debian 13 (i.e. Proxmox 9.x), you probably won’t hit this.

So this bit me because my host packages were a bit behind, not because of anything I did wrong inside the container.

The fix

Update Proxmox on the host ONLY IF YOU WANT TO DO THAT RIGHT NOW:

apt update
apt dist-upgrade

Then try starting the container again. In most cases this is all you need — pve-container will have been updated to recognise the newer Debian version.

If for some reason you can’t do a full host upgrade right now (maybe you’re being cautious about Ceph or other cluster components, like I was), you can also patch the version check manually as a stopgap. Back up the file first:

cp /usr/share/perl5/PVE/LXC/Setup/Debian.pm /root/Debian.pm.bak

Then look for the line that does the version check (it’s near the top of the file) and bump the upper bound. Note that an apt upgrade will overwrite this edit later — which is fine and actually what you want.

The gotcha (and the lesson)

This caught me out because my mental model of LXC containers was wrong. With VMs, the host just provides CPU and disk — the guest OS is essentially self-contained. With LXC it’s more intimate: the host kernel runs the container’s processes directly, and Proxmox does distro-aware setup on each start. That distro-aware bit is what trips on unknown versions.

Lesson learned: before upgrading a container’s OS to a brand-new major release, make sure the Proxmox host is fully updated first — or at least that pve-container is current. Doesn’t need to be a full Proxmox major version upgrade, just apt update && apt dist-upgrade on the host.

In the meantime, if you need the container back online right now and don’t want to touch the host, you can roll back the container from a Proxmox Backup Server snapshot or a pct snapshot if you have one:

pct listsnapshot <CTID>
pvesm list <backup-storage> | grep <CTID>

That’s what I did to get my web gateway container back up while I figured out what was going on.