How to fix lost SSH access to Azure Linux VM after yum update?

Burzynski, Christopher 0 Reputation points
2024-10-07T22:16:00.11+00:00

After running yum update on Linux Azure VM I am no longer able to access the instance via SSH. On the serial console, the VM is constantly dumping out error logs so I can't type the password fast enough. Any idea how I can gain access?

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

1 answer

Sort by: Most helpful
  1. Sai Krishna Katakam 810 Reputation points Microsoft Vendor
    2024-10-10T08:37:49.2466667+00:00

    Hi Burzynski, Christopher,

    It sounds like you’re experiencing a challenging issue with the Azure Serial Console. Here are some steps you can try to resolve it:

    • Ensure that boot diagnostics are enabled for your VM. This is crucial for the serial console to function properly.
    • Make sure your VM is in a running state and not stopped or deallocated.
    • If you receive a “Web socket is closed or could not be opened” error, add *.serialconsole.azure.com to your firewall allow list. Details can be found here.
    • Verify that you have the necessary permissions (at least Virtual Machine Contributor role) to access the serial console.
    • Ensure that the storage account used for boot diagnostics has not been deleted and is accessible.

    For more details, please refer below documents:
    Common errors within the Azure Serial Console
    Azure Serial Console for Windows
    How can I fix this Serial Console Problem?

    If you have any further queries, do let us know. If the comment is helpful, please click "Upvote".

    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.