Dynamic IP changing regularly


I have a combination of proxmox and nethserver.

My problem is that the vms are changing their IPs too regularly (less than 5 minutes). I have tried to increase the lease time in the DHCP of nethserver, but it doesn’t change anything.
How should I increase the time that a VM has a certain IP, without having to create IP reservations?

I’ve encountered a similar problem (though not with Nethserver as my DHCP server) when I was using VMs cloned from improperly-made templates in Proxmox. If you’re making (or using) a VM template, make sure /etc/machine-id is empty–addressing that resolved the problems I was seeing.

1 Like

That is probably my problem.
I’m just not understanding how that would make the VM change public IP every 2 to 5 minutes (sometimes to the same IP I think).

I don’t entirely understand myself, but I saw pretty similar behavior. If you clear out that file (with truncate --size 0 /etc/machine-id) and then reboot the affected VMs, I’d expect it should be fine.

1 Like