Can't get unprivileged containers to auto start

I have no idea what I’m doing incorrectly

~ ❯ loginctl user-status whiteman808                                                                                                                  07:40:14
whiteman808 (1000)
   Since: Wed 2025-06-18 07:34:44 CEST; 7min ago
   State: active
Sessions: *2 1
  Linger: yes
...
~ ❯ cat ~/.local/share/lxc/build-test/config                                                                                                          07:39:19
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# Template script checksum (SHA-1): e96730b93a4a0e1d4d7bb582ffdf11c8b898fd54
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)


# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.include = /usr/share/lxc/config/userns.conf
lxc.arch = linux64

# Container specific configuration
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.rootfs.path = dir:/home/whiteman808/.local/share/lxc/build-test/rootfs
lxc.uts.name = build-test

# Network configuration
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:72:77:7f

lxc.start.auto = 1
~ ❯ cat ~/.config/systemd/user/lxc-autostart.service                                                                                                  07:39:34
[Unit]
Description=Automatically start and shutdown lxc containers
After=network.target lxc-net.service remote-fs.target
Wants=lxc-net.service
Documentation=man:lxc-autostart man:lxc

[Service]
Type=oneshot
ExecStart=/usr/bin/lxc-autostart -o /home/whiteman808/lxc-autostart.log -l DEBUG
ExecStop=/usr/bin/lxc-autostart -s
RemainAfterExit=yes

