Unable to create unprivileged container in OpenNebula LXC

I’m trying to create an Ubuntu 24.04 container. Unfortunately with the images in privileged mode, it doesn’t work due to systemd failing to start up. I’ve been trying to create unprivileged ones, but when LXC_UNPRIVILEGED is not set, it creates a privileged container and when setting it to false, it does so, too.

Versions of the related components and OS (frontend, hypervisors, VMs):
OpenNebula 6.10

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble

Steps to reproduce:
Install OpenNebula
Download Image from Linux Containers Marketplace
Set LXC_UNPRIVILEGED to true

Current results:
Privileged container and not starting with systemd 255+

Expected results:
Unprivileged container with systemd 255+

Which OpenNebula version are you using ? We have submitted some fixes regarding the LinuxContainers Marketplace which haven’t been shipped to the Community Edition (they will appear on 7.0 release). You probably need to relax the apparmor profile. Try setting the following on the VM Template that the App import generates

RAW=[
  DATA="lxc.apparmor.allow_nesting=1
lxc.apparmor.profile=generated",
  TYPE="lxc" ]