CmdID / az / az serial-console
az serial-console connect
Connect to Serial Console VM or VMSS Instance Azure CLI extensions reference
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.
2 examples 4 options Its page in the Azure CLI extensions reference
Examples
Connect to Serial Console of a VM
az serial-console connect -n MyVM -g MyResourceGroupIdentify-nName of the Virtual Machine or Virtual Machine Scale Set.-gName of resource group.Connect to Serial Console of a VMSS Instance with ID 2
az serial-console connect -n MyVMSS -g MyResourceGroup --instance-id 2Identify-nName of the Virtual Machine or Virtual Machine Scale Set.-gName of resource group.--instance-idID of VMSS instance.Options
--instance-idID of VMSS instance.--name, -nName of the Virtual Machine or Virtual Machine Scale Set.--resource-group, -gName of resource group.--subscriptionName or ID of subscription.