Skip to content

Add Azure Linux 4.0 support#698

Open
vinceaperri wants to merge 50 commits intomainfrom
user/vinceaperri/azl4-support
Open

Add Azure Linux 4.0 support#698
vinceaperri wants to merge 50 commits intomainfrom
user/vinceaperri/azl4-support

Conversation

@vinceaperri
Copy link
Copy Markdown
Contributor

@vinceaperri vinceaperri commented Apr 14, 2026

  • Download and test azl4 test image in functional and vm test workflows (core-efi only, legacy option unavailable)

  • Add azl4 to distribution-support table (all yes except --package-snapshot-time and os.packages.shapshotTime: the package snapshot time APIs require tdnf but azl4 uses dnf)

  • Add azl4 to the developer guide (no link because it hasn't been released yet)

  • Add azl4 to the README as a supported input image

  • Add azl4 vm tests (equivalents of the existing azl3 vm tests)

    • test_min_change_efi_azl4_iso_full_os_output
    • test_min_change_efi_azl4_iso_bootstrap_output
    • test_min_change_efi_azl4_qcow_output
    • test_create_image_efi_qcow_output_azl4
  • Add azl4 to:

    • azureLinuxDistroHandler.GetTargetOs()
    • newAzureLinuxDistroHandler()z
    • NewDistroHandlerFromTargetOs()
    • getFileSystemOptions()
    • GetInstalledTargetOs()
    • TestCreateImageRaw()
    • TestCreateImageBtrfs()
    • TestCreateImageRawNoTar()
    • TestCreateImage_OutputImageFileAsRelativePath()
    • TestValidateCreateImageOutput_AcceptsValidPaths()
    • TestValidateCreateImageConfig_EmptyPackagestoInstall()
    • TestBootCustomizer*() family of tests
  • Create baseImageAzureLinuxCoreEfiAll var containing both azl3 and azl4 core-efi images, to migrate all tests that only test testBaseImageAzl3CoreEfi to test baseImageAzureLinuxCoreEfiAll as well (enabling additional tests)

    • Notes:
      • TestCustomizeImagePackagesUrlSource is always skipped for azl4, since cloud-native-azl4.repo but hasn't yet been added yet, as the repository does not yet exist for azl4.
      • TestCustomizeImagePackagesSnapshotTime, TestCustomizeImagePackagesCliSnapshotTimeOverridesConfigFile, and TestCustomizeImagePackagesSnapshotTimeWithoutPreviewFlagFails are explicitly skipped for azl4, since it doesn't currently support this feature. The feature (added to azl3's tdnf by Microsoft but not upstreamed) would need to be ported to azl4's dnf before we could add support.
  • Add azl4 core-efi image to baseImageAzureLinuxAll (enables a ton of tests that currently test azl3)

  • Split functional tests for AZL in Build (dev) workflow into 4 and 3+2 to enable azl4 testing in main builds

  • No longer skip TestCustomizeImageOverlaysSELinux/AzureLinux3CoreEfi

  • Review notes:

    • New configs were created for azl4 only when changes were backwards-incompatible with azl3 (e.g. kernel version differences)
    • skip_if_unavailable=False is set when refreshing azl4 package metadata to match tdnf behavior in azl3, which errors if repo isn't available (this is explicitly tested for in TestCustomizeImagePackagesBadRepo)
    • We check for systemd-boot-unsigned instead of systemd-boot in validateUkiDependencies() for azl4 because it hasn't been released yet (when released, will converge on using systemd-boot)
    • Switching (again) from unzip to wget in tests since azl4 has unzip installed
  • Follow up tasks:

    • Add package snapshot time support to AZL4's dnf (enables package snapshot time feature)
    • Add cloud-native-azl4.repo when it becomes available (enables additional test coverage)
    • Remove systemd-boot-unsigned for azl4 when systemd-boot becomes available (enables secure boot)
    • Upstream ukify patch (see Patch ukify (AZL3) step in the pipelines)
    • Enable TestCustomizeImageMultiKernel for AZL4 when its repos contain multiple kernels (add the newer kernel to multikernel-azl4.yaml)
    • Remove the workaround to remove grub2-efi-x64/aa64 on AZL4 after upgrade to shim 16.1+ (Fedora 44+)
    • Onboard a bare-metal image for azl4 (when available)
    • Add support for ISO and PXE-* outputs

@vinceaperri vinceaperri requested a review from a team as a code owner April 14, 2026 16:26
Comment thread toolkit/tools/pkg/imagecustomizerlib/baseconfigs_test.go
Comment thread toolkit/tools/pkg/imagecustomizerlib/customizeoverlays_test.go Outdated
Comment thread toolkit/tools/pkg/imagecustomizerlib/customizepackages_test.go Outdated
@liulanze
Copy link
Copy Markdown
Contributor

Please add a PR description for future reference.

Comment thread test/vmtests/vmtests/imagecustomizer/test_min_change.py
Comment thread docs/imagecustomizer/developer-guide.md
@vinceaperri vinceaperri force-pushed the user/vinceaperri/azl4-support branch from f0c4779 to 4c26a66 Compare April 15, 2026 22:59
Comment thread toolkit/tools/pkg/imagecustomizerlib/artifactsinputoutput_test.go Outdated
Comment thread toolkit/tools/pkg/imagecustomizerlib/main_test.go Outdated
Comment thread toolkit/tools/pkg/imagecustomizerlib/main_test.go
Comment thread toolkit/tools/pkg/imagecustomizerlib/distrohandler_fedora.go Outdated
Comment thread toolkit/tools/pkg/imagecustomizerlib/distrohandler_azurelinux.go Outdated
Comment thread toolkit/tools/imagegen/diskutils/filesystem.go
Comment thread toolkit/tools/imagegen/diskutils/filesystem.go Outdated
Comment thread toolkit/tools/pkg/imagecustomizerlib/customizeoverlays_test.go Outdated
vinceaperri and others added 24 commits April 28, 2026 15:59
Co-authored-by: Copilot <copilot@github.com>
…geHelper()

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@vinceaperri vinceaperri force-pushed the user/vinceaperri/azl4-support branch from b8c527c to fbb765e Compare April 28, 2026 15:59
@vinceaperri vinceaperri force-pushed the user/vinceaperri/azl4-support branch from 93c7734 to 9e5289e Compare April 28, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants