Skip to content

Add Azure Linux 3 guest support - #110

Open
Íñigo Goiri (goiri) with Copilot wants to merge 16 commits into
devfrom
copilot/microsoft-nvx-109-support-azure-linux
Open

Íñigo Goiri (goiri) with Copilot wants to merge 16 commits into
devfrom
copilot/microsoft-nvx-109-support-azure-linux

Conversation

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

NVX currently builds an Alpine initramfs exclusively. This change adds Azure Linux 3 as an additional guest option while preserving Alpine defaults.

  • Guest selection

    • Add Azure Linux 3 to initramfs and guest-build configuration.
    • Keep Alpine as the default guest.
  • Azure Linux rootfs

    • Build the guest from the public, digest-pinned Azure Linux 3 base image.
    • Install the guest runtime utilities and emit an initramfs package manifest.
  • Coverage

    • Add focused CLI and Docker-target tests.

Copilot AI self-assigned this Sep 18, 2026
Copilot AI balanced review requested due to automatic review settings September 18, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI linked an issue Sep 18, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add support for Azure Linux alongside Alpine Linux Add Azure Linux 4 guest support Sep 18, 2026
@goiri Íñigo Goiri (goiri) changed the title Add Azure Linux 4 guest support Add Azure Linux 3 guest support Sep 18, 2026
@goiri

Copy link
Copy Markdown

Azure Linux 4 is in beta, switching to 3:
https://mcr.microsoft.com/en-us/artifact/mar/azurelinux/base/core/tag/3.0
Repository: azurelinux/base/core
Tag: 3.0
Type: application/vnd.docker.distribution.manifest.list.v2+json
Digest: sha256:34a22db497ff34a0f35ca5fc54bd38711d04238a2c1b2f65d35dc9d45dd82584

Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Azure Linux build omits its kernel, while its launcher and package manifest are incompatible with the new rootfs.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

docker/Dockerfile:99

  • build-guest --guest azurelinux selects this target, but build_docker_artifacts() subsequently requires both vmlinux and initramfs.cpio.gz. A clean build therefore always fails for a missing kernel; an existing destination can instead mask this by reusing a stale kernel. Export the kernel artifacts from this combined target as the Alpine artifacts target does.
FROM scratch AS azurelinux-artifacts
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz /initramfs.cpio.gz
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz.packages.json /initramfs.cpio.gz.packages.json

docker/Dockerfile:80

  • This manifest is incompatible with the existing release-source pipeline: collect_alpine_sources._load_packages() indexes every package as an object with name and version, while this emits four strings, so collect-sources fails after an Azure Linux build. It also omits packages already present in the base image and transitive installs. Generate an installed-RPM inventory with metadata and make source collection distribution-aware.
        '  "packages": ["e2fsprogs", "iproute", "net-tools", "util-linux"],' \
  • Files reviewed: 7/7 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread docker/Dockerfile Outdated
Comment thread scripts/nvx.py Outdated
Comment thread scripts/nvx_tools/build.py
Comment thread scripts/test_nvx_tools.py Outdated
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Azure Linux image omits required runtime tools and retains an unavailable BusyBox error path.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

docker/Dockerfile:64

  • The copied init script still calls /bin/busybox reboot -f in fatal(), but Azure Linux base/core does not provide BusyBox and this stage does not install it. Any early boot error therefore reaches a missing command and exits PID 1 instead of reporting the VM exit status. Patch this call to the installed nvx-exit helper (or make init distro-neutral).
    install -m 0755 /tmp/nvx/init /rootfs/init; \
    sed -i 's/ || mdev -s/ || exit 1/' /rootfs/init; \
  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread docker/Dockerfile Outdated
@goiri

Copy link
Copy Markdown

Copilot #116 got merged; rebase and make the changes based on it

Copilot AI and others added 2 commits September 22, 2026 17:33
…109-support-azure-linux

# Conflicts:
#	.github/actions/check-quality/action.yml
#	SOURCE-MANIFEST.json
#	doc/usage.md
#	docker/Dockerfile
#	guest/common/nvx-container-enter-azurelinux
#	scripts/nvx.py
#	scripts/nvx_tools/build.py
#	scripts/nvx_tools/release.py
#	scripts/test_nvx_tools.py

Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 17:36
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Copilot AI and others added 2 commits September 22, 2026 17:41
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Azure Linux cannot currently boot successfully, and release packaging, artifact selection, image-pin enforcement, and package manifests remain incomplete.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 High severity · 2 Medium severity

Open (4)
Resolved since last review (2)

Comment thread docker/Dockerfile
COPY --from=azurelinux-helpers /out/ /rootfs/sbin/
COPY --from=base /bin/busybox /rootfs/bin/busybox
RUN set -eux; \
install -m 0755 /repo/guest/common/init /rootfs/init; \
Comment thread scripts/nvx.py Outdated
Comment on lines +1189 to +1190
"guest_sources": ["guest/common"],
"package_manifests": ["build/initramfs-azurelinux.cpio.gz.packages.json"],
Copilot AI review requested due to automatic review settings September 22, 2026 17:45
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>

Copilot AI commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Copilot #116 got merged; rebase and make the changes based on it

Done — merged dev (with PR #116's Ubuntu guest support) into this branch and reconciled the Azure Linux integration with the new GuestDescriptor/guest-build architecture. Verified with the full test_nvx_tools.py suite, ruff, pyright, and shellcheck/shfmt.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Azure boot and managed-lifecycle paths are broken, with additional CI, release, provenance, and build-validation gaps.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 High severity · 1 Medium severity

Open (4)
Resolved since last review (1)

Comment thread docker/Dockerfile Outdated
Copilot AI review requested due to automatic review settings September 22, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Azure guests cannot boot correctly, and release, provenance, runtime, and CI integration remain incomplete.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 4 High severity · 2 Medium severity

Open (6)
Previously missed (1)

In code that hasn't changed since last review

Medium severity CI does not build, upload, or smoke-test Azure guest artifacts

docker/​Dockerfile:125

No CI path actually builds this new Docker target. .github/actions/build-guest-artifacts/action.yml only builds/caches Alpine and Ubuntu, and .github/workflows/ci.yml:151-166 uploads the same set; the added unit test mocks Docker execution. Add Azure artifact build/cache/upload steps and an Azure guest boot/identity smoke test so Dockerfile or runtime regressions are detected.

initramfs_name="initramfs-azurelinux.cpio.gz",
package_manifest_format="azurelinux-v1",
default_memory_mib=128,
boot_marker=b"NVX-GUEST-BOOT-OK: azurelinux",
Comment on lines +77 to +78
descriptor.name: descriptor
for descriptor in (ALPINE_GUEST, UBUNTU_GUEST, AZURELINUX_GUEST)
Copilot AI and others added 2 commits September 22, 2026 21:04
…109-support-azure-linux

# Conflicts:
#	scripts/nvx.py
#	scripts/nvx_tools/build.py

Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical workload-launch failure and unresolved runtime, release, bundling, reproducibility, and test-coverage issues block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 High severity · 3 Medium severity

Open (6)
Resolved since last review (2)

Comment thread docker/Dockerfile
Comment on lines +87 to +89
for utility in awk chroot ifconfig ip mdev mount ping blkid losetup mkfs.ext4 mountpoint flock unshare; do \
ln -sf busybox "/rootfs/bin/$utility"; \
done; \
Comment on lines +1191 to +1192
"guest_sources": ["guest/common"],
"package_manifests": ["build/initramfs-azurelinux.cpio.gz.packages.json"],
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.

Support Azure Linux 3

3 participants