The Azure Linux ISO may work in some bare-metal scenarios, but is generally intended for installation to a Virtual Machine.
Install from ISO (fastest method)
The quickest way to try Azure Linux is to download and install from the pre-built ISO.Download the ISO
Download the Azure Linux 3.0 ISO for your architecture:
Create a virtual machine
From Hyper-V on Windows:
- Select Action → New → Virtual Machine
- Provide a name for your VM and press Next
- Select Generation 1 (VHD) or Generation 2 (VHDX), then press Next
- Change memory size if desired, then press Next
- Select a virtual switch, then press Next
- Select Create a virtual hard disk, choose a location for your VHD(X) and set your desired disk size, then press Next
- Select Install an operating system from a bootable image file and browse to your Azure Linux ISO
- Press Finish
Configure boot options (Gen2/VHDX only)
For Generation 2 VMs only:
- Right click your virtual machine from Hyper-V Manager
- Select Settings…
- Select Security and under Template: select Microsoft UEFI Certificate Authority
- Select Firmware and adjust the boot order so DVD is first and Hard Drive is second
- Select Apply to apply all changes
Install Azure Linux
- Right click your VM and select Connect…
- Select Start
- Follow the installer prompts to install your image
- When installation completes, select restart to reboot the machine (the installation ISO will be automatically ejected)
- When prompted, sign in to your Azure Linux using the username and password provisioned through the installer
Build from source
Build your own Azure Linux images from source with precompiled RPMs.Prerequisites
First, prepare your build environment by installing the necessary prerequisites:- See Prerequisites for detailed setup instructions for Ubuntu, Azure Linux, or other distributions
Clone the repository
From a bash terminal window, clone the Azure Linux repository and check out a stable build:The
3.0-stable tag always points to the latest known good build of Azure Linux of the 3.0 branch. A similar tag, 2.0-stable, exists for the 2.0 branch.Build a VHDX or VHD image
The following builds a bootable Azure Linux image from precompiled RPMs in the Azure Linux package repository.- VHDX (Gen2)
- VHD (Gen1)
No user account is provisioned by default. To sign-in to these images, you must also build the
meta-user-data.iso configuration image.Build the cloud-init configuration
The cloud-init configuration file does not build by default. You will need to edit it to set a username and password or SSH Key.Edit the user-data file
Edit the file located at
./resources/assets/meta-user-data/user-data to configure your username and password or SSH key.Create and boot your VM
Copy images
Copy your VHD(X) and meta-user-data.iso images to your VM host machine using your preferred method.
Create virtual machine
From Hyper-V:
- Select Action → New → Virtual Machine
- Provide a name for your VM and press Next
- For VHD select Generation 1, for VHDX select Generation 2, then press Next
- Change memory size if desired, then press Next
- Select a virtual switch, then press Next
- Select Use an existing virtual hard disk, then browse and select your VHD(X) file
- Press Finish
Configure boot options (Gen2/VHDX only)
For Generation 2 VMs only:
- Right click your virtual machine from Hyper-V Manager
- Select Settings…
- Select Security and under Template: select Microsoft UEFI Certificate Authority
- Select the SCSI Controller from the Hardware panel
- Select DVD Drive and press Add
Mount the meta-user-data.iso
- Right click your virtual machine from Hyper-V Manager
- Select Settings…
- Select the DVD Drive (nested under IDE Controller 1 for Gen1/VHD, or SCSI Controller for Gen2/VHDX)
- Select Image File: and browse to the meta-user-data.iso file
- Select Apply to apply all changes
Build an ISO image
Build a bootable ISO image from precompiled RPMs:Build variables explained
When building Azure Linux images, these common variables control the build process:Set to
y to build the Go tools from source. Use n to use pre-compiled binaries.Set to
n to download packages from the package repository instead of building locally. This significantly speeds up builds.Path to the image configuration file that defines what packages to include and how to configure the image.
Number of parallel jobs to run. Recommend setting to the number of logical cores available on your system (e.g.,
-j8 for 8 cores).Next steps
Full build guide
Learn how to build Azure Linux end-to-end with all options
Add packages
Add packages to your Azure Linux distribution
Security features
Understand the built-in security capabilities
How it works
Learn how the build system works under the hood
Getting help
- Bugs and features: File GitHub issues
- Community support: Support for the ISO is community based
- Documentation: Refer to the support documentation
Looking for CBL-Mariner 2.0 source? Visit the 2.0 branch.