Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Azure virtual machines with a dual stack network (IPv4 and IPv6) may face connectivity issues with the Instance Metadata Service (IMDS) at 169.254.169.254 due to routing conflicts or misconfigurations. The IMDS is accessible only via IPv4, and if the network configuration prioritizes IPv6, it may prevent successful communication with the IMDS.
Troubleshooting Steps:
- Ensure that the network interface is configured to allow IPv4 traffic.
- Verify that there are no routing conflicts that could affect access to the IMDS.
- Use the following command to test connectivity to the IMDS;
curl -H "Metadata: true" "http://169.254.169.254/metadata/instance?api-version=2021-08-01&extended=true"
- A successful response (HTTP status code 200) indicates that the IMDS is reachable.
- Ensure that there are no firewall rules blocking outbound traffic to the IMDS IP address (169.254.169.254).
- If IPv6 is not required for your application, consider disabling it on the network interface to avoid potential conflicts.
For more information, please refer to the below documentation:
Azure Instance Metadata Service
If an answer has been helpful, please consider accept the "Answer" and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community.