Trouble installing incus on Arch linux

Good day,

Newbie incus user here.
I tried to install Incus on Arch Linux by following the wiki page
https://wiki.archlinux.org/title/Incus

Unfortunately my first attempt at installation did not go very well, I think the issue was related to the fact that I had upgraded my system packages (and thus kernel) before attempting the incus install.

Things seem to work better after a reboot, I can talk to the daemon etc but
incus admin init
says

The requested storage pool "default" already exists. Please choose another name.

I don’t understand where this state is kept because I’ve removed the zfs pool and removed all files related to incus (/var/lib/incus) in order to try install from a clean slate.

If I attempt to use a different pool name eg userdef it fails with

Error: Failed to retrieve list of storage pools: Certificate is restricted

The full output for reference

incus admin init
Would you like to use clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
The requested storage pool "default" already exists. Please choose another name.
Name of the new storage pool [default=default]: userdef
Name of the storage backend to use (dir, lvm, lvmcluster, zfs, btrfs) [default=zfs]:
Create a new ZFS pool? (yes/no) [default=yes]:
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]:
Size in GiB of the new loop device (1GiB minimum) [default=30GiB]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=incusbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
Would you like the server to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:
Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]:
Error: Failed to retrieve list of storage pools: Certificate is restricted

I feel pretty stuck now, any way to clear all incus state on an uninstall so that I can start again?
Or any other steps I can take to resolve this?
Regards,
Pico

Those errors suggest that your user is in the incus group and not the incus-admin group.

The incus group is used for individual users who should have access to their own isolated corner of Incus. When such a user first interacts with Incus, Incus initializes itself with a basic config, then creates and configures a restricted project for that user.

The errors you’re showing are consistent with Incus being accessed from such a restricted user.
incus project list would further confirm it as you should only see a user-1234 project and not the default project.

1 Like

Thanks Stéphane,

It seems to be as you say:

incus project list
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+
|        NAME         | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |                DESCRIPTION                | USED BY |
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+
| user-1000 (current) | YES    | YES      | YES             | YES             | NO       | YES           | User restricted project for "pico" (1000) | 1       |
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+

However it’s not clear to me from your answer how I resolve my setup issues?
Should I not be able to use incus as a restricted used as the Arch Linux wiki page suggests?
The wiki page does reference the official documentation which suggests this should be possible

Yes but as a restricted user you don’t get to configure the whole system-wide Incus, so you don’t get to run incus admin init.

So just run incus launch images:archlinux foo and you’ll get a container running in your restricted project.

2 Likes

Okay, that’s good to know that I can continue to use it despite the error.

However I’m a bit confused about how this is documented.
Both the Arch wiki and the official document suggest that I can run the command as a normal user.

So either the documentation is wrong and I should not be running the init command at all or the documentation is correct but the final error should be ignored?

You can run incus admin init as a normal user, that is, without using sudo, so long as that user is in the incus-admin group.

A user that is just in the incus group only gets to use Incus, not configure it.

2 Likes

Okay, I see.

So just to clarify this part:

Blockquote
For simple configurations, you can run this command as a normal user. However, some more advanced operations during the initialization process (for example, joining an existing cluster) require root privileges. In this case, run the command with sudo or as root.

Does that mean even if you are in the incus-admin group, there are still some advanced cases where you need to use sudo.

Would it not be clearer if this was explicitly stated in that note?
Perhaps like this:

Blockquote
For simple configurations, you can run this command as a normal user if you are in the incus-admin group. However, some more advanced operations …

Regardless, thanks so much for the detailed explanation.