summaryrefslogtreecommitdiffstats
path: root/recipes-containers/vcontainer/README.md
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-05 03:28:17 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:32:52 +0000
commitc03fa452f381d54af66c6bc0d0394622c3d3d61f (patch)
treef341cba988b577493ec9228ac1c8cb063a10e33f /recipes-containers/vcontainer/README.md
parentf9f8e294e5d870f28dd65f13ddb43c224be958fc (diff)
downloadmeta-virtualization-c03fa452f381d54af66c6bc0d0394622c3d3d61f.tar.gz
vcontainer: add SDK-based standalone tarball
Add vcontainer-tarball.bb recipe that creates a relocatable standalone distribution of vdkr and vpdmn container tools using Yocto SDK infrastructure. Features: - Auto-detects available architectures from built blobs - Custom SDK installer with vcontainer-specific messages - nativesdk-qemu-vcontainer.bb: minimal QEMU without OpenGL deps Recipe changes: - DELETE vdkr-native_1.0.bb (functionality moved to SDK) - DELETE vpdmn-native_1.0.bb (functionality moved to SDK) - ADD vcontainer-tarball.bb (SDK tarball recipe) - ADD toolchain-shar-extract.sh (SDK installer template) - ADD nativesdk-qemu-vcontainer.bb (minimal QEMU for SDK) Usage: MACHINE=qemux86-64 bitbake vcontainer-tarball ./tmp/deploy/sdk/vcontainer-standalone.sh -d /opt/vcontainer -y source /opt/vcontainer/init-env.sh vdkr images Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/vcontainer/README.md')
-rw-r--r--recipes-containers/vcontainer/README.md84
1 files changed, 50 insertions, 34 deletions
diff --git a/recipes-containers/vcontainer/README.md b/recipes-containers/vcontainer/README.md
index 4b7b03ed..76d54d18 100644
--- a/recipes-containers/vcontainer/README.md
+++ b/recipes-containers/vcontainer/README.md
@@ -10,8 +10,10 @@ Execute Docker or Podman commands inside a QEMU-emulated target environment.
10## Quick Start 10## Quick Start
11 11
12```bash 12```bash
13# Build vdkr 13# Build and install SDK (see "Standalone SDK" section for full instructions)
14bitbake vdkr-native 14MACHINE=qemux86-64 bitbake vcontainer-tarball
15./tmp/deploy/sdk/vcontainer-standalone.sh -d /tmp/vcontainer -y
16source /tmp/vcontainer/init-env.sh
15 17
16# List images (uses host architecture by default) 18# List images (uses host architecture by default)
17vdkr images 19vdkr images
@@ -190,34 +192,52 @@ vdkr --stateless images # Empty
190vdkr clean 192vdkr clean
191``` 193```
192 194
193## Standalone Distribution 195## Standalone SDK
194 196
195Create a self-contained redistributable tarball that works without Yocto: 197Create a self-contained redistributable SDK that works without Yocto:
196 198
197```bash 199```bash
198# Build the standalone tarball 200# Ensure multiconfig is enabled in local.conf:
199MACHINE=qemux86-64 bitbake vdkr-native -c create_tarball 201# BBMULTICONFIG = "vruntime-aarch64 vruntime-x86-64"
200 202
201# Output: tmp/deploy/vdkr/vdkr-standalone-x86_64.tar.gz 203# Step 1: Build blobs for desired architectures (sequentially to avoid deadlocks)
204bitbake mc:vruntime-x86-64:vdkr-initramfs-create mc:vruntime-x86-64:vpdmn-initramfs-create
205bitbake mc:vruntime-aarch64:vdkr-initramfs-create mc:vruntime-aarch64:vpdmn-initramfs-create
206
207# Step 2: Build SDK (auto-detects available architectures)
208MACHINE=qemux86-64 bitbake vcontainer-tarball
209
210# Output: tmp/deploy/sdk/vcontainer-standalone.sh
211```
212
213To limit architectures, set in local.conf:
214```bash
215VCONTAINER_ARCHITECTURES = "x86_64" # x86_64 only
216VCONTAINER_ARCHITECTURES = "aarch64" # aarch64 only
217VCONTAINER_ARCHITECTURES = "x86_64 aarch64" # both (default if both built)
202``` 218```
203 219
204The tarball includes: 220The SDK includes:
205- `vdkr` - Main CLI script 221- `vdkr`, `vpdmn` - Main CLI scripts
206- `vdkr-aarch64`, `vdkr-x86_64` - Symlinks (only for available architectures) 222- `vdkr-<arch>`, `vpdmn-<arch>` - Symlinks for each included architecture
207- `vrunner.sh` - QEMU runner 223- `vrunner.sh` - Shared QEMU runner
208- `vdkr-blobs/` - Kernel and initramfs per architecture 224- `vdkr-blobs/`, `vpdmn-blobs/` - Kernel and initramfs per architecture
209- `qemu/` - QEMU system emulators with wrapper scripts 225- `sysroots/` - SDK binaries (QEMU, socat, libraries)
210- `lib/` - Shared libraries for QEMU
211- `share/qemu/` - QEMU firmware files
212- `socat` - Socket communication for memres mode
213- `init-env.sh` - Environment setup script 226- `init-env.sh` - Environment setup script
214 227
215Usage: 228Usage:
216```bash 229```bash
217tar -xzf vdkr-standalone-x86_64.tar.gz 230# Install (self-extracting)
218cd vdkr-standalone 231./vcontainer-standalone.sh -d /tmp/vcontainer -y
232
233# Or extract tarball directly
234tar -xf vcontainer-standalone.tar.xz -C /tmp/vcontainer
235
236# Use
237cd /tmp/vcontainer
219source init-env.sh 238source init-env.sh
220vdkr images 239vdkr-x86_64 images
240vdkr-aarch64 images
221``` 241```
222 242
223## Interactive Mode 243## Interactive Mode
@@ -297,13 +317,13 @@ vdkr rm -f debug
297See `tests/README.md` for the pytest-based test suite: 317See `tests/README.md` for the pytest-based test suite:
298 318
299```bash 319```bash
300# Build standalone tarball 320# Build and install SDK
301MACHINE=qemux86-64 bitbake vdkr-native -c create_tarball 321MACHINE=qemux86-64 bitbake vcontainer-tarball
322./tmp/deploy/sdk/vcontainer-standalone.sh -d /tmp/vcontainer -y
302 323
303# Extract and run tests 324# Run tests
304cd /tmp && tar -xzf .../vdkr-standalone-x86_64.tar.gz
305cd /opt/bruce/poky/meta-virtualization 325cd /opt/bruce/poky/meta-virtualization
306pytest tests/test_vdkr.py -v --vdkr-dir /tmp/vdkr-standalone 326pytest tests/test_vdkr.py -v --vdkr-dir /tmp/vcontainer
307``` 327```
308 328
309## vpdmn (Podman) 329## vpdmn (Podman)
@@ -331,9 +351,7 @@ Key differences from vdkr:
331 351
332| Recipe | Purpose | 352| Recipe | Purpose |
333|--------|---------| 353|--------|---------|
334| `vdkr-native_1.0.bb` | Main vdkr (Docker) CLI and blobs | 354| `vcontainer-tarball.bb` | Standalone SDK with vdkr and vpdmn |
335| `vpdmn-native_1.0.bb` | Main vpdmn (Podman) CLI and blobs |
336| `vcontainer-native_1.0.bb` | Unified tarball with both tools |
337| `vdkr-initramfs-create_1.0.bb` | Build vdkr initramfs blobs | 355| `vdkr-initramfs-create_1.0.bb` | Build vdkr initramfs blobs |
338| `vpdmn-initramfs-create_1.0.bb` | Build vpdmn initramfs blobs | 356| `vpdmn-initramfs-create_1.0.bb` | Build vpdmn initramfs blobs |
339 357
@@ -347,18 +365,16 @@ Key differences from vdkr:
347| `vdkr-init.sh` | Docker init script (baked into initramfs) | 365| `vdkr-init.sh` | Docker init script (baked into initramfs) |
348| `vpdmn-init.sh` | Podman init script (daemonless) | 366| `vpdmn-init.sh` | Podman init script (daemonless) |
349 367
350## Testing 368## Testing Both Tools
351 369
352```bash 370```bash
353# Build unified standalone tarball 371# Build and install SDK (includes both vdkr and vpdmn)
354bitbake vcontainer-native -c create_tarball 372MACHINE=qemux86-64 bitbake vcontainer-tarball
355 373./tmp/deploy/sdk/vcontainer-standalone.sh -d /tmp/vcontainer -y
356# Extract
357cd /tmp && tar -xzf .../vcontainer-standalone-*.tar.gz
358 374
359# Run tests for both tools 375# Run tests for both tools
360cd /opt/bruce/poky/meta-virtualization 376cd /opt/bruce/poky/meta-virtualization
361pytest tests/test_vdkr.py tests/test_vpdmn.py -v --vdkr-dir /tmp/vcontainer-standalone 377pytest tests/test_vdkr.py tests/test_vpdmn.py -v --vdkr-dir /tmp/vcontainer
362``` 378```
363 379
364## See Also 380## See Also