I am trying to set “storage.images_volume” on a Project level so that a given project will have a dedicated volume to store all its images (of that Project). And then a dedicated storage to store the root disks of all the containers and vms (of that Project)
I believe I am able to get the later part right but it is the ‘storage.images_volume’ that I couldn’t figure out what I am doing wrong Appreciate any help/advice.
Here is my setup:
I created a project name ‘Handson-lab-1’
# uname -a
Linux red-handsonbox 6.8.0-58-generic #60-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 14 18:29:48 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
# incus --version
6.12
# incus project list -f compact
NAME IMAGES PROFILES STORAGE VOLUMES STORAGE BUCKETS NETWORKS NETWORK ZONES DESCRIPTION USED BY
Handson-lab-1 (current) YES YES YES YES YES YES Project Handson-lab-1 2
default YES YES YES YES YES YES Default Incus project 2
I have 3 ZFS pools (I have more but removing them just to focus on the issue)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
basepool 5.50G 6.49M 5.49G - - 6% 0% 1.00x ONLINE -
imgpool-1 154G 782K 154G - - 0% 0% 1.00x ONLINE -
zpool-1 316G 748K 316G - - 0% 0% 1.00x ONLINE -
I added both of them to incus storage
# incus storage list -f compact
NAME DRIVER DESCRIPTION USED BY STATE
basepool zfs passed to incus admin init 1 CREATED
images-1 zfs Storage for images of Handson-lab-1 1 CREATED
storage-1 zfs Storage for Containers, VMs of Handson-lab-1 1 CREATED
‘storage-1’ is backed by ZFS zpool-1
# incus storage show storage-1
config:
source: zpool-1
volatile.initial_source: zpool-1
zfs.pool_name: zpool-1
description: Storage for Containers, VMs of Handson-lab-1
name: storage-1
driver: zfs
used_by:
- /1.0/profiles/default?project=Handson-lab-1
status: Created
locations:
- none
‘images-1’ is backed by ZFS imgpool-1
# incus storage show images-1
config:
source: imgpool-1
volatile.initial_source: imgpool-1
zfs.pool_name: imgpool-1
description: Storage for images of Handson-lab-1
name: images-1
driver: zfs
used_by:
- /1.0/storage-pools/images-1/volumes/custom/volume-1?project=Handson-lab-1
status: Created
locations:
- none
I have a volume named ‘volume-1’ on storage ‘images-1’
# incus storage volume list images-1 -f compact
TYPE NAME DESCRIPTION CONTENT-TYPE USED BY
custom volume-1 filesystem 0
# incus storage volume show images-1 volume-1
config: {}
description: ""
name: volume-1
type: custom
used_by: []
location: none
content_type: filesystem
project: Handson-lab-1
created_at: 2025-04-27T17:03:40.277833097Z
My current configuration for the project Handson-lab-1 is as follows:
# incus project show Handson-lab-1
config:
features.images: "true"
features.networks: "true"
features.networks.zones: "true"
features.profiles: "true"
features.storage.buckets: "true"
features.storage.volumes: "true"
restricted: "true"
restricted.containers.lowlevel: allow
restricted.containers.nesting: allow
restricted.containers.privilege: allow
restricted.devices.disk: managed
restricted.devices.gpu: allow
restricted.snapshots: allow
restricted.virtual-machines.lowlevel: allow
description: Project Handson-lab-1
name: Handson-lab-1
used_by:
- /1.0/profiles/default?project=Handson-lab-1
- /1.0/storage-pools/images-1/volumes/custom/volume-1?project=Handson-lab-1
I believe I got the default profile for the project (Handson-lab-1) right so that the root disk for all containers and vms does go to ‘storage-1’ as I wanted to:
# incus profile show default
config:
security.nesting: "true"
security.privileged: "true"
description: Default Incus profile for project Handson-lab-1
devices:
root:
path: /
pool: storage-1
type: disk
name: default
used_by: []
project: Handson-lab-1
(Note: I know I don’t have the network setup in the default profile. That is intentional because I am planning on having a different profiles for networks. I will pass the network profiles while launching instances)
THIS IS WHERE I NEED HELP/ADVICE. WHY DOES IT FAIL ? I AM CLEARLY PASSING THE NAME OF THE PROJECT
# incus config set storage.images_volume images-1/volume-1 --project Handson-lab-1
Error: Failed validation of "storage.images_volume": Failed loading storage volume "images-1/volume-1" in "default" project: Storage volume not found
Why is it looking at the “default” project when I am specifically mentioning that the action has to be carried out on the project Handson-lab-1 ?
When I tried to modify the default profile (meant for the Project)
# incus profile show default
config:
storage.images_volume: images-1/volume-1 --------------->> Added this line manually
security.nesting: "true"
security.privileged: "true"
description: Default Incus profile for project Handson-lab-1
devices:
root:
path: /
pool: storage-1
type: disk
name: default
used_by: []
project: Handson-lab-1
I am getting the error:
# incus profile edit default
Config parsing error: Unknown configuration key: storage.images_volume
Press enter to open the editor again or ctrl+c to abort change
I tried this one too:
# incus project set Handson-lab-1 storage.images_volume=images-1/volume-1
Error: Invalid project configuration key "storage.images_volume"
My question is - Where exactly should I define “storage.images_volume” on a Project level ?
Any advice would help. Thanks!