Getting Started with Virtual Machine Serial Console access

@20aman    Mar 26, 2018

This is the feature we all have been waiting for. This gives power back to administrators in the cloud. Virtual Machine Console Access is now available in Preview in Azure. The console is called Special Administrative Console (SAC). With this you can perform advanced troubleshooting like correcting firewall rules by fixing iptables, recovering filesystems, locking down the network, interacting and modifying the bootloader etc.

Note: Windows images on Azure do not have Special Administrative Console (SAC) enabled by default. SAC is supported on server versions of Windows but is not available on client versions (e.g. Windows 10, Windows 8 or Windows 7).

How to Enable SAC on Windows VM

On a Linux VM, the serial access will be available but for Windows VM you need to perform additional steps in the VM to enable this. The steps to enable are:

  • Login to your VM via Remote Desktop
  • From an Administrative command prompt run the following commands

    bcdedit /ems {current} on

    bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200

  • Reboot the system for the SAC console to be enabled

How to Access

Currently, this option (in Preview at the time of writing this blog) is available only via the portal. To access the Serial Console go to:

  1. The Virtual Machine (VM) for which you want to access the Serial Console
  2. Ensure that the VM is up and running
  3. Navigate to the "Serial console (Preview)" option under "Support + Troubleshooting" section in VM settings

If the VM is not up and running then you will view the below error.

The serial console connection to the VM encountered an error: 'Bad Request'
 (400) - The VM is in a stopped deallocated state.  Please start the VM and retry the serial console connection.

When the VM is starting you will see the below message, which you are connected to the Serial Console.

Connecting to SAC

Once connected you can run commands like ch -? for information on using channels and simply type ? for general help.

Connected SAC and Help options

Note: The console automatically will disconnect after a period of inactivity.

The access is being opened to more and more subscriptions and regions. If you don't see the access today, you just need to wait and it should be coming soon.

Comments powered by Disqus