# Base virtualization host configuration fragment
#
# Common DISTRO_FEATURES for any virtualization work: containers, Xen,
# k3s, or custom/mixed configurations.
#
# Use standalone for custom builds:
#
#   require conf/distro/include/meta-virt-host.conf
#   MACHINE = "qemux86-64"
#
# Or let a specific profile (container-host-*, xen-host-*) inherit it.

DISTRO_FEATURES:append = " virtualization systemd seccomp vmsep vcontainer"

# Container runtime provider — the unified runc recipe provides both
# runc-docker and runc-opencontainers via RPROVIDES
PREFERRED_PROVIDER_virtual/runc ?= "runc"

# Multiconfig for cross-arch builds:
#   vruntime-*   : minimal VM rootfs (vdkr/vpdmn blobs)
#   container-*  : OCI container images (multi-arch)
BBMULTICONFIG ?= "vruntime-aarch64 vruntime-x86-64 container-aarch64 container-x86-64"

# Suppress warnings for layers fully masked in vruntime/vcontainer multiconfigs.
# These layers are in bblayers.conf (needed by the main build) but their
# recipes are irrelevant to container/VM multiconfigs. BitBake checks
# BBFILE_PATTERN_IGNORE_EMPTY on self.data (the base datastore), not
# per-multiconfig, so this must be set here rather than in the distro config.
BBFILE_PATTERN_IGNORE_EMPTY_filesystems-layer = "1"
BBFILE_PATTERN_IGNORE_EMPTY_meta-python = "1"
BBFILE_PATTERN_IGNORE_EMPTY_webserver = "1"
