Hi Victor Trujillo,
I Understand your concern when trying to update Azure Monitor agent from version 1.35.4 to 1.35.7 getting failed.
- check if machine can reach Azure and find the extension to install using the command below:
Wait for 10-15 minutes as extension maybe in transitioning status. If it still doesn't show up,az vm extension image list-versions --location
- once check if you see any errors in extension logs located at
C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Monitor.AzureMonitorWindowsAgent
on your machine - Force Remove the Extension via Azure CLI Sometimes the portal or PowerShell won’t fully clean up a broken extension
az vm extension delete \ --resource-group <your-resource-group> \ --vm-name <your-vm-name> \ --name AzureMonitorWindowsAgent
- Sometimes, uninstalling from the portal or CLI does not remove all files or state, causing future installs to fail. Manually delete the agent's folders: Windows:
C:\Packages\Plugins\Microsoft.Azure.Monitor.AzureMonitorWindowsAgent
Linux:/var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-*
- Restart VM after cleanup to ensure no processes are holding files.
- and reinstall AzureMonitorWindowsAgent.
Please refer the document for your referane:
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/troubleshoot
https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-troubleshoot-windows-vm
If the answer is helpful, please click "Accept Answer" and "Upvote it" as it can be helpful to others in the community.
Thank You.