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:
To resolve the problem in Windows, use the Resize-VHD PowerShell cmdlet. Note that Resize-VHD is not an Azure PowerShell cmdlet.
To resolve the problem in Linux, use the qemu-img command.
For more information about how to create and upload a VHD for creating Azure VM, see the following articles:
- Upload and create a Linux VM from custom disk image by using the Azure CLI 1.0
- Create and upload a Windows Server VHD to Azure
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for