VMs and default storage

Below are two examples on how I create a container and a VM. Somehow the VM isn’t getting assigned to the default storage pool.

A container:

 >  incus create images:nixos/25.11 kolla-fel-med-storage-2 -c security.nesting=true
Creating kolla-fel-med-storage-2
 >  incus config show kolla-fel-med-storage-2                     architecture: x86_64
config:
  image.architecture: amd64
  image.description: Nixos 25.11 amd64 (20260608_01:02)
  image.os: Nixos
  image.release: "25.11"
  image.requirements.secureboot: "false"
  image.serial: "20260608_01:02"
  image.type: squashfs
  image.variant: default
  security.nesting: "true"
  volatile.apply_template: create
  volatile.base_image: 5db4454986a1f24356d716593b4d954700f8fd69f258a400dc8994c5c7c2a0c5
  volatile.cloud-init.instance-id: ffee7bfb-6196-4224-88e7-e093cce0d591
  volatile.eth0.hwaddr: 10:66:6a:56:bc:08
  volatile.idmap.base: "0"
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[]'
  volatile.uuid: bdebaf30-0c1e-461c-90f5-8552cbe73e69
  volatile.uuid.generation: bdebaf30-0c1e-461c-90f5-8552cbe73e69
devices: {}
ephemeral: false
profiles:
  - default
stateful: false
description: ""
 >  
 

…and a VM:

>  incus create --vm images:nixos/25.11 auvis2 -c security.secureboot=false
Creating auvis2
 >  incus config show auvis2
architecture: x86_64
config:
  image.architecture: amd64
  image.description: Nixos 25.11 amd64 (20260608_01:02)
  image.os: Nixos
  image.release: "25.11"
  image.requirements.secureboot: "false"
  image.serial: "20260608_01:02"
  image.type: disk-kvm.img
  image.variant: default
  security.secureboot: "false"
  volatile.apply_template: create
  volatile.base_image: 978bcc2ddfb9b89fedd956c297d95dedc41095f1aee9ddf8b4143f73df6b737f
  volatile.cloud-init.instance-id: 69611655-4943-4f27-9b65-fc7a41698c0c
  volatile.eth0.hwaddr: 10:66:6a:fe:72:22
  volatile.uuid: a7fd52b0-13cb-45a0-8ad2-85d010444e0e
  volatile.uuid.generation: a7fd52b0-13cb-45a0-8ad2-85d010444e0e
devices: {}
ephemeral: false
profiles:
  - default
stateful: false
description: ""
 >

also tested with a ubuntu 26 VM and same problem there. Default storage is not used (a ZFS pool) and instead I get

root@auvis2:~# df
Filesystem     1K-blocks    Used Available Use% Mounted on
tmpfs            1516104    1240   1514864   1% /run
/dev/sda2        9987208 3392232   6578592  35% /
tmpfs            3790256       0   3790256   0% /dev/shm
efivarfs             256      12       240   5% /sys/firmware/efi/efivars
none                1024       0      1024   0% /run/credentials/systemd-journald.service
tmpfs            3790260       0   3790260   0% /tmp
none                1024       0      1024   0% /run/credentials/systemd-resolved.service
tmpfs              51200   18612     32588  37% /run/incus_agent
/dev/sda1         100784    8757     92028   9% /boot/efi
none                1024       0      1024   0% /run/credentials/systemd-networkd.service

…instead of the desired:

> incus exec kolla-fel-med-storage2 -- bash

[root@nixos:~]# df
Filesystem                               1K-blocks   Used Available Use% Mounted on
default/containers/kolla-fel-med-storage 853709824 477568 853232256   1% /
none                                       1605768      4   1605764   1% /dev
devtmpfs                                   1605768      0   1605768   0% /dev/zfs
efivarfs                                       192    163        25  87% /sys/firmware/efi/efivars
tmpfs                                          100      0       100   0% /dev/incus
tmpfs                                          100      0       100   0% /dev/.incus-mounts
tmpfs                                     16057676      0  16057676   0% /dev/shm
tmpfs                                      8028840    100   8028740   1% /run
tmpfs                                     16057676   1080  16056596   1% /run/wrappers

is it not possible to have a VM that uses the ZFS storage pool?

Virtual machines get a virtual hard disk, they don’t get a directory on the host like containers do.

Your VM is still stored on ZFS on the host but instead of a folder (dataset), it’s getting a volume (zvol) which to the VM appears as a regular hard disk (/dev/sda) with its own partitions and filesystems. All our images ship with a GPT partition table and ext4 for the partition.

Oh ok. The more I searched I started to suspect Incus treated them differently when it comes to storage but wasn’t sure.

Now I launched my image with

incus launch ...  --device root,size=150GiB

…and hope that will work out better.

Thanks for setting things straight. Impressed to get a reply from the developer himself!