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.
For Linux virtual machines, you can easily view the output of your console log from the Portal:
However, for both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor:
Both of these features are supported for Azure virtual machines in all regions. Note, screenshots, and output can take up to 10 minutes to appear in your storage account.
- 0xC000000E
- 0xC000000F
- 0xC0000011
- 0xC0000034
- 0xC0000098
- 0xC00000BA
- 0xC000014C
- 0xC0000221
- 0xC0000225
- 0xC0000359
- 0xC0000605
- An operating system wasn't found
- Boot failure or INACCESSIBLE_BOOT_DEVICE
-
When creating a new virtual machine from the Azure Portal, select the Azure Resource Manager from the deployment model dropdown:
-
In Settings, enable the Boot diagnostics, and then select a storage account that you would like to place these diagnostic files.
[!NOTE] 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.
-
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", …
-
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'), '.blob.core.windows.net')]" } } } }
To deploy a sample virtual machine with boot diagnostics enabled, check out our repo here.
To enable Boot diagnostics on an existing virtual machine, follow these steps:
-
Sign in to the Azure portal, and then select the virtual machine.
-
In Support + troubleshooting, select Boot diagnostics > Settings, change the status to On, and then select a storage account.
-
Make sure that the Boot diagnostics option is selected and then save the change.
-
Restart the VM to take effect.