Hi Abhishek , Welcome to MS Q&A
Boot Diagnostics for Azure Virtual Machines relies on a storage account to store logs and metrics. When you change the network setting on the storage account to "Enabled from selected virtual networks and IP addresses," you restrict access to the storage account to specific virtual networks or IP addresses. If Boot Diagnostics is throwing errors after making this change, it suggests that the virtual machine might not be able to access the storage account due to the restricted network settings.
Here are some steps you can take to troubleshoot and resolve this issue:
- Check Storage Network Settings: If you have Selected " Enable from Selected virtual networks or IP addresses in", kindly confirm that the Vnet of the VM is added in to the networking of the storage account (Check below Image for ref) . Kindly perform below steps if not added
- Select Networking.
- Check that you've chosen to allow access from Selected networks.
- To grant access to a virtual network by using a new network rule, under Virtual networks, select Add existing virtual network. Select the Virtual networks and Subnets options, and then select Add. To create a new virtual network and grant it access, select Add new virtual network. Provide the necessary information to create the new virtual network, and then select Create. If a service endpoint for Azure Storage wasn't previously configured for the selected virtual network and subnets, you can configure it as part of this operation. Presently, only virtual networks that belong to the same Microsoft Entra tenant appear for selection during rule creation.
- Select Save to apply your changes.
NOTE: Basically Integration of both Vnet VM vnet and storage account if vnets are not peered
Please check below Image to add Vnet connectivity to your storage account
Kindly find below link for more details
https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal
Please accept answer , if it helps, Thanks