Member-only story
How to Resolve the “CPU Architecture Mismatch” Error in Azure ARM Template Deployment
When deploying virtual machines (VMs) using an Azure Resource Manager (ARM) template via Azure DevOps, you may encounter the following error:
##[error]BadRequest: Cannot create a VM of size 'Standard_B2pls_v2' 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.
This error arises when there’s a mismatch between the CPU architecture of the VM size you are requesting and the image or disk you are deploying. In this case, the Standard_B2pls_v2 VM size supports only Arm64 architecture, but the image or disk being used is configured for x64 architecture.
Understanding the Issue
Azure virtual machines come with different CPU architectures to support various workloads. The two main architectures are:
- x64 Architecture: Most commonly used for general-purpose and enterprise workloads.
- Arm64 Architecture: Designed for specialized workloads, particularly those that benefit from ARM processors.
In this scenario, the selected VM size (Standard_B2pls_v2
) supports Arm64…