I identified that systems I spawn as q35 right away work.
Only those where the initial cloud init runs as i440fx and then I change them to q35 are affected.
I compared configurations and eventually had even my converted instance running, to the point that it was hard to tell why.
I found that the root cause is this difference in config:
BAD:
network:
version: 2
ethernets:
enp3:
dhcp4: true
match: macaddress: 52:54:00:ba:23:d6 set-name: enp3
Cloud init generating them right the first time makes it work.
If we go in with the old names it fails, while according to the man page it should not.
So is it an issue in netplan or more in networkd I'm not sure - leaving it to the owners of the packages.
I identified that systems I spawn as q35 right away work.
Only those where the initial cloud init runs as i440fx and then I change them to q35 are affected.
I compared configurations and eventually had even my converted instance running, to the point that it was hard to tell why.
I found that the root cause is this difference in config:
macaddress: 52:54:00:ba:23:d6
set- name: enp3
BAD:
network:
version: 2
ethernets:
enp3:
dhcp4: true
match:
GOOD:
macaddress: 52:54:00:ba:23:d6
set- name: enp1s0
network:
version: 2
ethernets:
enp1s0:
dhcp4: true
match:
Now yes, the device is enp1s0 at the moment:
$ dmesg | grep enp
[ 0.898280] virtio_net virtio0 enp1s0: renamed from eth0
But according to the netplan spec this should not matter right?
It has a match so the upper name is just an id.
And set-name can be whatever we want.
Bad case networkd files: network/ 10-netplan- enp3.* network/ 10-netplan- enp3.link <== 52:54:00: ba:23:d6
$ tail /run/systemd/
==> /run/systemd/
[Match]
MACAddress=
[Link]
Name=enp3
WakeOnLan=off
==> /run/systemd/ network/ 10-netplan- enp3.network <== 52:54:00: ba:23:d6
[Match]
MACAddress=
Name=enp3
[Network]
DHCP=ipv4
[DHCP]
UseMTU=true
RouteMetric=100
Good case networkd files: network/ 10-netplan- enp1s0. * network/ 10-netplan- enp1s0. link <== 52:54:00: ba:23:d6
$ tail /run/systemd/
==> /run/systemd/
[Match]
MACAddress=
[Link]
Name=enp1s0
WakeOnLan=off
==> /run/systemd/ network/ 10-netplan- enp1s0. network <== 52:54:00: ba:23:d6
[Match]
MACAddress=
Name=enp1s0
[Network]
DHCP=ipv4
[DHCP]
UseMTU=true
RouteMetric=100
Cloud init generating them right the first time makes it work.
If we go in with the old names it fails, while according to the man page it should not.
So is it an issue in netplan or more in networkd I'm not sure - leaving it to the owners of the packages.