share files/folder between host & guest (virtfs,virtio,p9,spice enhancements,qemu agent)

necrien

New Member
Nov 24, 2022
11
0
1
I've searched a lot and I'm rather surprised/disappointed to not find more than a few incongruent tidbits of information left and right about accessing host files from guests. A clear and in depth guide for sharing files between proxmox host and guests is sorely needed.

Most people seem to resort to a workaround with NFS or samba for VMs.
For LXC containers, there is bind mounting but that is relatively easy and not my question. (off topic: but does this apply to docker/portainer too?)

Can somebody please refer me to or create a guide for which method to use for "native" host<>guest file sharing? I keep going down rabbit holes and getting lost. I *think* I need something with virtio,virtfs,p9 but don't want to make changes (to my proxmox 7.3 node) until I'm clear on the process. I've never gotten the spice proxy to work. It always fails to start on guests. Plus that is still over the net...
 
Last edited:
I'm not an expert and I've also not been able to find a comphresive guide either, but depending on your setup you will need to add and map the each storage drive, and then map the persmissions for each LXC, or at least this is how I got my working.

It important to plan out the mapping with users and groups, as this can often cause issues with read and write of the data on the storage drive.

Adding the storage drive to Proxmox
https://virtualizeeverything.com/2021/10/17/how-to-add-storage-dive-to-proxmox-7/

Mapping the storage drive to the LXC
https://pve.proxmox.com/wiki/Unprivileged_LXC_containers

Probably not applicable for you, but if you have more than one PVE host or a cluster and want to access the storage on another PVE host, I would recommend specifying the IP addresses of the PVEs and not using *
https://www.golinuxcloud.com/unix-linux-nfs-mount-options-example/
 
Maybe one of the Proxmox Staff could explain why virtfs isn't officially supported by PVE? So many people want to "bind-mount" stuff from the host into a VM, so I would guess there are problems with it. Maybe it isn't mature enough for productive use? Maybe virtfs is missing needed features?
 
Last edited:
  • Like
Reactions: leesteken

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!