summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/build-profiles.md66
1 files changed, 65 insertions, 1 deletions
diff --git a/docs/build-profiles.md b/docs/build-profiles.md
index 602d11b9..15c4a9cf 100644
--- a/docs/build-profiles.md
+++ b/docs/build-profiles.md
@@ -17,9 +17,21 @@ meta-virt-host.conf <- base (always required first)
17 container-host-containerd.conf 17 container-host-containerd.conf
18 container-host-k3s.conf 18 container-host-k3s.conf
19 container-host-k3s-node.conf 19 container-host-k3s-node.conf
20 container-host-incus.conf
20 xen-host.conf <- Xen support (composable) 21 xen-host.conf <- Xen support (composable)
21meta-virt-dev.conf <- QEMU dev settings (opt-in) 22meta-virt-dev.conf <- QEMU dev settings (opt-in)
22container-registry.conf <- registry config (opt-in) 23container-registry.conf <- registry config (opt-in)
24
25Distro configs:
26 vruntime.conf <- minimal VM rootfs (BBMASK, busybox init)
27 vcontainer.conf <- OCI image builder (no BBMASK, full packages)
28 both share: vruntime-base.inc <- stripped DISTRO_FEATURES, opted-out features
29
30Multiconfigs (set by meta-virt-host.conf):
31 vruntime-aarch64 <- vdkr/vpdmn VM rootfs builds
32 vruntime-x86-64
33 container-aarch64 <- OCI container image builds
34 container-x86-64
23``` 35```
24 36
25## Quick Start 37## Quick Start
@@ -80,7 +92,11 @@ The foundation for all virtualization work. Must be included first.
80**Sets:** 92**Sets:**
81- `DISTRO_FEATURES:append = " virtualization systemd seccomp vmsep vcontainer"` 93- `DISTRO_FEATURES:append = " virtualization systemd seccomp vmsep vcontainer"`
82- `PREFERRED_PROVIDER_virtual/runc ?= "runc"` 94- `PREFERRED_PROVIDER_virtual/runc ?= "runc"`
83- `BBMULTICONFIG ?= "vruntime-aarch64 vruntime-x86-64"` 95- `BBMULTICONFIG ?= "vruntime-aarch64 vruntime-x86-64 container-aarch64 container-x86-64"`
96
97The `vruntime-*` multiconfigs use the `vruntime` distro (BBMASK for minimal VM
98rootfs). The `container-*` multiconfigs use the `vcontainer` distro (no BBMASK,
99full OCI tooling available) for building multi-arch container images.
84 100
85**Use standalone** for custom/mixed configurations where you want to set 101**Use standalone** for custom/mixed configurations where you want to set
86CONTAINER_PROFILE and other variables manually. 102CONTAINER_PROFILE and other variables manually.
@@ -174,6 +190,54 @@ CONTAINER_REGISTRY_SECURE = "1"
174CONTAINER_REGISTRY_USERNAME = "myuser" 190CONTAINER_REGISTRY_USERNAME = "myuser"
175``` 191```
176 192
193## Multi-Architecture Container Images
194
195The `container-aarch64` and `container-x86-64` multiconfigs build OCI
196container images using the `vcontainer` distro. This distro shares the same
197stripped `DISTRO_FEATURES` as `vruntime` (via `vruntime-base.inc`) but
198without the BBMASK that blocks OCI tooling like umoci.
199
200### Build Commands
201
202```bash
203# Single-arch container image
204bitbake mc:container-x86-64:container-base
205
206# Multi-arch OCI Image Index (aarch64 + x86_64)
207bitbake container-base-multiarch
208
209# Import into vdkr (auto-selects host platform)
210vdkr vimport tmp/deploy/images/*/container-base-multiarch-multiarch-oci container-base:latest
211```
212
213### Custom Multi-Arch Recipes
214
215Create a recipe that inherits `oci-multiarch`:
216
217```
218# myapp-container-multiarch.bb
219SUMMARY = "Multi-arch myapp container"
220LICENSE = "MIT"
221
222inherit oci-multiarch
223
224OCI_MULTIARCH_RECIPE = "myapp-container"
225OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64"
226```
227
228The `myapp-container.bb` recipe must inherit `image-oci` and produce OCI output.
229
230### vcontainer vs vruntime
231
232| | vruntime | vcontainer |
233|--|----------|------------|
234| **Purpose** | VM rootfs for vdkr/vpdmn | OCI container images |
235| **BBMASK** | Yes (minimal) | No (full packages) |
236| **Init** | busybox | (per recipe) |
237| **IMAGE_FSTYPES** | ext4 | (per recipe) |
238| **Multiconfigs** | vruntime-aarch64, vruntime-x86-64 | container-aarch64, container-x86-64 |
239| **Shared base** | vruntime-base.inc | vruntime-base.inc |
240
177## Design Notes 241## Design Notes
178 242
179**Profiles are pure deltas.** They do not include `meta-virt-host.conf` 243**Profiles are pure deltas.** They do not include `meta-virt-host.conf`