Skip to content

Add image_to_install cli option - #314

Open
Johan-Liebert1 wants to merge 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:img-to-install-cli-opt
Open

Add image_to_install cli option#314
Johan-Liebert1 wants to merge 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:img-to-install-cli-opt

Conversation

@Johan-Liebert1

@Johan-Liebert1 Johan-Liebert1 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

We bind mount host container storage into an ephemeral VM in order to
create a base disk. This has the unfortunate effect of changing the
manifest digest of the final image.

#313 tried to address this by
first exporting to OCI dir, then installing, but that too changes the
final manifest digest.

With the image_to_install option, we can pass docker://quay.io/...
as the image to be installed which will have the correct manifest digest
as we are pulling directly from the registry.

Also, we might need networking to pull an image from a registry, so we
pass --net=host to the podman command if the transport is registry

We do depend on skopeo with this change as we can't use podman to query
remote registry image manifests

Fixes: #307

@Johan-Liebert1
Johan-Liebert1 force-pushed the img-to-install-cli-opt branch 2 times, most recently from 6e9f5f1 to 5a9f1eb Compare August 13, 2026 11:23
@Johan-Liebert1

Copy link
Copy Markdown
Contributor Author

Tests running into some user ns issue on Github CI. Possibly something to do with skopeo interaction with containers storage

Comment thread crates/kit/src/to_disk.rs
Comment thread crates/kit/src/to_disk.rs
Comment thread crates/kit/src/to_disk.rs Outdated
@gursewak1997

Copy link
Copy Markdown
Collaborator

Every test_to_base_disk_* test fails with Invalid transport: quay.io/centos-bootc/centos-bootc. The issue is that --source-imgref is now passed unconditionally, but without --image-to-install the fallback image name has no transport prefix (e.g., containers-storage: or docker://).

@cgwalters

Copy link
Copy Markdown
Collaborator

With the image_to_install option, we can pass docker://quay.io/...
as the image to be installed which will have the correct manifest digest
as we are pulling directly from the registry.

I don't think we should justify this change because of digests. Again, this is something to fix in bootc.

That aside, yes we should make it easier to support --source-imgref testing in bcvk. But as far as I can think of there's really no strong reason to use it other than CI testing simulating anaconda-style installs.

(And rather than simulating we should make it easier to actually do anaconda installs w/bcvk I think)

@Johan-Liebert1

Johan-Liebert1 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

I don't think we should justify this change because of digests. Again, this is something to fix in bootc.

the main issue seems to have been not passing the --source-imgref option to bootc install cmd which was prompting it to pick up the virtiofs mount image. Should I revert the cli option and only keep the --source-imgref option addition.

Edit:
The option is also for installing a separate image than the one we're running inside of and not just about the manifest digest itself.

We bind mount host container storage into an ephemeral VM in order to
create a base disk. This has the unfortunate effect of changing the
manifest digest of the final image.

bootc-dev#313 tried to address this by
first exporting to OCI dir, then installing, but that too changes the
final manifest digest.

With the `image_to_install` option, we can pass `docker://quay.io/...`
as the image to be installed which will have the correct manifest digest
as we are pulling directly from the registry.

Also, we might need networking to pull an image from a registry, so we
pass `--net=host` to the podman command if the transport is registry

We do depend on skopeo with this change as we can't use podman to query
remote registry image manifests

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Was using for the `Transport` enum, but it has some linux specific
functions which breaks MacOs builds

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
skopeo inspect requires unshare which fails in unprivileged CI
environments. For local images (from containers-storage), use
podman image inspect instead, and only fall back to skopeo
for remote transports like docker://

Also, fix `libvirt to-disk` command by making sure image has a transport
attached to it as now we're passing `--source-imgref` to bootc install

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1
Johan-Liebert1 force-pushed the img-to-install-cli-opt branch from 2a833df to ee9ada5 Compare August 19, 2026 07:39
alicefr added a commit to alicefr/bink that referenced this pull request Aug 19, 2026
Currently, there is a bug in bcvk/bootc where the remote digest isn't
properly reported and this cause a failure in bootc-operator CI since
the remote digest doesn't match with the one reported by bootc status.

A temporary fix is available at
bootc-dev/bcvk#314 and we now build bcvk from
that branch.

Signed-off-by: Alice Frosi <afrosi@redhat.com>
alicefr added a commit to bootc-dev/bink that referenced this pull request Aug 20, 2026
Currently, there is a bug in bcvk/bootc where the remote digest isn't
properly reported and this cause a failure in bootc-operator CI since
the remote digest doesn't match with the one reported by bootc status.

A temporary fix is available at
bootc-dev/bcvk#314 and we now build bcvk from
that branch.

Signed-off-by: Alice Frosi <afrosi@redhat.com>
@cgwalters

Copy link
Copy Markdown
Collaborator

#324 has the pure revert that was also included here.

The option is also for installing a separate image than the one we're running inside of and not just about the manifest digest itself.

But why would one want to do that?

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

3 participants