Asking for suggestion: How to access ZFS dataset from VM

Tony

Renowned Member
Nov 4, 2010
111
9
83
Hi,

I am looking for a way to share my ZFS dataset (= DS) with a VM. Options that I am considering:

(1) export DS to VM via NFS: great for private network, not so great if the VM is a public host
(2) create a disk on ZVOL and attach it to the VM: easiest option, but I must allocate the storage to the ZVOL ahead. This is similar to lvm volume and is not very flexible.
(3) create a LXC to access the ZFS DS on node, then mount it on VM using sshfs. Why an extra layer with LXC? To limit access to PVE host, in case the public VM is compromised.

Perhaps there are other options that I missed? Thanks in advance for any hint.
 
  • Like
Reactions: norsemangrey
Hi,

Sometimes, it is wise not do a task because you can ;) The biggest idea of any virtual enviroment like PMX is to have very few services on the host and run anything else inside VMs/CTs and to DO NOT use anything to connect from a VM/CT to the host/hipervisor.

So the recomended way is to create a dedicated VM where you can run any desired service (san/nas) who can be accessed by others VM/CT(using a vlan if it is possible) with some firewall rules.

In a such situation, any problem on this VM will not impact on PMX host, or in case of a security problem because any VM / CT can not connect to the host.

Good luck / Bafta !
 
  • Like
Reactions: jaclas

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!