[pve-devel] Proxmox support - to develop custom storage plugin

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Tue Mar 12 18:00:48 CET 2024


Hi,

In general, the qemu processi have access to filepath
(/mnt/.../*.raw|.qcow)  or block dev (/dev/).

in:
/usr/share/perl5/PVE/QemuServer.pm
sub print_drivedevice_full {
    my ($storecfg, $conf, $vmid, $drive, $bridges, $arch,
$machine_type) = @_;
 ....
  $path = PVE::Storage::path($storecfg, $drive->{file});


The path function defined in your plugin or used the default inherited
from PVE/Storage/Plugin.pm)




Depending of your storage, you also have the activate_volume() to
expose the /dev/ on the host for example

activate_storage() to mount a nfs fs for example.


Also, if you use iscsi, it's possible that qemu is mapping an iscsi lun
directly , wihout need to expose it on the host.
(have a look at zfs over iscsi for example)





What is your storage protocol ?


-------- Message initial --------
De: "Lothe, Jyotsna Pankaj via pve-devel" <pve-devel at lists.proxmox.com>
Répondre à: Proxmox VE development discussion <pve-
devel at lists.proxmox.com>
À: pve-devel at lists.proxmox.com <pve-devel at lists.proxmox.com>
Cc: "Lothe, Jyotsna Pankaj" <jyotsna.lothe at hpe.com>
Objet: [pve-devel] Proxmox support - to develop custom storage plugin
Date: 12/03/2024 14:28:22

Hi Team,

I am from an HPE team where we are looking for a POC to use Proxmox as replacement for VMWare virtualization.
We are able to write small code for custom storage plugin by writing a plugin file under /usr/share/perl5/PVE/Storage/Custom/HpePlugin.pm.
We are able to connect to our storage and are fetching the list of volumes from our storage.

The pvesm status command shows plugin as active, see below output:

root at pmvm:~# pvesm status
Name            Type     Status           Total            Used       Available        %
local            dir     active         6733592         3761440         2608840   55.86%
prim_220         hpe     active         6733592         3761440         2608840   55.86%
root at pmvm:~#

and the pvem list shows below volumes from our storage :

root at pmvm:~# pvesm list three_par
Volid Format  Type      Size VMID
0     raw     images     10 101
1     raw     images     80 101
3     raw     images     20 101
4     raw     images     32 101
5     raw     images    100 101

Now we would like to understand the flow how we can map these volumes to create VMs?

Can someone from team guide us to understand the volume--> to--> VM mapping?

Regards,
Jyotsna


More information about the pve-devel mailing list