How to fix back to agen Azure Monitor v1.35.4 on VM linux

Victor Trujillo 0 Reputation points
2025-06-17T15:26:33.1+00:00

Good afternoon,

In our organization, we have a virtual machine on which we have updated the extensions. We upgraded the Azure Monitor agent from version 1.35.4 to 1.35.7. The update failed due to an error, and I am unable to revert to the previous version—the extension is now stuck. How can I resolve this? I have tried removing the agent, reinstalling it, and examining the logs, but none of these steps have been successful.

Thanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,068 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Siva Pavuluri 570 Reputation points Microsoft External Staff Moderator
    2025-06-18T03:38:50.2966667+00:00

    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.

    1. check if machine can reach Azure and find the extension to install using the command below:
         az vm extension image list-versions --location
      
      Wait for 10-15 minutes as extension maybe in transitioning status. If it still doesn't show up,
    2. once check if you see any errors in extension logs located at C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Monitor.AzureMonitorWindowsAgent on your machine
    3. 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
      
    4. 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-*
    5. Restart VM after cleanup to ensure no processes are holding files.
    6. 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.

    0 comments No comments

  2. Alex Burlachenko 11,610 Reputation points
    2025-06-18T08:05:19.2033333+00:00

    hi Victor Trujillo, thanks for posting this on Q&A forums,

    u can force a rollback to azure monitor agent 1.35.4 on ur linux vm. open azure portal, go to ur vm's 'extensions' tab. remove the stuck extension completely. then, use az cli to manually install the older version.

    az vm extension set --resource-group 'your_rg_name' --vm-name 'your_vm_name' --name 'AzureMonitorLinuxAgent' --version '1.35.4' --publisher 'Microsoft.Azure.Monitor'
    
    
    

    check the full docs for this https://docs.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-manage sometimes the portal lags, so cli is ur best friend here :)) peek at the vm logs in User's image

    for any hidden errors. if u see permission issues, a quick User's image

    might save the day.

    when extensions fail, always nuke the old configs before reinstalling. on linux, wipe User's image

    (backup first tho!). this cleans up zombie files that break new installs.

    btw.... check if ur vm has enough disk space. low space wrecks extensions silently. run 'df -h' to confirm. this might help in other tools too, not just azure.

    last thing ))) if u hit snags, restart the vm after removing the extension. sometimes the azure backend just needs aaaaa push.

    good luck! hope this gets u back to 1.35.4 smooth like butter. let us know how it goes %)))

    rgds,

    Alex

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.