Incus 7.0 Cgroup controller is missing

Incus 7.0.0
Ubuntu 24.04 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC

After upgrading incus to 7, can’t apply any Resource limits, CPU, Mem …
Containers with Resource limits in profile or config won’t start, creating new containers fail as well:

Error: Failed instance creation: Load go-lxc struct: Cgroup controller is missing.

What’s the output of mount | grep cgroup ?

cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)

Created an account to +1 this. I just did an upgrade last night to Incus 7.0 and encountered the same Cgroup controller is missing error affecting all my containers.

Results of systemctl status incus:

level=warning msg="Failed auto start instance attempt" attempt=1 err="Load go-lxc struct: Cgroup controller is missing" instance=<INSTANCE> maxAttempts=3 project=default

Partial output of incus info –show-log <instance>:

WARN     attach - ../src/lxc/attach.c:get_attach_context:478 - No security context received
ERROR    confile - ../src/lxc/confile.c:get_config_unsupported_key:171 - Invalid argument - Unsupported config key "lxc.seccomp"

Output of mount | grep cgroup:

cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot,memory_hugetlb_accounting)

Previously also had an error message mentioning incus conflict regards cgroup hybrid cgroup1/cgroup2.
Disabled cgroup1 in grub, yet it hasn’t resolved the issue.

Can you show the full container config (incus config show --expanded NAME) and also show the exact version of the packages being used? (dpkg -l | grep incus)

architecture: x86_64
config:
  boot.autostart: "true"
  boot.autostart.delay: "5"
  environment.TZ: America/Phoenix
  image.architecture: amd64
  image.description: Archlinux current amd64 (20250627_04:18)
  image.os: Archlinux
  image.release: current
  image.requirements.secureboot: "false"
  image.serial: "20250627_04:18"
  image.type: squashfs
  image.variant: default
  limits.cpu: "2"
  limits.memory: 4GB
  limits.memory.swap: "false"
  raw.idmap: uid 957 969
  volatile.base_image: 65f1da940bfd907b0f9aa9cd07e0d449b488f82b2b9aac68f450019888a58d54
  volatile.cloud-init.instance-id: a82b0d6b-57bb-4e8d-aaeb-d69cc54894d7
  volatile.eth0.host_name: veth6a8b1e81
  volatile.eth0.hwaddr: <MAC_ADDRESS_REDACTED>
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":969},{"Isuid":true,"Isgid":false,"Hostid":957,"Nsid":969,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid":100970,"Nsid":970,"Maprange":64566},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":969},{"Isuid":true,"Isgid":false,"Hostid":957,"Nsid":969,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid":100970,"Nsid":970,"Maprange":64566},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.idmap: '[]'
  volatile.last_state.power: RUNNING
  volatile.uuid: 16e03316-7893-44c6-a7a5-7abffb0d73d4
  volatile.uuid.generation: 16e03316-7893-44c6-a7a5-7abffb0d73d4
devices:
  aurbuilds:
    path: /opt/aurbuilds/
    source: /opt/aurbuilds/
    type: disk
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
  forgejo:
    path: /srv/forgejo
    shift: "false"
    source: /opt/forgejo/repositories
    type: disk
  root:
    path: /
    pool: zfsstorage
    type: disk
ephemeral: false
profiles:
  - archsmall
stateful: false
description: ""

Output of incus profile show archsmall:

config:
  boot.autostart: "true"
  boot.autostart.delay: "5"
  environment.TZ: America/Phoenix
  limits.cpu: "2"
  limits.memory: 4GB
  limits.memory.swap: "false"
description: Arch linux small LXD profile
devices:
  aurbuilds:
    path: /opt/aurbuilds/
    source: /opt/aurbuilds/
    type: disk
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
  root:
    path: /
    pool: zfsstorage
    type: disk
name: archsmall
used_by:
  - <OTHER_INSTANCES>
project: default

Output of pacman -Q | grep incus (because in my case I’m on Arch Linux):

incus 7.0.0-1
incus-tools 7.0.0-1

Also the output of pacman -Q | grep lxc (because I use LXCFS):

lxc 1:7.0.0-1
lxcfs 7.0.0-1

In my case I never had any cgroups-related kernel parameters, but my system did migrate years ago from LXD to Incus in case there’s anything legacy breaking because of that.

For Arch, there’s a decent chance that the cgroup fixes we landed upstream immediately after 7.0.0 were tagged haven’t made it into the package.

Try unsetting the limits.memory.swap key as that may let you workaround the issue.

Confirmed, that works! (@vice I didn’t mean to hijack your thread, please do add on to this if your result is different.)

For posterity, I think what I encountered was Incus issue #3300. I swear I searched the Github issues, but somehow didn’t find that one until you added more detail. Thank you!

After removing
limits.memory.swap: “true”
limits.memory.swap.priority: “7”

it worked again. I guess, need to wait till 7.1 release.

dpkg -l | grep incus
ii incus 1:7.0-ubuntu24.04-202605061508 amd64 Incus - Container and virtualization daemon
ii incus-base 1:7.0-ubuntu24.04-202605061508 amd64 Incus - Container and virtualization daemon (container-only)
ii incus-client 1:7.0-ubuntu24.04-202605061508 amd64 Incus - Command line client

swap.priority is the issue in your case, this option cannot work on cgroup2 systems at the moment as the kernel is lacking support for it.