Using Console
Using CLI
az login
az account set --subscription <subscription-id>
az vm boot-diagnostics enable --name <vm-name> --resource-group <resource-group-name> --storage <storage-account-name>
Here, replace <vm-name>
with the name of the virtual machine for which you want to enable boot diagnostics, <resource-group-name>
with the name of the resource group in which the virtual machine is present, and <storage-account-name>
with the name of the storage account where the boot diagnostics data will be stored.
Using Python
pip install azure-mgmt-compute
storage_account_name
with the name of the storage account that you want to use for boot diagnostics.