az vm boot-diagnostics

Troubleshoot the startup of an Azure Virtual Machine.

Use this feature to troubleshoot boot failures for custom or platform images.

Commands

az vm boot-diagnostics disable Disable the boot diagnostics on a VM.
az vm boot-diagnostics enable Enable the boot diagnostics on a VM.
az vm boot-diagnostics get-boot-log Get the boot diagnostics log from a VM.

az vm boot-diagnostics disable

Disable the boot diagnostics on a VM.

az vm boot-diagnostics disable --name
--resource-group

Examples

Disable boot diagnostics on all VMs in a resource group.

az vm boot-diagnostics disable --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)

Required Parameters

--name -n
The name of the Virtual Machine. You can configure the default using `az configure --defaults vm=<name>`.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az vm boot-diagnostics enable

Enable the boot diagnostics on a VM.

az vm boot-diagnostics enable --name
--resource-group
--storage

Examples

Enable boot diagnostics on all VMs in a resource group.

az vm boot-diagnostics enable --storage https://mystor.blob.core.windows.net/ --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)

Required Parameters

--name -n
The name of the Virtual Machine. You can configure the default using `az configure --defaults vm=<name>`.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
--storage
A storage account name or a uri like https://your_stoage_account_name.blob.core.windows.net/.

az vm boot-diagnostics get-boot-log

Get the boot diagnostics log from a VM.

az vm boot-diagnostics get-boot-log --name
--resource-group

Examples

Get diagnostics logs for all VMs in a resource group.

az vm boot-diagnostics get-boot-log --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)

Required Parameters

--name -n
The name of the Virtual Machine. You can configure the default using `az configure --defaults vm=<name>`.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.