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
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.
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 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