az-serial-console
Access the serial console of Azure virtual machines
TLDR
SYNOPSIS
az serial-console subcommand [options]
DESCRIPTION
az serial-console provides text-based serial console access to Azure Linux and Windows VMs and VMSS instances for troubleshooting. The connection attaches to the ttyS0 serial port, working independently of network connectivity and the operating system state.This is useful for debugging boot issues, network misconfigurations, or when the VM is otherwise unreachable over SSH or RDP. While connected, type Ctrl + ] then q to quit, or n, s, or r to send an NMI, SysRq, or reset.
PARAMETERS
--name -n
Name of the virtual machine or virtual machine scale set.--resource-group -g
Name of the resource group.--instance-id
ID of the VMSS instance. Not needed when connecting to a single virtual machine.
SUBCOMMANDS
connect
Connect to the serial console of a VM or VMSS instance.enable
Enable the serial console service for the entire subscription.disable
Disable the serial console service for the entire subscription.send nmi
Send a Non-Maskable Interrupt (NMI) to a VM or VMSS instance.send sysrq
Send a SysRq sequence to a VM or VMSS instance.send reset
Perform a "hard" restart of a VM or VMSS instance.
INSTALL
CAVEATS
Part of the serial-console extension (Azure CLI 2.15.0 or higher); it installs automatically the first time an az serial-console command runs, or install it manually with az extension add --name serial-console. Serial console access requires boot diagnostics to be enabled on the VM and appropriate RBAC permissions. The enable and disable commands toggle the service for the entire subscription, not per VM.