[Install]
WantedBy=default.target
~ ❯ cat ~/lxc-autostart.log                                                                                                                           07:39:44
lxc-autostart 20250618053446.310 INFO     confile - ../lxc-6.0.3/src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-autostart 20250618053446.311 INFO     confile - ../lxc-6.0.3/src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-autostart 20250618053446.336 INFO     lxccontainer - ../lxc-6.0.3/src/lxc/lxccontainer.c:do_lxcapi_start:959 - Set process title to [lxc monitor] /home/whiteman808/.local/share/lxc build-test
lxc-autostart 20250618053446.351 DEBUG    lxccontainer - ../lxc-6.0.3/src/lxc/lxccontainer.c:wait_on_daemonized_start:818 - First child 1633 exited
lxc-autostart 20250618053446.351 INFO     lsm - ../lxc-6.0.3/src/lxc/lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver nop
lxc-autostart 20250618053446.357 INFO     cgfsng - ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c:unpriv_systemd_create_scope:1506 - Not in unified layout, not using a systemd unit
lxc-autostart 20250618053446.359 INFO     cgfsng - ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c:legacy_hierarchy_delegated:3757 - Permission denied - Legacy hierarchy not writable, skipping
lxc-autostart 20250618053446.368 DEBUG    seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:664 - Host native arch is [3221225534]
lxc-autostart 20250618053446.368 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "reject_force_umount  # comment this to allow umount -f;  not recommended"
lxc-autostart 20250618053446.369 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:532 - Set seccomp rule to reject force umounts
lxc-autostart 20250618053446.369 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:532 - Set seccomp rule to reject force umounts
lxc-autostart 20250618053446.370 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:532 - Set seccomp rule to reject force umounts
lxc-autostart 20250618053446.370 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "[all]"
lxc-autostart 20250618053446.371 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "kexec_load errno 1"
lxc-autostart 20250618053446.371 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding native rule for syscall[246:kexec_load] action[327681:errno] arch[0]
lxc-autostart 20250618053446.371 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[246:kexec_load] action[327681:errno] arch[1073741827]
lxc-autostart 20250618053446.372 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[246:kexec_load] action[327681:errno] arch[1073741886]
lxc-autostart 20250618053446.372 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "open_by_handle_at errno 1"
lxc-autostart 20250618053446.372 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding native rule for syscall[304:open_by_handle_at] action[327681:errno] arch[0]
lxc-autostart 20250618053446.372 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[304:open_by_handle_at] action[327681:errno] arch[1073741827]
lxc-autostart 20250618053446.373 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[304:open_by_handle_at] action[327681:errno] arch[1073741886]
lxc-autostart 20250618053446.373 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "init_module errno 1"
lxc-autostart 20250618053446.373 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding native rule for syscall[175:init_module] action[327681:errno] arch[0]
lxc-autostart 20250618053446.373 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[175:init_module] action[327681:errno] arch[1073741827]
lxc-autostart 20250618053446.374 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[175:init_module] action[327681:errno] arch[1073741886]
lxc-autostart 20250618053446.374 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "finit_module errno 1"
lxc-autostart 20250618053446.374 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding native rule for syscall[313:finit_module] action[327681:errno] arch[0]
lxc-autostart 20250618053446.375 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[313:finit_module] action[327681:errno] arch[1073741827]
lxc-autostart 20250618053446.375 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[313:finit_module] action[327681:errno] arch[1073741886]
lxc-autostart 20250618053446.375 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:815 - Processing "delete_module errno 1"
lxc-autostart 20250618053446.375 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding native rule for syscall[176:delete_module] action[327681:errno] arch[0]
lxc-autostart 20250618053446.376 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[176:delete_module] action[327681:errno] arch[1073741827]
lxc-autostart 20250618053446.376 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:do_resolve_add_rule:572 - Adding compat rule for syscall[176:delete_module] action[327681:errno] arch[1073741886]
lxc-autostart 20250618053446.377 INFO     seccomp - ../lxc-6.0.3/src/lxc/seccomp.c:parse_config_v2:1036 - Merging compat seccomp contexts into main context
lxc-autostart 20250618053446.377 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_init:882 - Container "build-test" is initialized
lxc-autostart 20250618053446.379 INFO     cgfsng - ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c:cgfsng_monitor_create:1669 - The monitor process uses "lxc.monitor.build-test" as cgroup
lxc-autostart 20250618053446.380 ERROR    cgfsng - ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c:__cgfsng_delegate_controllers:3618 - Device or resource busy - Could not enable "+memory +pids" controllers in the unified cgroup 11
lxc-autostart 20250618053446.385 DEBUG    storage - ../lxc-6.0.3/src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type "dir"
lxc-autostart 20250618053446.388 INFO     cgfsng - ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c:cgfsng_payload_create:1777 - The container process uses "lxc.payload.build-test" as inner and "lxc.payload.build-test" as limit cgroup
lxc-autostart 20250618053446.398 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWUSER
lxc-autostart 20250618053446.399 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWNS
lxc-autostart 20250618053446.399 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWPID
lxc-autostart 20250618053446.399 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWUTS
lxc-autostart 20250618053446.399 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWIPC
lxc-autostart 20250618053446.399 INFO     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1769 - Cloned CLONE_NEWCGROUP
lxc-autostart 20250618053446.400 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved user namespace via fd 19 and stashed path as user:/proc/1634/fd/19
lxc-autostart 20250618053446.401 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved mnt namespace via fd 20 and stashed path as mnt:/proc/1634/fd/20
lxc-autostart 20250618053446.402 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved pid namespace via fd 21 and stashed path as pid:/proc/1634/fd/21
lxc-autostart 20250618053446.402 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved uts namespace via fd 22 and stashed path as uts:/proc/1634/fd/22
lxc-autostart 20250618053446.403 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved ipc namespace via fd 23 and stashed path as ipc:/proc/1634/fd/23
lxc-autostart 20250618053446.404 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved cgroup namespace via fd 24 and stashed path as cgroup:/proc/1634/fd/24
lxc-autostart 20250618053446.406 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-autostart 20250618053446.407 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-autostart 20250618053446.407 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-autostart 20250618053446.672 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-autostart 20250618053446.673 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-autostart 20250618053446.673 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-autostart 20250618053446.952 NOTICE   utils - ../lxc-6.0.3/src/lxc/utils.c:lxc_drop_groups:1477 - Dropped supplimentary groups
lxc-autostart 20250618053446.993 INFO     start - ../lxc-6.0.3/src/lxc/start.c:do_start:1105 - Unshared CLONE_NEWNET
lxc-autostart 20250618053446.996 NOTICE   utils - ../lxc-6.0.3/src/lxc/utils.c:lxc_drop_groups:1477 - Dropped supplimentary groups
lxc-autostart 20250618053446.996 NOTICE   utils - ../lxc-6.0.3/src/lxc/utils.c:lxc_switch_uid_gid:1453 - Switched to gid 0
lxc-autostart 20250618053446.996 NOTICE   utils - ../lxc-6.0.3/src/lxc/utils.c:lxc_switch_uid_gid:1462 - Switched to uid 0
lxc-autostart 20250618053446.999 DEBUG    start - ../lxc-6.0.3/src/lxc/start.c:lxc_try_preserve_namespace:140 - Preserved net namespace via fd 7 and stashed path as net:/proc/1634/fd/7
lxc-autostart 20250618053446.100 WARN     start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1839 - Operation not permitted - Failed to allocate new network namespace id
lxc-autostart 20250618053446.101 INFO     network - ../lxc-6.0.3/src/lxc/network.c:lxc_create_network_unpriv_exec:3001 - Execing lxc-user-nic create /home/whiteman808/.local/share/lxc build-test 1635 veth lxcbr0 (null)
lxc-autostart 20250618053446.320 ERROR    network - ../lxc-6.0.3/src/lxc/network.c:lxc_create_network_unpriv_exec:3029 - lxc-user-nic failed to configure requested network: ../lxc-6.0.3/src/lxc/cmd/lxc_user_nic.c: 506: get_mtu: Could not get MTU for netdev lxcbr0 ifindex 0
lxc-autostart 20250618053446.320 ERROR    start - ../lxc-6.0.3/src/lxc/start.c:lxc_spawn:1847 - Failed to create the network
lxc-autostart 20250618053446.320 DEBUG    network - ../lxc-6.0.3/src/lxc/network.c:lxc_delete_network:4220 - Deleted network devices
lxc-autostart 20250618053446.321 ERROR    lxccontainer - ../lxc-6.0.3/src/lxc/lxccontainer.c:wait_on_daemonized_start:837 - Received container state "ABORTING" instead of "RUNNING"
lxc-autostart 20250618053446.321 ERROR    lxc_autostart - ../lxc-6.0.3/src/lxc/tools/lxc_autostart.c:lxc_autostart_main:471 - Error starting container: build-test
lxc-autostart 20250618053446.326 ERROR    start - ../lxc-6.0.3/src/lxc/start.c:__lxc_start:2114 - Failed to spawn container "build-test"
lxc-autostart 20250618053446.326 WARN     start - ../lxc-6.0.3/src/lxc/start.c:lxc_abort:1037 - No such process - Failed to send SIGKILL via pidfd 18 for process 1635
lxc-autostart 20250618053446.328 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-autostart 20250618053446.328 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-autostart 20250618053446.328 DEBUG    idmap_utils - ../lxc-6.0.3/src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-autostart 20250618053446.357 NOTICE   utils - ../lxc-6.0.3/src/lxc/utils.c:lxc_drop_groups:1477 - Dropped supplimentary groups
~ ❯ systemctl status lxc.service                                                                                                                      07:39:51
○ lxc.service - LXC Container Initialization and Autoboot Code
     Loaded: loaded (/usr/lib/systemd/system/lxc.service; disabled; preset: disabled)
     Active: inactive (dead)
       Docs: man:lxc-autostart
             man:lxc
~ ❯ journalctl --user --unit lxc@build-test                                                                                                           07:40:09
Jun 18 07:11:28 rpk systemd[1455]: Started LXC Container: build-test.
Jun 18 07:11:28 rpk lxc-start[6790]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers: 3618 Device or resource busy>
Jun 18 07:11:36 rpk systemd[1455]: Stopping LXC Container: build-test...
Jun 18 07:11:36 rpk systemd[1455]: Stopped LXC Container: build-test.
Jun 18 07:11:36 rpk systemd[1455]: lxc@build-test.service: Consumed 2.953s CPU time, 83.8M memory peak.
Jun 18 07:11:42 rpk systemd[1455]: Started LXC Container: build-test.
Jun 18 07:11:42 rpk lxc-start[7161]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers: 3618 Device or resource busy>
Jun 18 07:11:44 rpk systemd[1455]: Stopping LXC Container: build-test...
Jun 18 07:11:45 rpk systemd[1455]: Stopped LXC Container: build-test.
Jun 18 07:11:45 rpk systemd[1455]: lxc@build-test.service: Consumed 2.525s CPU time, 31.1M memory peak.
-- Boot b9df1959c9e4414e8421f028f79b34a4 --
Jun 18 07:12:21 rpk systemd[1441]: Started LXC Container: build-test.
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers: 3618 Device or resource busy>
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/network.c: lxc_create_network_unpriv_exec: 3029 lxc-user-nic failed to config>
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/start.c: lxc_spawn: 1847 Failed to create the network
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/start.c: __lxc_start: 2114 Failed to spawn container "build-test"
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/tools/lxc_start.c: lxc_start_main: 307 The container failed to start
Jun 18 07:12:21 rpk lxc-start[1780]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/tools/lxc_start.c: lxc_start_main: 312 Additional information can be obtained>
Jun 18 07:12:21 rpk systemd[1441]: lxc@build-test.service: Main process exited, code=exited, status=1/FAILURE
Jun 18 07:12:21 rpk systemd[1441]: lxc@build-test.service: Failed with result 'exit-code'.
-- Boot 6790b9c40b6f43d09c6ebf881696fac3 --
Jun 18 07:15:52 rpk systemd[1433]: Started LXC Container: build-test.
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers: 3618 Device or resource busy>
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/network.c: lxc_create_network_unpriv_exec: 3029 lxc-user-nic failed to config>
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/start.c: lxc_spawn: 1847 Failed to create the network
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/start.c: __lxc_start: 2114 Failed to spawn container "build-test"
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/tools/lxc_start.c: lxc_start_main: 307 The container failed to start
Jun 18 07:15:52 rpk lxc-start[1774]: lxc-start: build-test: ../lxc-6.0.3/src/lxc/tools/lxc_start.c: lxc_start_main: 312 Additional information can be obtained>
Jun 18 07:15:52 rpk systemd[1433]: lxc@build-test.service: Main process exited, code=exited, status=1/FAILURE
Jun 18 07:15:52 rpk systemd[1433]: lxc@build-test.service: Failed with result 'exit-code'.