How to access your Azure VM (when everything else fails) A simple and effective guide to address access and connection issues to an Azure VM using Azure Serial Console

How to Migrate SQL Server DB to Azure SQL Server DB

I’ve been there: you hit Connect, and your VM just won’t let you in. RDP times out, SSH hangs, Bastion won’t help, and you start wondering if you’ve bricked the thing. The good news? In Azure, the “right” way out of most lock-out situations is the Serial Console. It bypasses the network entirely and drops you straight onto the VM’s console, so you can fix whatever broke—firewall rules, SSH/RDP configs, NIC settings, you name it.

Below is exactly how I use it—what it is, where to find it, and step-by-step fixes once you’re in.

Why the Serial Console is the move

  • No network needed. It works even when the NIC, routing, or firewall is misconfigured.
  • Direct access. You’re interacting with the VM’s console like a local screen/keyboard.
  • Fast recovery. Perfect for “I changed one setting and now nothing connects.”

Prerequisites (quick checklist)

Before you open Serial Console, make sure:

  • The VM is Running (not Stopped/deallocated).
  • Boot diagnostics is On for the VM. (If it’s Off, you can enable it from the VM page—no reboot needed in most cases.)
  • You have permissions such as Virtual Machine Contributor (or equivalent) on the VM/resource group/subscription.

Tip: For custom images, ensure the OS is configured to expose a serial TTY/COM port (Azure Marketplace images already are).

Where to find the Serial Console in the Azure portal

Option 1 — From the VM blade (left menu)

  1. Azure portal → Virtual machines → choose your VM
  2. In the left menu, under Support + troubleshooting, click Serial console

Option 2 — From the Connect menu

  1. Azure portal → Virtual machines → choose your VM
  2. Click Connect, then select Serial console (if shown in your portal layout)

If the button is greyed out, check that the VM is running and Boot diagnostics is enabled.

Logging in (Linux vs. Windows)

Linux VMs

  1. Open Serial console.
  2. Press Enter once or twice to wake the console. You should see a login prompt.
  3. Log in with a local user on the VM.
    If you’ve disabled password auth for SSH and don’t have a local password, use the VM’s Reset password blade (under “Support + troubleshooting”) to temporarily set one, then come back here and log in.

Common Linux fixes once you’re in

Check network quickly:

Fix an over-strict firewall that locked out SSH:

Repair SSH config and restart:

Re-enable password login temporarily (if needed to get back in):

Cloud-init hiccups?

When you’re done, try SSH again from your machine. If it works, revert any temporary relaxations (like re-enabling password auth or disabling the firewall).

Windows VMs

Windows uses the Special Administration Console (SAC) behind the scenes.

  1. Open Serial console.
  2. Press Enter to wake SAC. If you see a SAC> prompt, you’re in.
  3. Create a command channel and switch to it:

You should now see a regular C:\> prompt.

Common Windows fixes once you’re in

Check IP and gateway:

If RDP was disabled, re-enable it:

Use the menu to enable Remote Desktop (or, if you prefer commands, enable via PowerShell/registry—SAC lets you run powershell too in modern images).

Reset a local admin password:

Firewall being over-zealous? As a temporary test:

(Turn it back on once RDP is healthy.)

Once you can RDP again, undo any temporary lockdown relaxations.

What if Serial Console still won’t open?

  • Boot diagnostics Off → turn it On (VM → “Boot diagnostics”), then retry.
  • VM Stopped/deallocated → start it, then retry.
  • Role/permission issues → you’ll need adequate access (ask your admin to grant VM/resource group permissions).
  • Custom images not wired for a serial port → check OS settings or rebuild with the right kernel/driver options.

A quick recovery playbook I actually use

  1. Open Serial console from the VM page.
  2. Log in (Linux: local user; Windows: SAC → cmd).
  3. Fix the obvious: network config, SSH/RDP settings, firewall.
  4. Test connectivity (SSH/RDP).
  5. Revert any temporary loosening of security.

Final thought

When a VM locks you out, don’t panic and don’t immediately rebuild. Azure Serial Console is your “back door” for exactly these moments. It’s fast, it’s built-in, and once you get comfortable with it, you’ll wonder how you ever troubleshot without it.

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.