Shared Disk between VMs

tirili

Member
Sep 19, 2018
55
1
8
50
According http humblec com /how-to-share-a-disk-to-more-than-one-vm-using-libvirt-or-what-sharable-flag-do-in-libvirt/ there is the possibility to flag a disk image as shared between more than 1 VMs.

How is this achieveable using proxmox?

running

pvesh create /nodes/XXX/storage/pve/content -filename vm-1001-disk-sh-1 -format raw -size 5G --vmid 1001

creates a disk in PVE Storage.
How can I now flag it to use it as well in vmid 1002 and vmid 1003 respectively?

Any help is appreciated.
Best regards
Thomas
 
The solution is easy, but I am not quite sure if really correct:

* Stop VM
* Just add the disks in the Configuration File "/etc/pve/local/qemu-server/1001.conf" and "/etc/pve/local/qemu-server/1002.conf"

scsi1: pve:vm-1001-disk-sh-1
scsi2: pve:vm-1002-disk-sh-1
scsihw: virtio-scsi-pci

* Start the VMs
* Enjoy

But keep in mind, you need to use these only with a clustered Filesystem, e.g. GPFS etc. inside the VMs.
 
@tirili is right. Besides the clusteres filesystem remark, you also cannot create snaphots anymore or more precisely revert to them.

In situations where I need the snapshot capability, I install a third machine, configure iSCSI target. In my client nodes, I connect to the storage and are now able to snapshot all three machines to have a consistent state.
 
Is there any possibility to snapshot the "non shared" disks, and only keep the others out from the snapshot?
 

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!