New to Incus - Problem getting CONTAINER started - Errors

On Ubuntu 20.04

incus launch images:ubuntu/20.04 first
Creates container, but does not start automatically.

New CONTAINER is listed. STATE is STOPPED

incus start first
Error: Failed to run: /opt/incus/bin/incusd forkstart first /var/lib/incus/containers /var/log/incus/first/lxc.conf: exit status 1

Looking to understand the correct incus setup…and possible resultion.

incus info --show-log first produces following

Name: first
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2023/12/19 22:37 PST
Last Used: 2023/12/19 22:38 PST

Log:

lxc first 20231220063803.732 ERROR conf - …/src/lxc/conf.c:lxc_map_ids:3701 - newuidmap failed to write mapping “newuidmap: uid range [0-1000000000) → [1000000-1001000000) not allowed”: newuidmap 23013 0 1000000 1000000000
lxc first 20231220063803.732 ERROR start - …/src/lxc/start.c:lxc_spawn:1788 - Failed to set up id mapping.
lxc first 20231220063803.732 ERROR lxccontainer - …/src/lxc/lxccontainer.c:wait_on_daemonized_start:878 - Received container state “ABORTING” instead of “RUNNING”
lxc first 20231220063803.733 ERROR start - …/src/lxc/start.c:__lxc_start:2107 - Failed to spawn container “first”
lxc first 20231220063803.733 WARN start - …/src/lxc/start.c:lxc_abort:1036 - No such process - Failed to send SIGKILL via pidfd 43 for process 23013

Best,
Bret

Hey there, your /etc/subuid and /etc/subgid files haven’t been configured. It’s something that will happen automatically with the Incus 0.4 packages.

In the mean time, it should work fine if you directly edit both of those files and put:

root:1000000:1000000000

In both those files, that should get you back online.

Appreciate the fix. Upand running.
Did I run something incorrectly? …or miss a step during the setup.

I always appreciate when things don’t go perfectly…much better to learn.

A fan of your project,
Thanking you,
Bret

You didn’t do anything wrong, you’re just on a system which has the uidmap package installed and so requires some additional configuration. The 0.4 package will do that automatically.

This situation is mentioned in the installation doc though it doesn’t go in great details:

If newuidmap/newgidmap tools are present on your system and /etc/subuid, etc/subgid exist, they must be configured to allow the root user a contiguous range of at least 10M UID/GID.

Though in your case given your containers were using a larger chunk, following those instructions to the letter wouldn’t have worked, you’d have needed to tweak them to match your existing containers.