Share via


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

Name Description Type Status
az serial-console connect

Connect to Serial Console VM or VMSS Instance.

Extension GA
az serial-console disable

Disable the serial console service for an entire subscription.

Extension GA
az serial-console enable

Enable the serial console service for an entire subscription.

Extension GA
az serial-console send

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

Extension GA
az serial-console send nmi

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

Extension GA
az serial-console send reset

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

Extension GA
az serial-console send sysrq

Send SysRq sequence to a VM or VMSS Instance.

Extension GA

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.