summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-23 15:22:28 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-01-23 22:29:11 -0500
commitf2472dcdc52de398eccc829d88b400e587d6f934 (patch)
tree4687384bf2dbb15a16f5d6d4fe7da343f64ec49f
parentfb2d1d8a47909b8e7e49df65ae30263ca236236f (diff)
downloadmeta-virtualization-f2472dcdc52de398eccc829d88b400e587d6f934.tar.gz
vcontainer: fix runc/crun conflict in multiconfig builds
The vruntime distro is used for multiconfig builds of both vdkr (Docker/runc) and vpdmn (Podman/crun) images. When CONTAINER_PROFILE or VIRTUAL-RUNTIME_container_runtime is set, containerd and podman pull their preferred runtime via RDEPENDS, causing package conflicts. Fix by having vruntime distro NOT participate in CONTAINER_PROFILE: - Set VIRTUAL-RUNTIME_container_runtime="" to prevent automatic runtime selection - Explicitly install runc in vdkr-rootfs-image.bb - Explicitly install crun in vpdmn-rootfs-image.bb This allows both images to be built in the same multiconfig without conflicts, while standard container-host images continue to use CONTAINER_PROFILE normally. Also add kernel-modules to vdkr-rootfs-image for overlay filesystem support. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--conf/distro/vruntime.conf19
-rw-r--r--recipes-containers/vcontainer/vdkr-rootfs-image.bb3
-rw-r--r--recipes-containers/vcontainer/vpdmn-rootfs-image.bb13
3 files changed, 23 insertions, 12 deletions
diff --git a/conf/distro/vruntime.conf b/conf/distro/vruntime.conf
index a10df80f..a489a7a2 100644
--- a/conf/distro/vruntime.conf
+++ b/conf/distro/vruntime.conf
@@ -7,8 +7,10 @@
7# This distro is used by multiconfig builds (vruntime-aarch64, vruntime-x86-64) 7# This distro is used by multiconfig builds (vruntime-aarch64, vruntime-x86-64)
8# to create minimal rootfs images for QEMU-based container processing. 8# to create minimal rootfs images for QEMU-based container processing.
9# 9#
10# The resulting images contain Docker or Podman tools and are used by 10# IMPORTANT: This distro does NOT participate in CONTAINER_PROFILE.
11# vrunner.sh to import containers during Yocto image builds. 11# The vdkr/vpdmn rootfs images explicitly specify their container stacks
12# to avoid conflicts between docker (runc) and podman (crun) requirements.
13# This allows both to be built in the same multiconfig.
12 14
13require conf/distro/poky.conf 15require conf/distro/poky.conf
14 16
@@ -45,3 +47,16 @@ VIRTUAL-RUNTIME_login_manager = ""
45 47
46# Keep images small - no documentation or debug 48# Keep images small - no documentation or debug
47EXTRA_IMAGE_FEATURES = "" 49EXTRA_IMAGE_FEATURES = ""
50
51# =============================================================================
52# Container runtime: NOT SET
53# =============================================================================
54# Unlike normal container distros, vruntime does NOT set CONTAINER_PROFILE
55# or VIRTUAL-RUNTIME_container_runtime. This prevents containerd/podman from
56# pulling a specific runtime via RDEPENDS, avoiding conflicts when both
57# vdkr (runc) and vpdmn (crun) are built in the same multiconfig.
58#
59# The vdkr-rootfs-image and vpdmn-rootfs-image recipes explicitly install
60# their required runtimes in IMAGE_INSTALL.
61# =============================================================================
62VIRTUAL-RUNTIME_container_runtime = ""
diff --git a/recipes-containers/vcontainer/vdkr-rootfs-image.bb b/recipes-containers/vcontainer/vdkr-rootfs-image.bb
index 4a0c8a10..8dcf4190 100644
--- a/recipes-containers/vcontainer/vdkr-rootfs-image.bb
+++ b/recipes-containers/vcontainer/vdkr-rootfs-image.bb
@@ -38,6 +38,8 @@ do_rootfs[nostamp] = "1"
38inherit core-image 38inherit core-image
39 39
40# We need Docker and container tools 40# We need Docker and container tools
41# Note: runc is explicitly listed because vruntime distro sets
42# VIRTUAL-RUNTIME_container_runtime="" to avoid runc/crun conflicts.
41IMAGE_INSTALL = " \ 43IMAGE_INSTALL = " \
42 packagegroup-core-boot \ 44 packagegroup-core-boot \
43 docker-moby \ 45 docker-moby \
@@ -48,6 +50,7 @@ IMAGE_INSTALL = " \
48 iproute2 \ 50 iproute2 \
49 iptables \ 51 iptables \
50 util-linux \ 52 util-linux \
53 kernel-modules \
51" 54"
52 55
53# No extra features needed 56# No extra features needed
diff --git a/recipes-containers/vcontainer/vpdmn-rootfs-image.bb b/recipes-containers/vcontainer/vpdmn-rootfs-image.bb
index 82dd64ba..644ce14d 100644
--- a/recipes-containers/vcontainer/vpdmn-rootfs-image.bb
+++ b/recipes-containers/vcontainer/vpdmn-rootfs-image.bb
@@ -31,21 +31,14 @@ do_rootfs[nostamp] = "1"
31# Inherit from core-image-minimal for a minimal base 31# Inherit from core-image-minimal for a minimal base
32inherit core-image 32inherit core-image
33 33
34# Use crun as the OCI runtime (not runc) - this prevents the conflict where
35# both crun (which creates /usr/bin/runc symlink) and runc package are installed
36VIRTUAL-RUNTIME_container_runtime = "crun"
37
38# Use netavark for container networking (pulled in via podman's RDEPENDS)
39VIRTUAL-RUNTIME_container_networking = "netavark"
40
41# Use aardvark-dns for container DNS
42VIRTUAL-RUNTIME_container_dns = "aardvark-dns"
43
44# We need Podman and container tools 34# We need Podman and container tools
45# Podman is daemonless - no containerd required! 35# Podman is daemonless - no containerd required!
36# Note: crun is explicitly listed because vruntime distro sets
37# VIRTUAL-RUNTIME_container_runtime="" to avoid runc/crun conflicts.
46IMAGE_INSTALL = " \ 38IMAGE_INSTALL = " \
47 packagegroup-core-boot \ 39 packagegroup-core-boot \
48 podman \ 40 podman \
41 crun \
49 skopeo \ 42 skopeo \
50 conmon \ 43 conmon \
51 netavark \ 44 netavark \