Edit

CPU architectures and toolchain compatibility in Azure Linux 4

Azure Linux 4 provides 64-bit VM images for x64 and ARM64. Use the architecture-specific image and package repositories that match your Azure VM size and workload.

Supported architectures

Architecture Linux architecture value Azure Marketplace SKU
x64 or AMD64 x86_64 4
ARM64 aarch64 4-arm64

Azure Linux 4 doesn't provide 32-bit VM images. Package architecture values can include x86_64, aarch64, and noarch.

Identify the architecture of a running system:

uname -m
rpm --eval '%{_arch}'

List the architecture of an installed package:

rpm -q --qf '%{NAME} %{ARCH}\n' <PACKAGE_NAME>

Select an Azure VM architecture

Use an Azure VM size that supports the selected image architecture. List the available Azure Linux 4 image SKUs in a region:

az vm image list-skus \
  --location <REGION> \
  --publisher microsoftazurelinux \
  --offer azurelinux-4 \
  --output table

Don't copy binaries between x64 and ARM64 systems unless the artifact is architecture independent. Rebuild native applications and RPM packages for each target architecture.

Inspect the compiler toolchain

Compiler and library package versions can change through Azure Linux servicing and minor releases. Query the system and enabled repositories for the versions you build against:

gcc --version
clang --version
ld --version
rpm -q gcc clang llvm binutils glibc glibc-devel
dnf info gcc clang llvm binutils glibc glibc-devel

Not every compiler package is installed in the base VM image. Install build dependencies from the appropriate package repository before compiling software.

Validate native software when moving to Azure Linux 4

Azure Linux 4 updates the compiler, C library, linker, RPM tooling, and other build components from Azure Linux 3. Treat a major-version migration as a rebuild and validation event.

  1. Rebuild native applications and RPM packages on Azure Linux 4.

  2. Resolve compiler warnings and errors instead of assuming Azure Linux 3 build behavior.

  3. Run application, performance, and integration tests on every target architecture.

  4. Verify dynamically linked dependencies:

    ldd <BINARY_PATH>
    
  5. Inspect an RPM's architecture and dependencies:

    rpm -qp --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' <RPM_PATH>
    rpm -qpR <RPM_PATH>
    
  6. Confirm that required packages are available in production repositories before deployment.

Avoid architecture assumptions

Use the Marketplace image and Azure VM-size requirements as the compatibility boundary. Don't assume a specific x86-64 microarchitecture level, ARM instruction-set revision, or optional CPU extension unless the selected Azure VM size and your own application validation establish that requirement.