[SOLVED] VM gets no IP via DHCP upon reboot, works when manually restarting network

maxim.webster

Active Member
Nov 12, 2024
221
101
43
Germany
Dear all,

I have several VMs running Debian 12 (bookworm) on Proxmox 8.3.2. They have been running fine for a while, including several reboots. But now (and after I rebooted the PVE nodes due to a kernel update), the network is not working as expected:

  • on reboot, network interface ens18 does not get any IP, offered by my DHCP service (using UniFi Network Controller), see screenshot #1
  • restarting network manually (running "systemctl restart networking") makes ens18 use an IP offered by the DHCP service is used, see second screenshot #2

Network configuration on VM:

Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
allow-hotplug enp0s18
iface enp0s18 inet dhcp
iface enp0s18 inet6 auto

Network configuration on PVE node:

Code:
auto lo
iface lo inet loopback
iface enp5s0 inet manual
auto vmbr0
iface vmbr0 inet static
        address 192.168.30.8/24
        gateway 192.168.30.1
        bridge-ports enp5s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
source /etc/network/interfaces.d/*

Screenshot 1 (after reboot)

1737368137907.png


Screenshot 2 (after manual network restart)

1737368403430.png

Any idea what could be the cause and if it is related to the VM's OS or Proxmox?

Regards

Maxim
 
Last edited:
  • Like
Reactions: maxim.webster
This:

may be a different NIC than your "ens18" from your screenshots...?

Looks like this is the cause, although I don't understand it: ens18 has an "altname" of enp0s18, also doing "systemctl restart networking" after reboot brings back networking without any configuration changes.

However: Replacing enp0s18 in /etc/network/interfaces by ens18 does the trick.

Thank you.
 
  • Like
Reactions: UdoB