What is the reason for Azure virtual machine agent status not ready error?

Jithin M V 96 Reputation points
2022-07-08T04:42:16.737+00:00

Hi,
I have a VM of type Standard B2ms (2 vcpus, 8 GiB memory) running in azure with an ubuntu image Ubuntu server 20.04 KTS -Gen2. It is my development instance that is running 24 * 7. But the problem is randomly my site is unreachable and when I check the portal I am seeing the following error
"azure vm agent status not ready linux"

The instance is not accessible with SSH as well. The only solution is to restart the machine and start all our services again. That is not an ideal solution. In fact we are losing the confidence with Azure platform and still in a doubt to whether migrate our prod instance or not. Why this behaviour? can somebody help me with this?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,816 questions
{count} vote

2 answers

Sort by: Most helpful
  1. vipullag-MSFT 23,496 Reputation points Microsoft Employee
    2022-07-08T12:32:02.083+00:00

    @Jithin M V

    Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    I would recommend to try reinstalling the agent/update the agent.

    Try to removed and reinstall the VM agent and see if that helps.
    Remove: https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disable-provisioning#remove-the-linux-agent-from-a-running-vm
    Install: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux#installation
    Update:: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/update-linux-agent

    Please check this agent not ready troubleshooting guide and see if that helps.
    Ref: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux-azure-guest-agent

    If the agent is not ready state, it is usually due to some corruption of the agent which can be resolved by manually reinstalling the agent.
    Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux#installation

    Other reason could be issue with the image that is being used for deploying this VM. in this case support team can look into further.
    As you have mentioned that this is a repeated issue in your environment, this needs deeper investigation on why the agent status is going to not ready state.

    Support team will be able to check and help on this. I would recommend you to open a azure support case.


  2. Kreshan Thangasamy 10 Reputation points
    2023-07-10T08:08:02.6633333+00:00

    Had a similar issue on a Linux VM in Azure. After checking syslog on the VM, it turns out the VM was going in sleep-mode.

    Ran the following command to disable suspend and hibernation:
    sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target