OK, this is easily reproduced by adding a single static IP in the same subnet as the IP that comes from dhcp'ing on the interface.
For example, if you launch an instance with a 10.0.0./24 subnet, the dhcp IP is something like 10.0.0.4 You can login and curl -H Metadata:true "http://169.254.169.254/metadata/instance/network ?api-version=2017-08-01" is successful. If you append: addresses: - 10.0.0.20/24 To /etc/netplan/50-cloud-init.yaml, like this: network: ethernets: eth0: addresses: - 10.0.0.20/24 dhcp4: true match: macaddress: 00:0d:3a:4e:c5:66 set-name: eth0 version: 2 And netplan apply; then the static ip is 'primary' on the interface and the dhcp ip is 'secondary' which results it the wrong source ip when connecting to the metadata services. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1815254 Title: Azure multiple ips prevent access to metadata service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1815254/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs