summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-23 15:22:41 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:34:12 +0000
commit729c4bb01402aac1348d5d40eea6a42ff2bc1934 (patch)
treef6c6d3cad6ff6e3f2d3da9548d48713c869ea731 /classes
parent0f5344e8c36eef45c4886a903bc5f0ccef305111 (diff)
downloadmeta-virtualization-729c4bb01402aac1348d5d40eea6a42ff2bc1934.tar.gz
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/container-cross-install.bbclass6
1 files changed, 4 insertions, 2 deletions
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.
830 VRUNNER_CMD="${VRUNNER_CMD} -- ${DOCKER_CONTAINERS}" 830 VRUNNER_CMD="${VRUNNER_CMD} -- ${DOCKER_CONTAINERS}"
831 831
832 bbnote "Running batch import for Docker containers..." 832 bbnote "Running batch import for Docker containers..."
833 TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} 833 # Prepend native sysroot to PATH so vrunner finds the correct QEMU (with virtfs support)
834 PATH="${STAGING_BINDIR_NATIVE}:${PATH}" TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD}
834 835
835 if [ $? -ne 0 ]; then 836 if [ $? -ne 0 ]; then
836 bbfatal "Docker batch import failed" 837 bbfatal "Docker batch import failed"
@@ -894,7 +895,8 @@ Or remove it from BUNDLED_CONTAINERS if not needed.
894 VRUNNER_CMD="${VRUNNER_CMD} -- ${PODMAN_CONTAINERS}" 895 VRUNNER_CMD="${VRUNNER_CMD} -- ${PODMAN_CONTAINERS}"
895 896
896 bbnote "Running batch import for Podman containers..." 897 bbnote "Running batch import for Podman containers..."
897 TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD} 898 # Prepend native sysroot to PATH so vrunner finds the correct QEMU (with virtfs support)
899 PATH="${STAGING_BINDIR_NATIVE}:${PATH}" TMPDIR="${WORKDIR}" eval ${VRUNNER_CMD}
898 900
899 if [ $? -ne 0 ]; then 901 if [ $? -ne 0 ]; then
900 bbfatal "Podman batch import failed" 902 bbfatal "Podman batch import failed"