Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions base/images/images.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,34 @@ container = false
systemd = true
runtime-package-management = true

# ---- minimal-os --------------------------------------------------------

[images.minimal-os]
description = "Minimal OS Image"
definition = { type = "kiwi", path = "minimal-os/minimal-os.kiwi", profile = "minimal-os" }
tests.test-suites = [
{ name = "static-image-checks" },
]

[images.minimal-os.capabilities]
machine-bootable = true
container = false
systemd = true
runtime-package-management = true

[images.minimal-os-dev]
description = "Minimal OS Image (dev)"
definition = { type = "kiwi", path = "minimal-os/minimal-os.kiwi", profile = "minimal-os-dev" }
tests.test-suites = [
{ name = "static-image-checks" },
]

[images.minimal-os-dev.capabilities]
machine-bootable = true
container = false
systemd = true
runtime-package-management = true

# ---- container-base (core profile) -------------------------------------
[images.container-base]
description = "Container Base Image"
Expand Down
144 changes: 144 additions & 0 deletions base/images/minimal-os/minimal-os.kiwi
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="https://raw.githubusercontent.com/OSInside/kiwi/refs/tags/v10.2.33/kiwi/schema/kiwi.rng" type="application/xml"?>
<image schemaversion="8.3" name="azl4-minimal-os">
<description type="system">
<author>Azure Linux</author>
<contact>azurelinux@microsoft.com</contact>
<specification>Azure Linux Minimal OS Image</specification>
</description>
<!--
Build profiles: select "minimal-os" or "minimal-os-dev" to ship
azurelinux-repos or azurelinux-repos-dev respectively. That controls
which package repository the image uses at runtime.
-->
<profiles>
<profile name="minimal-os" description="Ships azurelinux-repos (runtime → PMC beta)" import="false" />
<profile name="minimal-os-dev" description="Ships azurelinux-repos-dev (runtime → azl4-dev)" import="false" />
</profiles>
<preferences arch="x86_64">
<version>0.1</version>
<packagemanager>dnf5</packagemanager>
<locale>en_US</locale>
<keytable>us</keytable>
<timezone>UTC</timezone>
<release-version>4.0</release-version>
<type
image="oem"
format="vhd-fixed"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this need to be VHD fixed? It looks like 3.0 used a VHDX, which is generally preferred.

formatoptions="force_size"
initrd_system="dracut"
filesystem="ext4"
fscreateoptions="-m 1"
kernelcmdline="console=ttyS0 earlyprintk=ttyS0 rd.shell=0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should there be any kernel command line baked in? I don't see evidence of one in 3.0.

firmware="uefi"
overlayroot="false"
eficsm="false"
bootpartition="false"
efipartsize="200"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like the 3.0 layout was extremely minimal (i see indication of the ESP being tiny in 3.0) since it's only expected to be used as a base image for customization and not a readily deployable OS itself. Should we be following suit?

rootfs_label="azurelinux">
<bootloader name="grub2" bls="true" console="serial" timeout="1" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to kernel config, should we omit bootloader configs from the definition?

<size unit="G">5</size>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See above regarding partition layout.

<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
</type>
</preferences>

<preferences arch="aarch64">
<version>0.1</version>
<packagemanager>dnf5</packagemanager>
<locale>en_US</locale>
<keytable>us</keytable>
<timezone>UTC</timezone>
<release-version>4.0</release-version>
<type
image="oem"
format="vhd-fixed"
formatoptions="force_size"
initrd_system="dracut"
filesystem="ext4"
fscreateoptions="-m 1"
kernelcmdline="console=ttyAMA0 earlyprintk=ttyAMA0 rd.shell=0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note: if we remove the kernel command line, I assume we can collapse the 2 arch-specific <preferences/> sections.

firmware="uefi"
overlayroot="false"
eficsm="false"
bootpartition="false"
efipartsize="200"
rootfs_label="azurelinux">
<bootloader name="grub2" bls="true" console="serial" timeout="1" />
<size unit="G">5</size>
<oemconfig>
<oem-resize>false</oem-resize>
</oemconfig>
</type>
</preferences>

<!--
Single build-time repository (azl4-dev) for both variants —
koji overrides this for distro builds; for local builds this
is the only blob currently populated for AZL4. The variant
only affects which `azurelinux-repos*` package ships, NOT
where build-time RPMs come from.
-->
<repository type="rpm-md" alias="azurelinux-base">
<source
path="https://packages.microsoft.com/azurelinux/4.0/beta/base/$basearch" />
</repository>

<packages type="image">
<package name="azurelinux-release" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our VM, WSL, and container images use a more specific subpackage of azurelinux-release to get the right variant metadata in os-release. What's the plan for how this will work for images derived from the minimal OS image?

<package name="bash" />
<package name="ca-certificates" />
<package name="dbus" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My understanding is that dbus has fallen out of favor and dbus-broker is the preferred implementation. Can we confirm what's in our VM image and which is the correct one to use here?

<package name="dnf5" />
<package name="e2fsprogs" />
<package name="grub2" />
<package name="glibc-langpack-en" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the trade-off between including glibc-langpack-en vs. glibc-minimal-langpack in the minimal OS image? Will Image Customizer swap it out anyway with the desired langpack?

<package name="iproute" />
<package name="iputils" />
<package name="irqbalance" />
<package name="kernel" />
<package name="ncurses-libs" />
<package name="openssl" />
<package name="rpm" />
<package name="shadow-utils" />
<package name="sudo" />
<package name="systemd" />
<package name="systemd-networkd" />
<package name="systemd-resolved" />
<package name="systemd-udev" />
<package name="util-linux" />
<package name="zlib" />
</packages>

<!--
Variant-scoped repos package: governs the .repo files written
into /etc/yum.repos.d/ in the built image (runtime). The two
packages conflict, so they're separated into per-variant
sections rather than relying on the variant's bootstrap section.
-->
<packages type="image" profiles="minimal-os-dev">
<package name="azurelinux-repos-dev" />
</packages>
<packages type="image" profiles="minimal-os">
<package name="azurelinux-repos" />
</packages>

<packages type="bootstrap">
<package name="azurelinux-release" />
<package name="filesystem" />
<package name="grub2-efi-x64-modules" arch="x86_64" />
<package name="grub2-efi-x64" arch="x86_64" />
<package name="grub2-efi-aa64-modules" arch="aarch64" />
<package name="grub2-efi-aa64" arch="aarch64" />
<package name="shim" arch="x86_64" />
<package name="shim" arch="aarch64" />
</packages>

<packages type="bootstrap" profiles="minimal-os-dev">
<package name="azurelinux-repos-dev" />
</packages>
<packages type="bootstrap" profiles="minimal-os">
<package name="azurelinux-repos" />
</packages>
</image>
Loading