Debian 13 LXC Template

How did you get it to work? When creating a container from a template from that site, I just get this:

Code:
Detected container architecture: amd64
unable to open file '/etc/network/interfaces.tmp.1621351' - No such file or directory
TASK ERROR: unable to create CT 103 - error in setup task PVE::LXC::Setup::post_create_hook
 
Last edited:
How did you get it to work? When creating a container from a template from that site, I just get this:

Code:
Detected container architecture: amd64
unable to open file '/etc/network/interfaces.tmp.1621351' - No such file or directory
TASK ERROR: unable to create CT 103 - error in setup task PVE::LXC::Setup::post_create_hook
Oh yeah, I had to create the container with no network settings and then configure them later.

https://github.com/pimox/pimox7/issues/160#issuecomment-1872547763
I followed this advice I found when looking up the error. First creating the container with no network options then installing ifupdown2, disabling systemd-networkd and enabling networking.
 
Last edited:
@ProxmoxAdmins: Do you have any indication of when you expect to make available the Debian 13 LXC now that it has been officially released?

I realise that you have many other priorities as well and I also know it only just happened, but it would be good to know from a planning perspective if it's going to be a week or a month down the line?

I would prefer to wait around for the official image rather than grabbing the image from LinuxContainers, unless there is an official guide of how we can use the LinuxContainers version and turn it into a Proxmox approved image because you still make some underlying changes and optimizations to ensure it works best with Proxmox itself?

Thanks for your hard work and the brilliant v9 release :)
 
@ProxmoxAdmins: Do you have any indication of when you expect to make available the Debian 13 LXC now that it has been officially released?

I realise that you have many other priorities as well and I also know it only just happened, but it would be good to know from a planning perspective if it's going to be a week or a month down the line?

I would prefer to wait around for the official image rather than grabbing the image from LinuxContainers, unless there is an official guide of how we can use the LinuxContainers version and turn it into a Proxmox approved image because you still make some underlying changes and optimizations to ensure it works best with Proxmox itself?

Thanks for your hard work and the brilliant v9 release :)

our Debian-based container images are created using our own tool called "dab". I think it's safe to assume it won't be a month before the Trixie template is released for public consumption :)
 
Hey folks,


Just wanted to share a quick fix for anyone trying to use Debian 13 LXC templates from images.linuxcontainers.org and running into this error when creating a container in Proxmox VE:

unable to open file '/etc/network/interfaces.tmp.XXXXXXX' - No such file or directory
TASK ERROR: unable to create CT XXX - error in setup task PVE::LXC::Setup::post_create_hook
Cause:
The template you're using is missing the file /etc/network/interfaces, which Proxmox expects to be present to inject the network config (especially if you assign a static IP in the UI).

Fix:
You just need to add a minimal network config inside the template image before using it.




Step-by-step fix:​


Extract the image :
Bash:
mkdir /tmp/fixed-template
cd /tmp/fixed-template
tar -xJf /path/to/debian-13-template.tar.xz
Add missing network config:
Bash:
mkdir -p etc/network
cat <<EOF > etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
EOF
Repack the image:
Bash:
tar -cJf /path/to/debian-13-fixed.tar.xz *
Place it in your template cache (e.g. /var/lib/vz/template/cache) and use it from the GUI or with pct create.

Now you can assign a dhcp or a static IP and gateway during container creation via the Proxmox interface, and it will work perfectly.
Hope this helps others — shoutout if you're hitting the same issue!
 
I was talking a peak at this because I was curious how much changed. Using the the official Debian cloud images as references you can compare the package lists at [0] and [1] and see that isc-dhcp-client was indeed dropped for dhcpcd-base, but both of these cloud images are using cloud-init and netplan.io for configuration. I happened to already have one of them running and spun up the 2nd to confirm both use systemd-networkd with netplan.io, and cloud-init is writing the netplan config. I then checked the Ubuntu 24.04 LXC image from Proxmox and its also using systemd-networkd but with directly a directly created /etc/systemd/network/eth0.network. Maybe its time to stop disabling systemd-networkd on the Debian LXC container provided by Proxmox and unify the configuration.

[0] https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.json
[1] https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.json
 
Last edited:
More information, systemd-resolved is installed but not in use because PVE is overwriting /etc/resolv.conf. This is also a problem on Ubuntu where /etc/network/interfaces has been replaced with /etc/systemd/network/eth0.network, but PVE isn't adding DNS= entries to the interface configuration. Disabling the writing of /etc/resolv.conf by creating a /etc/.pve-ignore.resolv.conf to replace it with resolved's stubresovler will break dns until you manually configure it, as resolved will have no other sources to learn about the PVE configured dns servers.

The best solution to update the network stack is going to be to move completely to systemd-networkd configuration files and stop writing to both /etc/network/interfaces and /etc/resolv.conf.
 
Say the official Trixie LXC template is released, should I create and configure new container with this template, or is it wiser to upgrade the containers in place?