You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debian 12 (bookworm) with PVE/PBS APT sources added, primarily for matching ZFS userspace distrib, but also to optionally install any PVE/PBS components
APT Sources Host and CT
/etc/apt/sources.list
deb https://mirrors.xmission.com/debian bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.xmission.com/debian bookworm main contrib non-free non-free-firmware
deb https://mirrors.xmission.com/debian bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.xmission.com/debian bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.xmission.com/debian bookworm-backports-sloppy main contrib non-free non-free-firmware
deb-src https://mirrors.xmission.com/debian bookworm-backports-sloppy main contrib non-free non-free-firmware
deb https://mirrors.xmission.com/debian bookworm-proposed-updates main contrib non-free non-free-firmware
deb-src https://mirrors.xmission.com/debian bookworm-proposed-updates main contrib non-free non-free-firmware
deb https://mirrors.xmission.com/debian bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.xmission.com/debian bookworm-updates main contrib non-free non-free-firmware
# security updates
deb https://security.debian.org bookworm-security main contrib non-free non-free-firmware
It's a proxmox hookscript. Documentation is located here: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_hookscripts
You have to place it in /var/lib/vz/snippets and add it to the conf of your lxc at /etc/pve/lxc by adding (in my configuration) hookscript: local:snippets/hook121.sh
I'm using this without any problems to automate ZFS zoning on my proxmox.
very good. This works indeed very well.
However, I can see that I still have access to the entire pool from the LXC, for example, I can do zpool scrub from the LXC. Also what is not so nice is that the mountpoint for newly created datasets is not configured automatically.
Is it somehow possible to hide the pool from "tpool status" and/or disable access to the pool itsel for the LXC, and is it further possible to automatically set the mountpoints for newly created datasets, like it is the normal behaviour when one is working directly on the host?
It works for unprivileged containers, but does not work for unprivileged ones. (I need to look into Incus code, how they handle this)
And pre-stop is too early to unzone, ideally it must be post-stop. (otherwise poweroff or reboot in container can bring a lot of fun, depending on situation). So, it has to go deeper to the proxmox code. But Proxmox devs refusing to even consider zfs zoning for containers.
Hi antst,
do you think it is somehow possible to make this work with a privileged container?
I just tried it and it fails. The error shown is: "Failed to initialize the libzfs library." but I cannot figure out why.
Amazing work and weird that this isn't more documented or used as the potential of ZFS zoning is particularly interesting in HA setups (my use case).
I did have to chmod 0 /usr/sbin/reboot in the container as rebooting the container or LXC without the host OS 'knowing' - thus not remapping the new namespace - screws things up.
Thanks! I'll give this a try!