shared disk on all VM

Fullmoon

Member
Jun 19, 2020
35
1
13
35
Good afternoon. can you tell me if it is possible to somehow mount a shared disk to several virtual machines with read-only rights?
1653074781775.png
 
Shared at the same time? VM disks are block devices and aren't supposed to be used by more than one OS at the same time. Like a HDD/SSD that can't be connected to multiple PCs at the same time. If you need some shared storage between VMs the usual way to go would be to run a LXC/VM as SMB/NFS server (aka NAS) that shares the contents of virtual disks via NFS/SMB and all the other VMs then access it using NFS/SMB shares mounted within their guest OS. With that its also easy to share a folder as read-only.
 
Is it possible in theory? Yes: https://serverfault.com/questions/681884/kvm-sharing-a-physical-hard-drive-between-vms

Can you do it with PVE out of the box - no. Should you be doing this - also NO. As @Dunuin said raw disks are not supposed to be accessed at the same time by two independent OS's. Although, its often done in Enterprise with bumpers in place, i.e. scsi reservations, cluster aware file systems, etc.
For your use case figure out how to run NFS either on PVE itself, or inside a VM.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
In addition to that what has been said already, there is also the possibility to share an already existing directory (with including files) directly with QEMU/KVM, which is AT THE MOMENT not possible via GUI, but by editing the VM configuration by hand. I read a good writeup about the settings, but I cannot find it anymore ... the technology behind this is named virtiofs.
 

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!