When creating a new ARM64 VM based on a VHD containg an ARM64 Linux image, the VM creation REST API fails with
Cannot create a VM of size 'Standard_D2pls_v5' because this VM size only supports a CPU Architecture of 'Arm64', but an image or disk with CPU Architecture 'x64' was given. Please check that the CPU Architecture of the image or disk is compatible with that of the VM size.
What must be done to avoid this? Is there a special field to set in the VHD footer or should some special parameter be passed at image or VM creation?
I hit this issue creating a FreeBSD arm64 Azure image and talking with Azure support, they said I had to use a Compute Gallery to publish an arm64 image.
So the steps look like this:
HTH