Storage Issues on New Feature Containers

Hi guys I am trying to create a new container for pi-hole.

Initially i have set the default storage as local-hdd0

Then i tried to create a ubuntu container but it stucks failed to start, it states: Error: mkdir /var/empty/.config: operation not permitted.

I believe it’s due to no permission for the containers to write on disk, but i couldnt find where to change the disk path. I tried to mount a dataset in the / directory but it is not allowed. Could anyone guide me on how to create it properly? Thanks alot!

Are you on 25.10 or on the 26 beta?
I haven’t tested the libvirt backend on the beta, but on 25.10 with incus you normally don’t have to do anything, the backend creates the root filesystem under /mnt/.ix-virt. I did not have to set any special permissions on the Pool.

Sorry i dont know what is incus. I didnt do anything special for the truenas host and leave almost all settings as default. I also checked and there are no /mnt/.ix-virt directory in my system. I am running Truenas 25.10. Thanks

To create it, select a pool to use for containers.

Can you try working through the online documentation and let us know where you are getting stuck?

incus is the backend that runs the lxc containers in 25.10
The .ix-virt should have been automatically created when you selected a pool to host the containers. But since it’s a hidden dataset it doesn’t show up in the truenas gui, only if you use the shell to navigate to /mnt/.ix-virt

Thanks for the information. I have searched the web and only find this tutorial. In the tutorial i saw it requires to create a volume and import a zvol, which i believe is not related to my issue. In the tutorial it has a root disk which i dont have when i create the container.

Yep I navigate to the /mnt and i can only find .ix-app, no .ix-virt. which is kind of weird as it should be generated when i initiate the pool

Thanks. Yes i have select the pool. In fact there is no way to initialize the container feature if i dont select the pool

just checked on my system and weirldy enough i also don’t have an .ix-virt dataset under /mnt

May i ask what image are u using? I only know how to use lxc in proxmox, which also required me to indicate where the root disk is located, but in truenas it did not ask for the location for the root disk, only if i want to create mount point in storage

i’m using a debian trixie lxc to host my docker stack

just spin up a debian trixie lxc still same error.
Error: mkdir /var/empty/.config: operation not permitted

hmm, i just created a new test lxc, took literally 20 seconds and it was up and running

Ok i found where the rootfs is stored
It’s under

/var/lib/incus/storage-pools/containers/

Thanks, i have the directory /var/lib/incus/storage-pools/local-hdd0 .

I managed to fix the issue. When i compare the permission of the admin account to another instance, i created a new admin account to try it out, and i found that in order to use sudo in ssh, i need to have a home directory set, which in my original account it was set to /var/empty. I changed the home directory to /mnt/local-hdd0/home/admin, then it fix the issue. ( i dont know why it need to start with /mnt while my another instance start with /home/truenas_admin