Image Configuration
Images are defined by two types of files:-
Image Configuration Files - Define image format and system configuration
- Located in
toolkit/imageconfigs/ - Specify disk layout, output format, and which package lists to include
- Located in
-
Package List Files - Define sets of packages to install
- Located in
toolkit/imageconfigs/packagelists/ - Each file describes a collection of related packages
- Located in
Virtual Hard Disks (VHD/VHDX)
Build Legacy BIOS VHD
Build a VHD image with legacy BIOS support:../out/images/core-legacy/*.vhd
Build UEFI VHDX
Build a VHDX image with UEFI support:../out/images/core-efi/*.vhdx
Container Images
Build a containerized Azure Linux image:../out/images/core-container/*.tar.gz
The resulting tarball can be imported into Docker:
ISO Images
Interactive ISO Installer
Build a bootable ISO with interactive UI and selectable configurations:../out/images/full/*.iso
ISOs require additional resources stored in
toolkit/resources/imageconfigs/ including a separate initrd installer image.Unattended ISO Installer
Build an ISO with automated installation (no user interaction):Build Without Rebuilding Packages
Skip package rebuilding when you only want to assemble images from existing packages:Image Build Process
Fetch packages
The build system fetches all packages needed for the image:This downloads missing packages from repositories.
Create raw disk
Generate the base disk image:This creates partition tables, filesystems, and installs packages.
Common Image Configurations
Azure Linux provides several pre-configured images:| Configuration File | Description | Output Format |
|---|---|---|
core-legacy.json | Minimal system with BIOS support | VHD |
core-efi.json | Minimal system with UEFI support | VHDX |
core-container.json | Container base image | tar.gz |
full.json | Full ISO with installer | ISO |
qemu-guest.json | QEMU virtual machine image | VHDX |
Image Build Variables
Key Variables
Path to image configuration file. Defines packages and image format.Example:
CONFIG_FILE=./imageconfigs/core-efi.jsonCreate unattended ISO installer. Overrides all other installer options.Example:
UNATTENDED_INSTALLER=yy- Build missing packages before creating imagen- Download missing packages from repos
Optional tag to append to image filename.Example:
IMAGE_TAG=dev-20240101Advanced Image Builds
Using Specific Repository Snapshot
Build with packages from a specific point in time:Disable Upstream Repositories
Build using only local packages:Using Custom Repositories
Specify custom package repositories:Image Outputs
All images are generated in theout/images folder:
Image Metadata
Each image build generates metadata files:image_deps.json- Summary of all packages includedlicense_check_results.json- License validation resultsimage_pkg_manifest.json- Complete package manifest
Testing Images
Testing VHD/VHDX in QEMU
Testing Containers
Testing ISOs
Boot the ISO in a virtual machine or write to bootable media:Next Steps
- Add a New Package to the distribution
- Review Build Variables Reference for more options
- Learn about Reproducing Builds