[pve-devel] [RFC v2 storage 04/10] iscsi direct plugin: implement method to get qemu blockdevice options
Fiona Ebner
f.ebner at proxmox.com
Fri May 23 15:31:50 CEST 2025
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
Changes in v2:
* Remove $snapname, is added in later patch as an option.
src/PVE/Storage/ISCSIDirectPlugin.pm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm b/src/PVE/Storage/ISCSIDirectPlugin.pm
index d54dcd8..4bf6d07 100644
--- a/src/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/src/PVE/Storage/ISCSIDirectPlugin.pm
@@ -105,6 +105,20 @@ sub path {
return ($path, $vmid, $vtype);
}
+sub qemu_blockdev_options {
+ my ($class, $scfg, $storeid, $volname) = @_;
+
+ my $lun = ($class->parse_volname($volname))[1];
+
+ return {
+ driver => 'iscsi',
+ transport => 'tcp',
+ portal => "$scfg->{portal}",
+ target => "$scfg->{target}",
+ lun => int($lun),
+ };
+}
+
sub create_base {
my ($class, $storeid, $scfg, $volname) = @_;
--
2.39.5
More information about the pve-devel
mailing list