Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

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

Name Description Type Status
az vm boot-diagnostics disable

Disable the boot diagnostics on a VM.

Core GA
az vm boot-diagnostics enable

Enable the boot diagnostics on a VM.

Core GA
az vm boot-diagnostics get-boot-log

Get the boot diagnostics log from a VM.

Core GA
az vm boot-diagnostics get-boot-log-uris

Get SAS URIs for a virtual machine's boot diagnostic.

Core GA

az vm boot-diagnostics disable

Disable the boot diagnostics on a VM.

az vm boot-diagnostics disable [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]

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)

Disable the boot diagnostics on a VM

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az vm boot-diagnostics enable

Enable the boot diagnostics on a VM.

az vm boot-diagnostics enable [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--resource-group]
 [--storage]
 [--subscription]

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)

Enable the boot diagnostics on a VM. (autogenerated)

az vm boot-diagnostics enable --name MyVirtualMachine --resource-group MyResourceGroup --storage https://mystor.blob.core.windows.net/

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--storage

Name or URI of a storage account (e.g. https://your_storage_account_name.blob.core.windows.net/). If it's not specified, managed storage will be used.

--subscription

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

Property Value
Parameter group: Resource Id Arguments

az vm boot-diagnostics get-boot-log

Get the boot diagnostics log from a VM.

az vm boot-diagnostics get-boot-log [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]

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)

Get the boot diagnostics log from a VM. (autogenerated)

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az vm boot-diagnostics get-boot-log-uris

Get SAS URIs for a virtual machine's boot diagnostic.

az vm boot-diagnostics get-boot-log-uris [--acquire-policy-token]
 [--change-reference]
 [--expire]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Examples

Get SAS URIs for a virtual machine's boot diagnostic logs.

az vm boot-diagnostics get-boot-log-uris -g MyResourceGroup -n MyVirtualMachine

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--expire

Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

Feedback

Was this page helpful?