doc/ephemeral: Describe how to detect the environment#101
Merged
cgwalters merged 2 commits intobootc-dev:mainfrom Oct 29, 2025
Merged
doc/ephemeral: Describe how to detect the environment#101cgwalters merged 2 commits intobootc-dev:mainfrom
cgwalters merged 2 commits intobootc-dev:mainfrom
Conversation
TODO: Add a gating CI check for this. Signed-off-by: Colin Walters <walters@verbum.org>
`bcvk to-disk quay.io/fedora/fedora-coreos` is broken because it has a generator that fails in this environment. Signed-off-by: Colin Walters <walters@verbum.org>
There was a problem hiding this comment.
Code Review
This pull request adds documentation about detecting the bcvk ephemeral environment, which is useful for adapting systemd units. It also documents the --env option for bcvk ephemeral run and bcvk ephemeral run-ssh. The changes are clear and helpful. I've suggested a few minor wording improvements in ephemeral-run.md to enhance clarity and fix some grammatical points.
Comment on lines
+27
to
+41
| Conceptually now with `bcvk ephemeral`, there's *four* different ways to run | ||
| a bootc container: | ||
|
|
||
| - `podman|docker run <image> bash` - directly run a shell (or other process) the container without systemd. Uses the host kernel, not kernel in the container. | ||
| - `podman|docker run <image>` - by default runs systemd. See also <https://docs.fedoraproject.org/en-US/bootc/provisioning-container/>. Uses the host kernel, not kernel in the container. | ||
| - `bootc install` - Run directly on metal or a virtualized environment. Uses the kernel in the container. | ||
| - `bcvk ephemeral` - Run as a virtual machine, but *not* a true "bootc install". Uses the kernel in the container. | ||
|
|
||
| Some systemd units may need adaption to work in all of these modes. For example, if you have a systemd generator | ||
| which synthesizes mount units for expected partitions, it can use `ConditionVirtualization=!container` to skip | ||
| those in the first two cases (ensuring it still runs after a `bootc install`), but that won't be skipped in `bcvk ephemeral` | ||
| even though there won't be any block devices (by default). | ||
|
|
||
| At the current time there is not a dedicated way to detect `bcvk ephemeral`, but `ConditionKernelCommandLine=!rootfstype=virtiofs` | ||
| should work reliably in the future. |
There was a problem hiding this comment.
This new section is very helpful! I have a few suggestions to improve grammar, spelling, and clarity:
- On line 27, "there's" should be "there are" since it refers to multiple items.
- On line 35, "adaption" should be "adaptation".
- The final sentence on lines 40-41 is a bit tentative ("should work reliably in the future"). If this is the recommended method now, we could phrase it more confidently and explain its purpose.
Here's a suggested revision for the whole section that incorporates these points:
Suggested change
| Conceptually now with `bcvk ephemeral`, there's *four* different ways to run | |
| a bootc container: | |
| - `podman|docker run <image> bash` - directly run a shell (or other process) the container without systemd. Uses the host kernel, not kernel in the container. | |
| - `podman|docker run <image>` - by default runs systemd. See also <https://docs.fedoraproject.org/en-US/bootc/provisioning-container/>. Uses the host kernel, not kernel in the container. | |
| - `bootc install` - Run directly on metal or a virtualized environment. Uses the kernel in the container. | |
| - `bcvk ephemeral` - Run as a virtual machine, but *not* a true "bootc install". Uses the kernel in the container. | |
| Some systemd units may need adaption to work in all of these modes. For example, if you have a systemd generator | |
| which synthesizes mount units for expected partitions, it can use `ConditionVirtualization=!container` to skip | |
| those in the first two cases (ensuring it still runs after a `bootc install`), but that won't be skipped in `bcvk ephemeral` | |
| even though there won't be any block devices (by default). | |
| At the current time there is not a dedicated way to detect `bcvk ephemeral`, but `ConditionKernelCommandLine=!rootfstype=virtiofs` | |
| should work reliably in the future. | |
| Conceptually now with `bcvk ephemeral`, there are *four* different ways to run | |
| a bootc container: | |
| - `podman|docker run <image> bash` - directly run a shell (or other process) the container without systemd. Uses the host kernel, not kernel in the container. | |
| - `podman|docker run <image>` - by default runs systemd. See also <https://docs.fedoraproject.org/en-US/bootc/provisioning-container/>. Uses the host kernel, not kernel in the container. | |
| - `bootc install` - Run directly on metal or a virtualized environment. Uses the kernel in the container. | |
| - `bcvk ephemeral` - Run as a virtual machine, but *not* a true "bootc install". Uses the kernel in the container. | |
| Some systemd units may need adaptation to work in all of these modes. For example, if you have a systemd generator | |
| which synthesizes mount units for expected partitions, it can use `ConditionVirtualization=!container` to skip | |
| those in the first two cases (ensuring it still runs after a `bootc install`), but that won't be skipped in `bcvk ephemeral` | |
| even though there won't be any block devices (by default). | |
| At the current time there is not a dedicated way to detect `bcvk ephemeral`, but `ConditionKernelCommandLine=!rootfstype=virtiofs` | |
| should work reliably. |
cgwalters
added a commit
to cgwalters/fedora-coreos-config
that referenced
this pull request
Oct 29, 2025
See bootc-dev/bcvk#101 This also is needed to eventually make FCOS work with `bcvk to-disk`. Signed-off-by: Colin Walters <walters@verbum.org>
jeckersb
approved these changes
Oct 29, 2025
cgwalters
added a commit
to coreos/fedora-coreos-config
that referenced
this pull request
Oct 30, 2025
See bootc-dev/bcvk#101 This also is needed to eventually make FCOS work with `bcvk to-disk`. Signed-off-by: Colin Walters <walters@verbum.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bcvk to-disk quay.io/fedora/fedora-coreosis brokenbecause it has a generator that fails in this environment.