From 0e2968073e6b35a697e3e53f9906e32c4e2f1e01 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Fri, 23 Jan 2026 15:22:41 -0500 Subject: vcontainer: add sanity checks and auto-enable virtfs for QEMU Fix virtio-9p (virtfs) support for container-cross-install batch imports which provides ~50x speedup over base64-over-serial. The issue was that native recipes don't see target DISTRO_FEATURES, so qemu-system-native wasn't getting virtfs enabled. Fix by: - layer.conf: Propagate virtualization to DISTRO_FEATURES_NATIVE when vcontainer or virtualization is in target DISTRO_FEATURES - qemu-system-native: Check DISTRO_FEATURES_NATIVE for virtfs enable - container-cross-install: Prepend native sysroot to PATH so vrunner finds the QEMU with virtfs support Signed-off-by: Bruce Ashfield --- classes/container-cross-install.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/container-cross-install.bbclass b/classes/container-cross-install.bbclass index d365d7a1..d18c6436 100644 --- a/classes/container-cross-install.bbclass +++ b/classes/container-cross-install.bbclass @@ -830,7 +830,8 @@ Or remove it from BUNDLED_CONTAINERS if not needed. VRUNNER_CMD="${VRUNNER_CMD} -- ${DOCKER_CONTAINERS}" bbnote "Running batch import for Docker containers..." - TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} + # Prepend native sysroot to PATH so vrunner finds the correct QEMU (with virtfs support) + PATH="${STAGING_BINDIR_NATIVE}:${PATH}" TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} if [ $? -ne 0 ]; then bbfatal "Docker batch import failed" @@ -894,7 +895,8 @@ Or remove it from BUNDLED_CONTAINERS if not needed. VRUNNER_CMD="${VRUNNER_CMD} -- ${PODMAN_CONTAINERS}" bbnote "Running batch import for Podman containers..." - TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} + # Prepend native sysroot to PATH so vrunner finds the correct QEMU (with virtfs support) + PATH="${STAGING_BINDIR_NATIVE}:${PATH}" TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} if [ $? -ne 0 ]; then bbfatal "Podman batch import failed" -- cgit v1.2.3-54-g00ecf