diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-09 03:18:20 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-09 03:32:12 +0000 |
| commit | a05c578640c1bef9b8704ffb060815e0f946d705 (patch) | |
| tree | a2c4b225644c61ec1f28034bf3e250f497876a75 /recipes-containers | |
| parent | 77f1e5966f65f821a9c697e9dde3a2fdae4283a7 (diff) | |
| download | meta-virtualization-a05c578640c1bef9b8704ffb060815e0f946d705.tar.gz | |
incus: add container host profile
Add CONTAINER_PROFILE=incus support so incus can be selected as the
container engine for container-image-host:
require conf/distro/include/container-host-incus.conf
MACHINE = "qemux86-64"
bitbake container-image-host
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers')
| -rw-r--r-- | recipes-containers/incus/README.md | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/recipes-containers/incus/README.md b/recipes-containers/incus/README.md new file mode 100644 index 00000000..c3e3a2ce --- /dev/null +++ b/recipes-containers/incus/README.md | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | # Incus: System Container and VM Manager | ||
| 2 | |||
| 3 | [Incus](https://linuxcontainers.org/incus/) is the community fork of LXD, | ||
| 4 | providing a unified experience for running and managing system containers | ||
| 5 | and virtual machines. Built on LXC 6.0 with cowsql for distributed cluster state. | ||
| 6 | |||
| 7 | ## Quick Start | ||
| 8 | |||
| 9 | ### Build | ||
| 10 | |||
| 11 | Select the incus profile in your `local.conf`: | ||
| 12 | |||
| 13 | ``` | ||
| 14 | BUILD_PROFILE ?= "incus" | ||
| 15 | ``` | ||
| 16 | |||
| 17 | Or append incus to an existing image: | ||
| 18 | |||
| 19 | ``` | ||
| 20 | IMAGE_INSTALL:append:pn-container-image-host = " incus" | ||
| 21 | ``` | ||
| 22 | |||
| 23 | Then build: | ||
| 24 | |||
| 25 | ```shell | ||
| 26 | bitbake container-image-host | ||
| 27 | ``` | ||
| 28 | |||
| 29 | ### Boot | ||
| 30 | |||
| 31 | ```shell | ||
| 32 | runqemu qemux86-64 nographic slirp qemuparams="-m 4096" | ||
| 33 | ``` | ||
| 34 | |||
| 35 | ### Initialize | ||
| 36 | |||
| 37 | ```shell | ||
| 38 | incus admin init --minimal | ||
| 39 | ``` | ||
| 40 | |||
| 41 | ### Launch a container | ||
| 42 | |||
| 43 | ```shell | ||
| 44 | incus launch images:alpine/edge test1 | ||
| 45 | incus list | ||
| 46 | incus exec test1 -- /bin/sh | ||
| 47 | ``` | ||
| 48 | |||
| 49 | ### Stop and delete | ||
| 50 | |||
| 51 | ```shell | ||
| 52 | incus stop test1 | ||
| 53 | incus delete test1 | ||
| 54 | ``` | ||
| 55 | |||
| 56 | ## Dependencies | ||
| 57 | |||
| 58 | Incus requires two C libraries that are provided as separate recipes: | ||
| 59 | |||
| 60 | - **raft** (`recipes-containers/raft/`) - Raft consensus protocol implementation | ||
| 61 | - **cowsql** (`recipes-containers/cowsql/`) - Distributed SQLite built on raft | ||
| 62 | |||
| 63 | Runtime dependencies (pulled in automatically via RDEPENDS): | ||
| 64 | |||
| 65 | - lxc, lxcfs, dnsmasq, iptables, rsync, squashfs-tools, attr, acl, shadow | ||
| 66 | |||
| 67 | ## systemd Services | ||
| 68 | |||
| 69 | - `incus.service` - Main daemon (auto-enabled) | ||
| 70 | - `incus.socket` - Unix socket activation | ||
| 71 | |||
| 72 | The daemon creates the `incus-admin` group at install time. Add users to | ||
| 73 | this group to grant non-root access to the Incus API. | ||
| 74 | |||
| 75 | ## Notes | ||
| 76 | |||
| 77 | - **Memory**: QEMU needs at least 2GB (`-m 2048`), 4GB recommended | ||
| 78 | - **KVM**: Not required but improves VM performance if `/dev/kvm` is available | ||
| 79 | - **AppArmor**: Optional, works without it (warning at startup is harmless) | ||
| 80 | - **VM support**: Requires QEMU on the target (optional, containers work without it) | ||
| 81 | - **Networking**: The default bridge (`incusbr0`) is created by `incus admin init` | ||
| 82 | - **Images**: The `images:` remote points to images.linuxcontainers.org | ||
| 83 | - **Clustering**: Supported via cowsql; use `incus admin init` interactive mode to configure | ||
| 84 | |||
| 85 | ## Updating Go Dependencies | ||
| 86 | |||
| 87 | The Go module dependencies are managed via go-mod-discovery: | ||
| 88 | |||
| 89 | ```shell | ||
| 90 | bitbake incus -c discover_and_generate | ||
| 91 | ``` | ||
| 92 | |||
| 93 | This regenerates the `go-mod-*.inc` files in this directory. | ||
