You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc/ephemeral: Describe how to detect the environment
`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 <[email protected]>
bcvk ephemeral run --memory 4096 --cpus 4 --name myvm quay.io/fedora/fedora-bootc:42
23
23
```
24
24
25
+
## Detecting an ephemeral environment
26
+
27
+
Conceptually now with `bcvk ephemeral`, there's *four* different ways to run
28
+
a bootc container:
29
+
30
+
-`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.
31
+
-`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.
32
+
-`bootc install` - Run directly on metal or a virtualized environment. Uses the kernel in the container.
33
+
-`bcvk ephemeral` - Run as a virtual machine, but *not* a true "bootc install". Uses the kernel in the container.
34
+
35
+
Some systemd units may need adaption to work in all of these modes. For example, if you have a systemd generator
36
+
which synthesizes mount units for expected partitions, it can use `ConditionVirtualization=!container` to skip
37
+
those in the first two cases (ensuring it still runs after a `bootc install`), but that won't be skipped in `bcvk ephemeral`
38
+
even though there won't be any block devices (by default).
39
+
40
+
At the current time there is not a dedicated way to detect `bcvk ephemeral`, but `ConditionKernelCommandLine=!rootfstype=virtiofs`
0 commit comments