mount storage in vm

itsme

New Member
Apr 4, 2021
2
0
1
30
Hello everyone,
I'm sure this question has been answered before but I couldn't find a solution so far.
I'd be very thankful for help in form of a link to a thread that answeres my question or an answer.

I created a zfs dataset which I added as storage via datacenter -> storage -> add -> directory

THE TASK: I want to use said storage as storage inside an ubuntu vm for my nextcloud data.

THE QUESTION: How do I mount this storage inside my vm in a way that I can automount it on boot of the vm
via fstab and have read write access to it?

I know I can add a Disk via Hardware -> add -> Hard Disk
I don't know what kind of format I should use for my purposes.
I want to mount it via fstab and I don't know a way to mount qcow2 that way.

am I aproching this problem the wrong way?

Thank you very much in advance for taking the time for my problem!
 
If you use
  • datacenter -> storage -> add -> zfs (Disk Image) instead of directory
  • Hardware -> add -> Hard Disk lets use select the zfspool to use "raw" storage. This uses a ZVOL, which you can format from within the VM and mount in fstab.
Alternative: use nfs

OR:

For netcloud you can also use an lxc container, which then lets you mount a zfs dataset directly:
Code:
pct set 100 -mp0 /storage/share/downloads,mp=/home/user/downloads
 
Thank you very much!
This solved my problem nicely. :)
 
Last edited: