question

PrashanthKumar-3389 avatar image
0 Votes"
PrashanthKumar-3389 asked vipullag-MSFT commented

How to disable Azure Instance Metadata Service

I wanted to disable the Instance Metadata Service on the VM's. Even though, we run the URL within the VM itself, http://169.254.169.254/metadata/instance?api-version=2021-02-01, I don't want my machine share it's details at any cost.

Is there a way, I can disable this service in Azure, other cloud providers had provided the option to disable the Metadata Service for their VM's

There is no option of disabling the Metadata Service in the Azure Portal and went through the KB article: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux no mention of disabling the Metadata Service.


azure-virtual-machines
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PrashanthKumar-3389

Just checking in to see if you got a chance to see my previous response.

Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·

1 Answer

vipullag-MSFT avatar image
0 Votes"
vipullag-MSFT answered

@PrashanthKumar-3389

Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

I would like to let you know that this is a service which communicates with the fabric controller inside azure portal to get the VM properties and also works with azure agent, so it is not possible to disable it.

However, you can restrict all the access to the VM from the specific address of the service and allow the access to the azure agent through Windows Firewall. Not sure if this work around can help with your use case.

Please see below steps for the same:

110971-1-1.jpg
110953-1-2.jpg
110954-1-3.jpg

Hope this helps answer your query.

Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.



1-1.jpg (59.3 KiB)
1-2.jpg (47.5 KiB)
1-3.jpg (54.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.