Skip to content
Advertisement

Only blobs formatted as VHDs can be imported

I am following these https://learn.microsoft.com/en-us/azure/virtual-machines/linux/upload-vhd instructions to create a VM in Azure. At this stage though

az disk create –resource-group myResourceGroup –name myManagedDisk –source https://mystorageaccount.blob.core.windows.net/mydisks/myDisk.vhd

i get the following error

Only blobs formatted as VHDs can be imported.

I believe the VHD is a Linux OS.

Any ideas to what i have missed or does someone have a link to a better resource that can help me get this VM installed?

Advertisement

Answer

I follow the guide you mentioned above and I am able to create the disk without any issue.

created

As CtrlDot mentioned above, please make sure that the uploaded vhd is marked as page blob.

To verify this, please run the command below:

verify

If it is page blob and you are still getting error, then please make sure that your source vhd has met the following requirements:

  1. The type of the source file is vhd. (not vhdx) Otherwise, please follow this guide to convert the vhdx to a vhd file.

  2. The vhd file is fixed size and it is aligned to 1 MB. Otherwise, please follow this guide to convert the dynamic vhd to a fixed one.

Advertisement