- shared directory name - Arbitrary directory name that you want to share with Guest. I recommend using the same in Guest and Host to avoid confustion.
- virtual machine id - An ID of Virtual Machine that will have access to shared directory. The ID is visible in proxmox and will usually be 3 digit: 100, 101.. .
- mount tag - Unique tag that identifies which shared directory needs to be the same in both Host and Guest configuration.
$ zfs create -o mountpoint=/9pshare -o acltype=posixacl -o xattr=sa -o aclinherit=passthrough rpool/9pshare
$ mkdir /9pshare/<shared directory name>
$ nano /etc/pve/qemu-server/<virtual machine id>.conf
Add a line that says:
args: -virtfs local,path=/9pshare/<shared directory name>,mount_tag=<mount tag>,security_model=mapped-xattr,id=fs0
Save the file and start VM.
Make sure the following kernel modules are loaded: 9p
, 9pnet
, 9pnet_virtio
.
Then edit the fstab
file:
$ mkdir /<shared directory name>
$ nano /etc/fstab
Add the following line:
<mount tag> /<shared directory name> 9p trans=virtio,version=9p2000.L,nobootwait,rw,msize=524288,user_xattr,posixacl,_netdev 0 0
Save fstab
and check it for errors:
$ mount -a
That's all :)
$ apt update; apt install fio
$ fio --name=write_throughput --directory=/<shared directory name> --numjobs=4 --size=4G --time_based --runtime=180s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=write --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64
- https://nerdig.es/proxmox-und-openmediavault/
- https://wiki.qemu.org/Documentation/9psetup
- https://wiki.qemu.org/Documentation/9p_root_fs
- https://en.wikipedia.org/wiki/9P_(protocol)
- https://github.com/plan9foundation
- https://twitter.com/matthiasendler/status/1005492101323415554
- https://iconduck.com/icons/1936/proxmox
- https://neellik.com/openmediavault/
- https://cloud.google.com/compute/docs/disks/benchmarking-pd-performance