Skip to content

feat(build): replace broken Containerfile with osbuild blueprint#92

Merged
mrhillsman merged 1 commit into
mainfrom
feat/osbuild-golden-image
May 24, 2026
Merged

feat(build): replace broken Containerfile with osbuild blueprint#92
mrhillsman merged 1 commit into
mainfrom
feat/osbuild-golden-image

Conversation

@mrhillsman

Copy link
Copy Markdown
Contributor

The previous golden image build used FROM quay.io/containerdisks/fedora:41 and ran dnf install — this fails because containerdisk images are minimal OCI wrappers around a qcow2 file with no rootfs or package manager.

Switch to a two-stage build: image-builder (osbuild) produces a Fedora 41 qcow2 from a declarative TOML blueprint, then podman packages it as a KubeVirt containerdisk. This gives developers a version-controlled package manifest they can extend for custom workloads.

image-builder uses variant-qualified type names (generic-qcow2, not bare qcow2) and does not ship fedora-41 manifests. Default to fedora-42 with generic-qcow2, and expose IMAGE_TYPE as an env var.

Resolves #91

The previous golden image build used FROM quay.io/containerdisks/fedora:41
and ran dnf install — this fails because containerdisk images are minimal
OCI wrappers around a qcow2 file with no rootfs or package manager.

Switch to a two-stage build: image-builder (osbuild) produces a Fedora 41
qcow2 from a declarative TOML blueprint, then podman packages it as a
KubeVirt containerdisk. This gives developers a version-controlled package
manifest they can extend for custom workloads.

image-builder uses variant-qualified type names (generic-qcow2, not
bare qcow2) and does not ship fedora-41 manifests. Default to
fedora-42 with generic-qcow2, and expose IMAGE_TYPE as an env var.

Resolves #91

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
@exe-prow-github-app
exe-prow-github-app Bot requested a review from OchiengEd May 24, 2026 06:11
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrhillsman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2026
@mrhillsman
mrhillsman removed the request for review from OchiengEd May 24, 2026 06:12
@mrhillsman

Copy link
Copy Markdown
Contributor Author

Summary

~/Development/goland/virtwork/build/golden-image feat/osbuild-golden-image 5s                                                                                                                         01:05:30 AM
❯ PUSH=true ./build.sh
image-builder requires root privileges for disk image assembly.
Re-executing with sudo...
Building golden disk image: quay.io/opdev/virtwork-disk:latest
======================================================
Distro:    fedora-42
Type:      generic-qcow2
Blueprint: /home/mrhillsman/Development/goland/virtwork/build/golden-image/blueprint.toml
Output:    /tmp/tmp.7nnuf6d5aN

[|] Image building step
[6 / 6] Pipeline qcow2 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00%
[2 / 2] Stage org.osbuild.qemu [------------------------------------------------------------------------------------------------------------------------------------------------------------------------>] 100.00%
Message: Finished pipeline qcow2
Image build successful: /tmp/tmp.7nnuf6d5aN/fedora-42-generic-qcow2-x86_64.qcow2

qcow2 produced: fedora-42-generic-qcow2-x86_64.qcow2 (970M)

Packaging as containerdisk...
STEP 1/3: FROM scratch
STEP 2/3: LABEL io.k8s.display-name="virtwork-disk"       io.k8s.description="Fedora container disk with virtwork workload tools pre-installed"       summary="Container disk for virtwork with CPU, memory, database, network, and disk tools"       description="Pre-built Fedora container disk with stress-ng, fio, iperf3, postgresql-server, and chaos engineering tools for faster VM boot times"       name="virtwork-disk"       version="1.0"       maintainer="Red Hat Ecosystem Engineering"
--> Using cache e9be4e0c0f6f42bb88fae04f441856d9a0510cd7498e77b80df4b95075f1f12a
--> e9be4e0c0f6f
STEP 3/3: COPY --chown=107:107 *.qcow2 /disk/disk.qcow2
COMMIT quay.io/opdev/virtwork-disk:latest
--> 0656fc91cea7
Successfully tagged quay.io/opdev/virtwork-disk:latest
0656fc91cea75b870912e7a15e5853c807c5875fb6d1c4b4b806c2f8d10bc13e

Image built successfully: quay.io/opdev/virtwork-disk:latest

Pushing image to registry...
Getting image source signatures
Copying blob 0da0653e2d26 done   | 
Copying config 0656fc91ce done   | 
Writing manifest to image destination
Image pushed successfully

======================================================
Build complete!
Image: quay.io/opdev/virtwork-disk:latest

To push this image to the registry, run:
  PUSH=true ./build.sh

To use a custom registry, run:
  REGISTRY=my.registry.io ./build.sh

@mrhillsman
mrhillsman merged commit 363e2f7 into main May 24, 2026
3 of 4 checks passed
@mrhillsman
mrhillsman deleted the feat/osbuild-golden-image branch May 24, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Replace golden image build with osbuild blueprint

1 participant