• <1 minute

Boot Diagnostics for Virtual Machines v2

Announcing support for two debugging features: Console Output and Screenshot support for Azure Virtual Machines.

Today, we’re very excited to announce support for two debugging features: Console Output and Screenshot support for Azure Virtual Machines v2. 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.

For Linux Virtual Machines, you can easily view the output of your console log from the Portal:

image

However, for both Windows and Linux Virtual Machines, Azure also enables you to see a screenshot of the VM from the hypervisor:

windowsBootFailure

Enable diagnostics on a new Virtual Machine

When creating a new Virtual Machine v2 from the Preview Portal, select the Azure Resource Manager from the deployment model dropdown:

stackSelector

 

Configure the Monitoring option to select the storage account where you would like to place these diagnostic files.

enableMonitoring

 

If you are deploying from a 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",
      … 

The diagnostics profile enables you to select the storage account where you want to put these logs.

        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true,
            "storageUri": "[concat('https://', parameters('newStorageAccountName'), '.blob.core.windows.net')]"
          }
        }
      }
    }

To deploy a sample Virtual Machine with boot diagnostics enabled, check out our repo here.

Update an Existing Virtual Machine

You can also update an existing V2 Virtual Machine through the Portal to enable boot diagnostics through the Portal. Select the Boot Diagnostics option and Save. Restart the VM to take effect.

image

Support

Both of these features are supported for Azure Virtual Machines v2 in all regions. Note, screenshots and output can take up to 10 minutes to appear in your storage account.