Incus webui import image error

Anyone know why I’m getting the following error when importing a custom iso with the webui? The file gets all the way up there then i get this:

Failed creating custom volume from ISO: Failed creating volume: Failed to run: zfs create -s -V 5500297216 -o volmode=none -o incus:content_type=iso pool1/incus/custom/default_Parrot-security-6.0_amd64.iso.iso: signal: aborted (core dumped) (internal error: cannot create 'pool1/incus/custom/default_Parrot-security-6.0_amd64.iso.iso': Invalid argument)

zfs version
zfs-2.1.5-1ubuntu6~22.04.2
zfs-kmod-2.2.0-0ubuntu1~23.10
incus version 
Client version: 0.6
Server version: 0.6

pool1/incus                                                                                1.12M  5.42T       96K  legacy
pool1/incus/buckets                                                                          96K  5.42T       96K  legacy
pool1/incus/containers                                                                       96K  5.42T       96K  legacy
pool1/incus/custom                                                                           96K  5.42T       96K  legacy
pool1/incus/deleted                                                                         576K  5.42T       96K  legacy
pool1/incus/deleted/buckets                                                                  96K  5.42T       96K  legacy
pool1/incus/deleted/containers                                                               96K  5.42T       96K  legacy
pool1/incus/deleted/custom                                                                   96K  5.42T       96K  legacy
pool1/incus/deleted/images                                                                   96K  5.42T       96K  legacy
pool1/incus/deleted/virtual-machines                                                         96K  5.42T       96K  legacy
pool1/incus/images                                                                           96K  5.42T       96K  legacy
pool1/incus/virtual-machines                                                                 96K  5.42T       96K  legacy

So that’s saying that zfs create crashed somehow.

Anything interesting in dmesg?

Also, do you perhaps not have enough free space in your pool? Wondering what else could explain that failure.

I have about 4tb free so definitely not space. Can’t grab dmesg right now but will check when I’m back.

poked some more and there’s nothing in dmesg or journalctl that seems relevant. That said, if i remove the -s -V 5500297216 then it creates the dataset, so i’m wondering if something is calculating the size incorrectly.

If instead, i provide a human number for the size, it works fine:

sudo zfs create -s -V 5G -o volmode=none -o incus:content_type=iso pool1/incus/custom/default_Parrot-security-6.0_amd64.iso

Perhaps this is an edge case of a large iso?

Well, what’s odd is that it’s failing during the dataset creation rather than during its consumption.
Do you have a link to the exact ISO somewhere so I can try to import it on ZFS here?

Guessing it’s not file specific, but it’s this one: https://deb.parrot.sh/parrot/iso/6.0/Parrot-security-6.0_amd64.iso

stgraber@dakara:~/Downloads$ incus storage volume import default Parrot-security-6.0_amd64.iso parrot --type=iso
stgraber@dakara:~/Downloads$ sudo zfs list -t all | grep parrot
dakara/incus/custom/default_parrot.iso                                                                       5.15G   653G  5.15G  -
stgraber@dakara:~/Downloads$ 

I can try it command line later. Not sure what to say, it’s constantly reproducible on my box :thinking:

Same error:

incus storage volume import incus-zfs .\Downloads\Parrot-security-6.0_amd64.iso parrot --type=iso

Error: Failed creating custom volume from ISO: Failed creating volume: Failed to run: zfs create -s -V 5500297216 -o volmode=none -o incus:content_type=iso pool1/incus/custom/default_parrot.iso: signal: aborted (core dumped) (internal error: cannot create 'pool1/incus/custom/default_parrot.iso': Invalid argument)

Ok, so it has to do with the rounding of the size not happening for reason. If i do the following manually, it works:

zfs create -s -V 5500297216 -o volblocksize=128K -o volmode=none -o incus:content_type=iso pool1/incus/custom/default_parrot.iso

So basically explicitly telling zfs to use volblocksize=128K makes this work. 128K is the default (according to documentation) so explicitly adding that shouldn’t affect anything, though i guess it’s possible for others to explicitly have some different volblocksize set.

Ah, so you can probably fix that for you by setting volblocksize=128K on pool1/incus/custom so all custom volumes use the standard size.

Just installed a new version of ubuntu on my laptop and immediately ran into the exact same issue off a fresh install. The following command failed:

sudo zfs set volblocksize=128K rpool/incus/custom
cannot set property for 'rpool/incus/custom': 'volblocksize' does not apply to datasets of this type

Of note, incus creates the datasets of mount type legacy which might be why it’s saying this.

For now, the solution I have been using is to run the truncate command on any iso prior to importing. Not optimal, but it allows me to import:

truncate -s "%128K" Ubuntu.iso

Can you try incus storage set POOL volume.zfs.blocksize=128KiB?