Ubunut Linux: 50-cloud-init.yaml: Unknown key dhcp4-overrides

On Azure, copying a VM (Ubuntu) from Production to Testing.
 
The changes of the configuration done then rebooting.

Then, suddenly, offline on the eth0.
 
Showing:
Failed to start Initial cloud-init job (pre-networking)
 
 
/etc/netplan/50-cloud-init.yaml line 8 column 12: unknown key dhcp4-overrides


network:
  ethernets:
    eth0:
      dhcp4: true
        dhcp4-overrides:
          route-metric: 100
          dhcp6: false



DHCP question?

Tried to change it to static private IP from the Azure console.

Not work.
 
 
As offline, rolled it back from the snapshot.


Was it related to the walinuxagent? Because:
The VM agent is either unavailable, or not installed, which may prevent VMAccess from running.
 
 
Updated but didn't solve it.
apt-get install walinuxagent 


Rolled it back again.

Umm... looked like about cloud-init & netplain.io.


Updating those then solved the question.
apt-get install walinuxagent cloud-init netplan.io
 


Update