[SOLVED] Running containers on ZFS, not using "dir" storage

despens

New Member
Oct 9, 2025
7
0
1
Hello all,

I'm sorry if this was discussed previously, just the search terms ZFS, storage, rpool didn't lead me to the info I am looking for.

My past experience is using LXC and incus separately, so perhaps I am misunderstanding how terms I believe to know are used in proxmox.

I have a PVE on a single SSD that i installed with ZFS, resulting in a single rpool zpool.

When I want to launch a container, I am given the option to do it using the "dir" storage type.

1760005112024.png

I know the "dir" storage type in LXC and incus wouldn't make use of ZFS features for snapshots. What I used to do is to create a new ZFS dataset in a zpool and set up LXC or incus to use that. Both would automatically create new ZFS sub-datasets for container file systems and snapshots, making everything very efficient when it comes to backups, compression, file system extensibility, resource sharing, etc.

In proxmox it seems like I can only assign full ZFS pools for such usage, not a ZFS dataset or sub-dataset?

Is there a way to set this up to my preference, so that containers use ZFS features instead of dir? Do I need to take care of this during installation (by creating separate zpools on my single drive)? I'm proficient with handling ZFS on the system level, is there a way to tell proxmox there's an existing ZFS dataset I'd like to use as container storage?

Here's how my ZFS looks...I only have the option to create new pools, but not new datasets:

1760005690024.png

Any hint would be greatly appreciated.
 
In your screenshot you look where the template for the LXC container is stored and that has to be a storage from type dir.
If you go further through the process to the DISKS tab, you will find, that you can select your rpool and Proxmox will create a dataset there.
 
  • Like
Reactions: despens and UdoB
Thank you Andreas!

Am I understanding correctly that I should create a container template and set it to use rpool? The "Template" selector on container creation is empty, see screenshots below. But I cannot find where to create and/or edit templates.

I'm sorry I am confused because of differences in terminology between proxmox and pure LXC I guess

1760007410660.png
 
Hi,

No, you first need to download a template, then after that the next step which is "disks" (on your screen) you will be able to create the disk.

Example : 1760011945756.png

Best regards,
 
  • Like
Reactions: despens
Thank you janus57!

For anybody struggling with this, templates are installed via the command line on the PVE host.

You need to do

Code:
# pveam update
# pveam available
mail            proxmox-mail-gateway-8.2-standard_8.2-1_amd64.tar.zst
mail            proxmox-mail-gateway-9.0-standard_9.0-1_amd64.tar.zst
system          almalinux-10-default_20250930_amd64.tar.xz
system          almalinux-9-default_20240911_amd64.tar.xz
[...]
# pveam download local ubuntu-24.04-standard_24.04-2_amd64.tar.zst

I guess that solves it! I was able to select ZFS as storage type and am seeing sub-datasets being created with my first container:

Code:
# zfs list
NAME                           USED  AVAIL  REFER  MOUNTPOINT
rpool                         2.25G   897G   104K  /rpool
rpool/ROOT                    1.71G   897G    96K  /rpool/ROOT
rpool/ROOT/pve-1              1.71G   897G  1.71G  /
rpool/data                     287M   897G    96K  /rpool/data
rpool/data/subvol-100-disk-0   287M  7.72G   287M  /rpool/data/subvol-100-disk-0
rpool/var-lib-vz               259M   897G   259M  /var/lib/vz

Perfect! Thanks a lot!
 
Great, I found this option (sort of un-intuitively for me) in the global hierarchy under

Datacenter → (desired node) → local → CT Templates