Azure VM: Delete GuestHealthLinuxAgent extension

Martin Lžíčař 11 Reputation points
2022-08-08T16:31:57.35+00:00

Hi,

I want to uninstall GuestHealthLinuxAgent extension from my Azure VM.

But I am getting this error:

Failed to delete the virtual machine extension 'Subshop3/GuestHealthLinuxAgent'. Error: ajaxExtended call failed

I also tried PowerShell with no luck.

Thank for any help
Martin

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,080 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Martin Lžíčař 11 Reputation points
    2022-08-09T10:59:58.97+00:00

    I had to delete the entire folder and then I was able to delete the extension in the Azure portal.

    sudo rm -rf /var/lib/waagent/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent-1.0.37  
    

    Thanks for your help

    2 people found this answer helpful.
    0 comments No comments

  2. KarishmaTiwari-MSFT 18,352 Reputation points Microsoft Employee
    2022-08-09T00:02:32.977+00:00

    Please try the following ways to uninstall the extension and let me know the results:

    1. Try removing the extension from the Extensions + applications page for the virtual machine in the Azure portal.

    229258-image.png

    1. Using CLI : az vm extension delete -g MyResourceGroup --vm-name MyVm -n extension_name
    2. Using PowerShell : Remove-AzVMExtension -ResourceGroupName "ResourceGroup11" -Name "ContosoTest" -VMName "VirtualMachine22"
    3. Check if the VM agent is installed and running.
    0 comments No comments