Some LXC containers have issues with keeping IP addresses

May 21, 2025
31
4
8
Estonia
Hello

TL;DR: A few LXC containers are losing static IP addresses at some random time for unknown reasons.

At first I was using the Microslop's DHCP server with reservations and noticed that some containers would lose IP addresses at some point. At that time I thought maybe the containers are having issues replying to the DHCP server when it asks if the server is still using the IP address, so I set all the IPs static in Proxmox VE container Network.
1778966609112.png
But now it turns out, the issue wasn't the DHCP server, the IP has been set to static, but it still loses the IP address, wth??

I have 7 LXC containers, and only three have that issue at the moment.

Since I have no idea what's going on, I'm not going to add any logs.

---
Environment:
VE 8.4.18

Problematic containers:
Uptime kuma installed using the helper script
https://community-scripts.org/scripts/uptimekuma

Checkmk installed using the helper script
https://community-scripts.org/scripts/checkmk

Ansible installed using the turnkey solution
https://www.turnkeylinux.org/ansible

I'm not sure if this is important in any way.

/etc/network/interfaces looks like this:
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.0.11/26
        gateway 192.168.0.1
hostname containerhostname

Is it because I have set the IP static in Proxmox AND in the container? I have configured the other containers the same way.
 
Last edited:
Proxmox will automatically configure /etc/network/interfaces inside the container based on what you configure for the LXC in the GUI or in the LXC config file. If you then set it to something else inside the LXC this will be overridden by Proxmox when you (re)start the LXC.

You can prevent Proxmox doing the network config by setting the ostype for the container to unmanaged or touch /etc/network/.pve-ignore.interfaces inside the LXC.
 
Last edited:
  • Like
Reactions: _gabriel