[SOLVED] network alias no longer created on boot after moving gentoo bare metal to proxmox vm

shadowcaster

New Member
Jul 2, 2025
2
0
1
Hi, I moved a bare metal gentoo machine having one nic to proxmox vm because the bare metal machine was dying.

On this machine the nic had one ip from dhcp and a 2nd one as an alias "xxxx:0" manually assigned. The config file for /etc/conf.d/net looks like this (gentoo uses openrc not systemd hence there's nothing like /etc/network/înterfaces):

Code:
config_ens18="dhcp
192.168.1.100/24 label ens18:0"

routes_ens18="default via 192.168.1.3"
dns_servers_ens18="192.168.1.100 192.168.1.36"
dns_search_ens18="lan"

This used to create the following network interfaces:
Code:
ens18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.213  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a04:ee41:2:41e3:be24:11ff:feb8:66d5  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::be24:11ff:feb8:66d5  prefixlen 64  scopeid 0x20<link>
        ether bc:24:11:b8:66:d5  txqueuelen 1000  (Ethernet)
        RX packets 145655  bytes 16729996 (15.9 MiB)
        RX errors 0  dropped 31  overruns 0  frame 0
        TX packets 2533  bytes 232738 (227.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens18:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        ether bc:24:11:b8:66:d5  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 40  bytes 3358 (3.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 40  bytes 3358 (3.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Since I moved to machine to proxmox the alias ens18:0 is not created any longer at boot time. I can create it by doing ifconfig ens18:0 192.168.1.100 netmask 255.255.255.0 up once machine is booted which proves everything is there to make it work but that's not the point. The machine is starting services that are dependent on the 192.168.1.100 ip as they want to open a socket on the ip and fail to start.

I tried virtually all NICs that proxmox is offering but with none of them I got the alias to work. I don't know what is the problem is here and if it can be solved by setting something in the proxmox settings or if I need some udev rules or whatever that makes the alias work again when it's brought up by netifrc.
 
Last edited:
turns I forgot to add the updated network card name to the startup scripts so network manager didn't run and process the file at all. It seems that the DHCP client did setup the "normal" IP but no other settings were applied from the net config file like routes, aliases, dns server, gateways etc.