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 logs. |
Core | GA |
az vm boot-diagnostics disable
Disable the boot diagnostics on a VM.
az vm boot-diagnostics disable [--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
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.
The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm boot-diagnostics enable
Enable the boot diagnostics on a VM.
az vm boot-diagnostics enable [--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
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.
The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm boot-diagnostics get-boot-log
Get the boot diagnostics log from a VM.
az vm boot-diagnostics get-boot-log [--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
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.
The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm boot-diagnostics get-boot-log-uris
Get SAS URIs for a virtual machine's boot diagnostic logs.
az vm boot-diagnostics get-boot-log-uris [--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
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.
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.
The name of the Virtual Machine. You can configure the default using az configure --defaults vm=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.