az serial-console

Note

This reference is part of the serial-console extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az serial-console command. Learn more about extensions.

Connect to the Serial Console of a Linux/Windows Virtual Machine or VMSS Instance.

Commands

az serial-console connect

Connect to Serial Console VM or VMSS Instance.

az serial-console disable

Disable the serial console service for an entire subscription.

az serial-console enable

Enable the serial console service for an entire subscription.

az serial-console send

Send NMI/SysRq/Reset to a VM or VMSS Instance.

az serial-console send nmi

Send a Non-Maskable Interrupt (NMI) to a VM or VMSS Instance.

az serial-console send reset

Perform a "hard" restart of the VM or VMSS Instance.

az serial-console send sysrq

Send SysRq sequence to a VM or VMSS Instance.

az serial-console connect

Connect to Serial Console VM or VMSS Instance.

This command provides access to a text-based console for Linux and Windows virtual machines (VMs) and virtual machine scale set instances. This serial connection connects to the ttys0 serial port of the VM or virtual machine scale set instance, providing access to it independent of the network or operating system state. To exit serial console type Ctrl + ] and then q. To send an NMI/SysRq/Reset type Ctrl + ] and then n/s/r respectively.

az serial-console connect --name
                          --resource-group
                          [--instance-id]

Examples

Connect to Serial Console of a VM

az serial-console connect -n MyVM -g MyResourceGroup

Connect to Serial Console of a VMSS Instance with ID 2

az serial-console connect -n MyVMSS -g MyResourceGroup --instance-id 2

Required Parameters

--name -n

Name of the Virtual Machine or Virtual Machine Scale Set.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--instance-id

ID of VMSS instance. Not needed when connecting to the serialport of a Virtual Machine.

az serial-console disable

Disable the serial console service for an entire subscription.

az serial-console disable

Examples

Disable Serial Console for a subscription

az serial-console disable

az serial-console enable

Enable the serial console service for an entire subscription.

az serial-console enable

Examples

Enable Serial Console for a subscription

az serial-console enable