"incus init ... --device root,pool=ssd,size=16GiB" cannot find pool

I’ve got 2 LVM storage pools:

# incus storage show lvm
config:
   lvm.use_thinpool: "false"
   lvm.vg_name: vg01
   source: vg01
   volatile.initial_source: vg01
description: ""
name: lvm
driver: lvm
used_by:
- /1.0/profiles/default
status: Created
locations:
- none

# incus storage show ssd
config:
   lvm.use_thinpool: "false"
   lvm.vg_name: vg00
   source: vg00
   volatile.initial_source: vg00
description: ""
name: ssd
driver: lvm
used_by: []
status: Created
locations:
- none

If I try to use the ssd pool for the / partition of a new container, then I get

# incus init images:debian/bookworm sample --device root,pool=ssd,size=16GiB
Creating sample
Error: Failed instance creation: Failed creating instance record: Failed initializing instance: Failed loading storage pool: Storage pool not found

What is it trying to tell me? According to the documentation the pool=ssd should work. It mumbles something about “only applicable for storage volumes managed by Incus”, but AFAICT this is the case here.

Incus is version 6.7 on Debian 12.

Hopefully I wasn’t too blind to see. Every helpful hint is highly appreciated

Harri

This should work:

incus init images:debian/bookworm sample --storage ssd --device root,size=16GiB

As for “what it’s trying to tell you”, you can add --debug to see what your old version was doing:

DEBUG  [2024-12-06T09:52:08Z] Sending request to Incus                      etag= method=POST url="http://unix.socket/1.0/instances"
DEBUG  [2024-12-06T09:52:08Z]
	{
		"architecture": "",
		"config": {},
		"devices": {
			"root": {
				"path": "/",
				"pool": "ssd,size=16GiB",
				"type": "disk"
			}
		},
...

That is, it’s trying to find a pool with name “ssd,size=16GiB”, as opposed to what you wanted:

		"devices": {
			"root": {
				"path": "/",
				"pool": "ssd",
				"size": "16GiB",
				"type": "disk"
			}

It’s certainly confusing behaviour (and the error message could have been clearer, e.g. Storage pool "ssd,size=16GiB" not found)

I think the following would have worked too:

incus init images:debian/bookworm sample --device root,pool=ssd --device root,size=16GiB

Hi @candlerb , your command line with --storage=ssd works as expected. I have missed this option by now. Apparently

# incus init images:debian/bookworm sample --device root,size=16GiB --device root,pool=ssd

works as well, but the --storage=ssd is better readable.

The “ssd,size=16GiB” as shown by the debug output looks like a bug, does it? The documentation promises “–device to override device options”. Plural. The comma seems to imply a list as well.

Anyway, thank you very much for your proficient response.