cloud-init on azure generates netplan yaml that includes dhcp4 with the dhcp4-overrides of route-metric, i.e.:
dhcp4: true dhcp4-overrides: route-metric: 100
however netplan requires the same route-metric for dhcp4 and dhcp6 as networkd doesn't allow specifying separate metrics for 4 vs 6, so when azure is setup with dual-stack the netplan yaml is not valid for netplan, i.e.:
cloud-init on azure generates netplan yaml that includes dhcp4 with the dhcp4-overrides of route-metric, i.e.:
dhcp4: true
dhcp4- overrides:
route- metric: 100
however netplan requires the same route-metric for dhcp4 and dhcp6 as networkd doesn't allow specifying separate metrics for 4 vs 6, so when azure is setup with dual-stack the netplan yaml is not valid for netplan, i.e.:
dhcp4: true
dhcp4- overrides:
route- metric: 100
dhcp6: true
which causes netplan to exit with error:
Stderr: ERROR: eth0: networkd requires that route-metric has the same value in both dhcp4_overrides and dhcp6_overrides