Skip to content

to-disk: Export to OCI layout for composefs-backend installs - #313

Merged
Johan-Liebert1 merged 1 commit into
mainfrom
bcvk307
Aug 12, 2026
Merged

to-disk: Export to OCI layout for composefs-backend installs#313
Johan-Liebert1 merged 1 commit into
mainfrom
bcvk307

Conversation

@gursewak1997

@gursewak1997 gursewak1997 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

When using additionalimagestore via virtiofs, the containers-storage library in the VM reconstructs OCI manifests with uncompressed layer digests, producing a different manifest hash than the original. This breaks bootc-operator verification and bootc status/bootc upgrade for composefs-backend installs where the manifest digest is the primary image identifier.

For composefs-backend installs, export the image to an OCI layout on the host via podman push (preserving the original manifest), share it into the VM via virtiofs, and pass --source-imgref oci:/path:latest to bootc install to-disk so bootc reads directly from the OCI layout. Non-composefs installs are unchanged and keep the fast zero-copy path.

  • No new dependencies — uses podman push (already required) on the host
  • No intermediate copy in the VM — bootc reads the OCI layout directly via virtiofs
  • Disk file is cleaned up if the OCI export fails

Closes: #307

@Johan-Liebert1 Johan-Liebert1 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.

Looks good overall. One comment though

Comment thread crates/kit/src/to_disk.rs Outdated
mount -t virtiofs mount_ociimage ${{OCI}} -o ro
fi
echo "Importing image from OCI layout..."
skopeo copy oci:${{OCI}}:latest {source_imgref}

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.

We can install from this without copying right? bootc install ... --source-imgref oci:${{OCI}}
Should be a bit faster than copying it using skopeo

When using `additionalimagestore` via virtiofs, the containers-storage
library in the VM reconstructs OCI manifests with uncompressed layer
digests, producing a different manifest hash than the original. This
breaks bootc-operator verification and `bootc status`/`bootc upgrade`
for composefs-backend installs where the manifest digest is the primary
image identifier.

For composefs-backend installs, export the image to an OCI layout on the
host via `podman push` (preserving the original manifest), share it into
the VM via virtiofs, and import it into local containers-storage via
`skopeo copy` before running `bootc install`. The locally-imported image
takes precedence over the additionalimagestore copy. Non-composefs
installs are unchanged and keep the fast zero-copy path.

Closes: #307

Assisted-by: AI
Signed-off-by: gursewak1997 <gursmangat@gmail.com>
@Johan-Liebert1
Johan-Liebert1 merged commit 9005a61 into main Aug 12, 2026
14 of 19 checks passed
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.

[composefs-backend]: Install to-disk produces incorrect manifest digest

2 participants