Make host vg / lv or partition directly available to vm

0920799u

Member
Oct 2, 2018
3
0
21
Paris, France
Hello,

Is there a way to make either an entire host lvm volume group or logical volume or partition inside that volume directly available to a vm ?

I would need this to import old data from a non virtualized machine inside a vm.

I tried adding storage from the vg, but the gui would only let me create a new volume inside it.

Any help appreciated.
 
yes, you can pass-through any block device from the host to a VM if you have root privileges - see https://pve.proxmox.com/wiki/Physical_disk_to_kvm

obviously, you are responsible for making sure that you only access the device from within this one VM, and not from host+VM or from multiple VMs.
 
Would there be a way to mount the partition from the node in multiple vms and lxcs without possible data corruption issues?