Problem/Justification
I noticed that the LXC system container created by Incus seems to be placed in the .ix-virt/containers
directory, which makes it impossible for users to access the container storage path and perform snapshot operations through the Dataset Page. Furthermore, LXC VMs created with Incus completely lose the protection of snapshots.
Impact
Previously, when using the KVM backend, users could only store virtual machine data through zfs zvol. Sincezfs zvol does not allow shrinking, this resulted in a lot of space waste.
Incus provides two mature ways to implement snapshots, one based on zfs dataset and the other based on zfs zvol, but TrueNAS does not currently provide these features. Please refer to:
These are all direct functions provided by Incus, which means they can be implemented at a very low development cost.
In addition, Incus in 25.04 RC.1 provides an instance-based mounting function, which does not seem to be implemented based on Incus Storage Drivers
, but is similar to Docker’s path mapping function, and does not allow mounting the root directory.
User Story
There are two ways to achieve this:
-
Use a method similar to
ixVolumes
to manage snapshots of Incus LXC containers through a separate WebUI, which requires more development and is not flexible. At least I prefer to manage the Dataset after mapping the path through the Host Path, although this may create some security risks. -
Add an option to the instance creation page to mount the root path of the LXC container to the zfs dataset or zfs zvol function, and then manage it manually through the Dataset Page.