Hi @SujinaSJ-1789 ,
Welcome to Microsoft Q&A! Thanks for posting the question.
I see that you are trying to install the Azure Monitor Agent extension on the VMs created using the specified marketplace image. It should not matter - how the VMs were created. As long as they have the supported pre-requisites met.
Here is the link of supported OS and other details for Azure Monitor agent: Overview of Azure Monitor agents
Also, the IP addresses and API end points used by Azure Monitor are available here: Application Insights & Log Analytics APIs
There are multiple ways to install Azure Monitor agent like:
Please let me know if you have any questions.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.