How to use boot diagnostics to troubleshoot Windows virtual machines in Azure?

Support for two debugging features is now available in Azure: Console Output and Screenshot support for Azure virtual machines Resource Manager deployment model.

When bringing your own image to Azure or even booting one of the platform images, there can be many reasons why a virtual machine gets into a non-bootable state. These features enable you to easily diagnose and recover your virtual machines from boot failures.

Enable diagnostics on a new virtual machine

  1. When creating a new virtual machine from the Azure Portal, select the Azure Resource Manager from the deployment model dropdown:

    Resource Manager

  2. In Settings, enable the Boot diagnostics, and then select a storage account that you would like to place these diagnostic files.

    Create VM


    The Boot diagnostics feature does not support premium storage account. If you use the premium storage account for Boot diagnostics, you might receive the StorageAccountTypeNotSupported error when you start the VM.

  3. If you are deploying from an Azure Resource Manager template, navigate to your virtual machine resource and append the diagnostics profile section. Remember to use the “2015-06-15” API version header.

          "apiVersion": "2015-06-15",
          "type": "Microsoft.Compute/virtualMachines",
  4. The diagnostics profile enables you to select the storage account where you want to put these logs.

            "diagnosticsProfile": {
                "bootDiagnostics": {
                "enabled": true,
                "storageUri": "[concat('http://', parameters('newStorageAccountName'), '')]"

To deploy a sample virtual machine with boot diagnostics enabled, check out our repo here.

Enable Boot diagnostics on existing virtual machine

To enable Boot diagnostics on an existing virtual machine, follow these steps:

  1. Sign in to the Azure portal, and then select the virtual machine.
  2. In Support + troubleshooting, select Boot diagnostics > Settings, change the status to On, and then select a storage account.
  3. Make sure that the Boot diagnostics option is selected and then save the change.

    Update Existing VM

  4. Restart the VM to take effect.

Ask a question

"Hey couldn't find what you were looking for in our knowledgebase? Please enter your question here".

First Name *
Last Name *
Email Address *
Question *
Captcha *