VHD is not supported when you create a virtual machine in Azure

This article helps correct VHD errors when running Virtual Machine in Windows or Linux.

Symptoms

When you create a virtual machine in Microsoft Azure by using an uploaded VHD, the deployment fails and returns the following error message:

New-AzureRmVM : Long running operation failed with status 'Failed'.
ErrorCode: InvalidVhd
ErrorMessage: The specified cookie value in VHD footer indicates that disk 'diskname' with blob https://xxxxxx.blob.core.windows.net/vhds/samplename.vhd is not a supported VHD. Disk is expected to have cookie value 'conectix'.

Cause

This problem occurs for one of the following reasons:

  • The VHD does not comply with the 1 MB alignment (offset). The supported disk size should be 1 MB * N. For example, the disk should be 102,401 MB.
  • The VHD is corrupted or not supported.

Resolution

Note

To perform the following fix, the customer will need to perform these steps prior to uploading the VHD into Azure.

To resolve this problem, resize the disk to comply with 1 MB alignment:

For more information about how to create and upload a VHD for creating Azure VM, see the following articles:

Continuing problems may indicate a corrupted VHD. In this situation, we recommend that you rebuild the VHD from scratch.

For more information, see the following article:

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.