Incus

Prerequisits

# ZFS (optional)
sudo apt install -y zfsutils-linux
sudo lvcreate --name storage --size 100G ubuntu-vg
sudo zpool create incus /dev/ubuntu-vg/storage
sudo zpool set autotrim=on incus
sudo zfs create incus/storage
 
# uninstall LXD
snap remove lxd

Incus installation
https://github.com/zabbly/incus
https://linuxcontainers.org/incus/docs/main/installing/

mkdir -p /etc/apt/keyrings/
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
 
sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc
EOF'
 
sudo apt update
sudo apt install -y incus incus-tools bash-completion
 
incus version
 
sudo usermod -aG incus-admin ubuntu
 
# fixme
incus completion fish

Incus configuration
https://linuxcontainers.org/incus/docs/main/howto/initialize/#configuration-format

cat <<EOF | incus admin init --preseed
config:
  core.https_address: 10.0.1.1:9999
  images.auto_update_interval: 15
 
storage_pools:
# default
- name: data
  driver: zfs
  config:
    source: incus/storage
 
# Network devices
networks:
- name: incusbr0
  type: bridge
  config:
    ipv4.address: auto
    ipv6.address: none
 
# Profiles
profiles:
- name: default
  description: "Default profile"
  config:
    limits.memory: 8GiB
  devices:
    disk:
      path: /
      pool: data
      type: disk
    nic:
      name: eth0
      nictype: bridged
      parent: incusbr0
      type: nic
EOF
 
incus storage list
incus network list
incus profile show default

Create instance

incus launch images:ubuntu/24.04 u2404
incus launch images:ubuntu/24.04/cloud u2404c < config.yaml
incus launch images:alpine/edge alpine1

Enable Incus remote API authentication
https://linuxcontainers.org/incus/docs/main/howto/server_expose/#authenticate-with-the-incus-server

incus config set core.https_address :8443
incus config trust add foo

Terraform
http://www.panticz.de/terraform/incus

Incus under Ubuntu 22.04
https://github.com/zabbly/incus

Migrate LXC to Incus
https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/
https://discussion.scottibyte.com/t/convert-lxd-server-to-incus/357

Terraform provider
https://github.com/lxc/terraform-provider-incus

Images
https://images.linuxcontainers.org/

Incus releases videos
https://www.youtube.com/watch?v=XquQnbf6YmQ&list=PLVhiK8li7a-4wy1qHHafpkKUuM8GchDGj

Links
https://linuxcontainers.org/incus/