az serial-console send

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 send command. Learn more about extensions.

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

Commands

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 send nmi

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

A Non-Maskable Interrupt (NMI) is used in debugging scenarios and is designed to crash your target Virtual Machine.

az serial-console send nmi --name
                           --resource-group
                           [--instance-id]

Examples

Send NMI to VM

az serial-console send nmi -n MyVM -g MyResourceGroup

Send NMI to VMSS Instance with ID 2

az serial-console send nmi -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 send reset

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

This results in a "hard" restart, like powering the computer down, then back up again. This can result in data loss in the virtual machine. You should only perform this operation if a graceful restart is not effective.

az serial-console send reset --name
                             --resource-group
                             [--instance-id]

Examples

Hard reset a VM

az serial-console send reset -n MyVM -g MyResourceGroup

Hard rest a VMSS Instance with ID 2

az serial-console send reset -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 send sysrq

Send SysRq sequence to a VM or VMSS Instance.

A SysRq is a sequence of keys understood by the Linux operation system kernel, which can trigger a set of pre-defined actions. These commands are often used when virtual machine troubleshooting or recovery can't be performed through traditional administration (for example, if the VM is not responding).

az serial-console send sysrq --input
                             --name
                             --resource-group
                             [--instance-id]

Examples

Send SysRq to VM to crash system

az serial-console send sysrq -n MyVM -g MyResourceGroup --input c

Send SysRq to VMSS Instance with ID 2 to crash system

az serial-console send sysrq -n MyVMSS -g MyResourceGroup --instance-id 2 --input c

Required Parameters

--input

Input key to send over serial console. Must be one character.

--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.