<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/classes/container-cross-install.bbclass, branch container-cross-install</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=container-cross-install</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=container-cross-install'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-02-06T03:54:16+00:00</updated>
<entry>
<title>container-cross-install: add CONTAINER_SERVICE_FILE support</title>
<updated>2026-02-06T03:54:16+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-06T03:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=8c31b451c6f5a9d0bb526ee77f467e5b48846bb4'/>
<id>urn:sha1:8c31b451c6f5a9d0bb526ee77f467e5b48846bb4</id>
<content type='text'>
Add support for custom systemd service files (Docker) or Quadlet
container files (Podman) instead of auto-generated ones for container
autostart.

For containers requiring specific startup configuration (ports, volumes,
capabilities, dependencies), users can now provide custom service files
using the CONTAINER_SERVICE_FILE varflag:

  CONTAINER_SERVICE_FILE[container-name] = "${UNPACKDIR}/myservice.service"

For BUNDLED_CONTAINERS in image recipes:
  SRC_URI += "file://myapp.service"
  BUNDLED_CONTAINERS = "myapp-container:docker:autostart"
  CONTAINER_SERVICE_FILE[myapp-container] = "${UNPACKDIR}/myapp.service"

For container-bundle packages:
  SRC_URI = "file://myapp.service"
  CONTAINER_BUNDLES = "myapp-container:autostart"
  CONTAINER_SERVICE_FILE[myapp-container] = "${UNPACKDIR}/myapp.service"

Implementation:
- container-cross-install.bbclass: Add get_container_service_file_map()
  to build varflag map, install_custom_service() for BUNDLED_CONTAINERS,
  and install_custom_service_from_bundle() for bundle packages
- container-bundle.bbclass: Install custom service files to
  ${datadir}/container-bundles/${runtime}/services/

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add sanity checks and auto-enable virtfs for QEMU</title>
<updated>2026-01-24T03:29:11+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-23T20:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=0e2968073e6b35a697e3e53f9906e32c4e2f1e01'/>
<id>urn:sha1:0e2968073e6b35a697e3e53f9906e32c4e2f1e01</id>
<content type='text'>
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 &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>container-cross-install: fix image naming and default runtime</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-15T21:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=1abd778b15ccedd2cfc80d4f44802c1415fbbbde'/>
<id>urn:sha1:1abd778b15ccedd2cfc80d4f44802c1415fbbbde</id>
<content type='text'>
Fix extract_container_info() to properly handle multi-part container names
and add automatic runtime detection based on CONTAINER_PROFILE.

- Fix multi-part name parsing (app-container-multilayer-latest-oci now
  correctly becomes app-container-multilayer:latest)
- Add CONTAINER_DEFAULT_RUNTIME from CONTAINER_PROFILE
- Add CONTAINER_IMPORT_TIMEOUT_BASE/PER for dynamic timeout scaling

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add auto-start daemon with idle timeout</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T04:46:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=e26d6bf9102d8337293dcc1a99f9dd033566bab1'/>
<id>urn:sha1:e26d6bf9102d8337293dcc1a99f9dd033566bab1</id>
<content type='text'>
Add automatic daemon startup and idle timeout cleanup for vdkr/vpdmn:

- vmemres daemon auto-starts on first command (no manual start needed)
- Daemon auto-stops after idle timeout (default: 30 minutes)
- --no-daemon flag for ephemeral mode (single-shot QEMU)
- New config keys: idle-timeout, auto-daemon

Changes:
- vcontainer-init-common.sh: Parse idle_timeout from cmdline, add
  read -t timeout to daemon loop for auto-shutdown
- vrunner.sh: Add --idle-timeout option, pass to kernel cmdline
- vcontainer-common.sh: Auto-start logic in run_runtime_command(),
  --no-daemon flag, config defaults
- container-cross-install.bbclass: Add --no-daemon for explicit
  ephemeral mode during Yocto builds

Configuration:
  vdkr vconfig idle-timeout 3600    # 1 hour timeout
  vdkr vconfig auto-daemon false    # Disable auto-start

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>classes: factor out shared functions to container-common.bbclass</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-05T15:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=33cbcc8310b846f964f7aa1829526a59c138e516'/>
<id>urn:sha1:33cbcc8310b846f964f7aa1829526a59c138e516</id>
<content type='text'>
Create container-common.bbclass with shared Python functions used by both
container-bundle.bbclass and container-cross-install.bbclass:

- get_vruntime_multiconfig(d): Maps TARGET_ARCH to multiconfig name
- get_vruntime_machine(d): Maps TARGET_ARCH to MACHINE for deploy path
- get_blob_arch(d): Maps TARGET_ARCH to blob directory name

This removes ~55 lines of duplicated code and ensures consistency between
the two bbclass files.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>container-cross-install: add bbclass for bundling containers into images</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-01T17:08:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=423c2c1b02254b2b9d79dbe712593aa808334d15'/>
<id>urn:sha1:423c2c1b02254b2b9d79dbe712593aa808334d15</id>
<content type='text'>
This class enables bundling pre-built OCI containers into Yocto images
at build time. It uses vdkr/vpdmn to process containers via QEMU,
producing properly formatted storage that can be merged into the
target rootfs.

Two mechanisms for bundling containers:

1. BUNDLED_CONTAINERS variable (direct specification):
   - Set in local.conf or image recipe
   - Format: "name:runtime[:autostart][:external]"
   - Dependencies auto-generated at parse time
   - Example: BUNDLED_CONTAINERS = "container-base:docker:autostart"

2. container-bundle packages (package-based):
   - Recipes inherit container-bundle.bbclass to create packages
   - Installing packages via IMAGE_INSTALL triggers processing
   - merge_installed_bundles() scans installed OCI directories
   - Runs vrunner once in batch-import mode for efficiency

Automatic dependency generation for BUNDLED_CONTAINERS:
- Parses entries at recipe parse time via python __anonymous()
- Derives recipe name from OCI dir names (strips -latest-oci/-oci suffix)
- Generates do_rootfs[depends] on recipe:do_image_complete
- Use :external tag to skip dependency for third-party blobs
- Single "bitbake container-image-host" builds containers + image

Usage in image recipe:
    inherit container-cross-install

Features:
- Automatic detection of target architecture
- Support for both Docker and Podman runtimes
- Batch import mode for efficiency with multiple containers
- Autostart support via systemd services (Docker) or Quadlet (Podman)
- Integration with vrunner for QEMU-based processing
- Backwards compatible with legacy -latest-oci naming convention

The class processes containers during do_rootfs and merges the
resulting storage into /var/lib/docker or /var/lib/containers.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
