Skip to content

Add support for oci format for disk images#2973

Open
schaefi wants to merge 1 commit intomainfrom
oem_oci_format
Open

Add support for oci format for disk images#2973
schaefi wants to merge 1 commit intomainfrom
oem_oci_format

Conversation

@schaefi
Copy link
Collaborator

@schaefi schaefi commented Mar 15, 2026

The oci:... format is a special case that allows you to create an OCI-compliant container from a specified reference container. The created container image has the actual disk image added as a new layer. The specification of the oci:image_format:container_transport format contains two parts separated by a colon. The first part specifies one of the above disk formats or just "raw" if the disk should be stored as raw disk inside of the container. The second part specifies one of the supported skopeo container transport formats, for details see the skopeo man page. This format is particularly useful for building an image which bundles the actual disk image and its runtime requirements into one artifact.

The oci:... format is a special case that allows you to create an
OCI-compliant container from a specified reference container. The
created container image has the actual disk image added as a new layer.
The specification of the oci:image_format:container_transport format
contains two parts separated by a colon. The first part specifies
one of the above disk formats or just "raw" if the disk should be
stored as raw disk inside of the container. The second part specifies
one of the supported skopeo container transport formats, for
details see the skopeo man page. This format is particularly useful
for building an image which bundles the actual disk image and its
runtime requirements into one artifact.
@schaefi schaefi requested a review from Conan-Kudo March 15, 2026 19:00
@schaefi schaefi self-assigned this Mar 15, 2026
@schaefi
Copy link
Collaborator Author

schaefi commented Mar 15, 2026

I saw several people running VMs from containers, e.g. the anaconda build process running a boxbuild in a container. There are also other use cases from users who bundle the actual runtime for a VM in a container. I find this really useful and want to support the building of such images in a native way by adding a new format type for disk images.

@Conan-Kudo
Copy link
Member

So I'm a little confused, is this wrapping a disk image as an OCI archive artifact to push into a registry?

@schaefi schaefi requested a review from davidcassany March 15, 2026 19:05
@schaefi
Copy link
Collaborator Author

schaefi commented Mar 15, 2026

So I'm a little confused, is this wrapping a disk image as an OCI archive artifact to push into a registry?

yes you can do that as well. It would however also be possible to specify a <containerconfig> element and place an entry command which starts the disk image via e.g qemu when you launch the container. So several use cases are possible.

The integration test only does what you described though. The integration test uses the super small alpine container as a reference container, places the built disk image into it and creates a new container as an additional layer to the base. The result is basically only useful as a data container to push to some registry. But you could also think of using the latest qemu container instead of alpine and add the image to this reference. So you would bundle the runtime with the VM image and could launch it when you start the container instance... and maybe more

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.

2 participants