iscsi direct plugin: implement method to get qemu blockdevice options

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner
2025-07-02 18:27:39 +02:00
committed by Fabian Grünbichler
parent 073c5677c7
commit c136eb76c7

View File

@ -110,6 +110,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) = @_;