VM Linux - Agent status not ready - Unable to SSH - Restart button missing

Sandy Gunawan 31 Reputation points
2022-08-08T06:25:58.473+00:00

Hi,

I have a Linux VM based on Ubuntu 20.0.4 LTS. Previously in first 3 months, there is no issue with the VM.
But now we have an issue (in chronological):

  1. Issue Agent is not ready
    When it happens, we can not connect through SSH.
    Previously, we restart the VM, then we can connect again. But then sometimes later, this issue is raised again.
    From the article , this relates with agent 'walinuxagent'.
  2. We're trying to solve this issue by attempting to SSH the VM. But now, after restart, then the status of Agent is not ready is showing up, and then the button of Start, and Restart of VM is disabled.
    And still unable to SSH.
  3. Try to stop the machine, and start the VM.
  4. The VM is up and running, but the agent is not showing up on the Portal. even after waiting for 20 minutes.

Now we can not connect to SSH as well.
How can we connect to SSH for this VM ? Previously when the VM is up and running the status agent is ready ,we can SSh this VM. How can we solve the walinux issue if we can not connect to SSH?
Any body can you please help ?
229002-azure2.png

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

Accepted answer
  1. Jackson Martins 10,606 Reputation points MVP Volunteer Moderator
    2022-08-08T07:29:27.003+00:00

    Hi @Sandy Gunawan
    Try to reinstall VM agent, you can use serial console and connect to Linux directly. After connect you can run:

    • systemctl stop walinuxagent
    • waagent -deprovision -force
    • apt-get remove --purge walinuxagent
    • rm -rf /var/lib/waagent

    then, install the latest package version, following the instruction from the document below:

    reference: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/update-linux-agent

    Connect via serial console to fix the connection.
    reference: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-linux

    below article that helps you find and correct the problems that occur due to Secure Shell (SSH)
    Reference: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection

    Get in touch if you need more help with this issue.

    --please don't forget to "[Accept the answer]" if the reply is helpful--


0 additional answers

Sort by: Most helpful

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.