zfs iscsi plugin: implement new method to get qemu blockdevice options
Reported-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
c136eb76c7
commit
02931346c6
@ -247,6 +247,22 @@ sub path {
|
||||
return ($path, $vmid, $vtype);
|
||||
}
|
||||
|
||||
sub qemu_blockdev_options {
|
||||
my ($class, $scfg, $storeid, $volname) = @_;
|
||||
|
||||
my $name = ($class->parse_volname($volname))[1];
|
||||
my $guid = $class->zfs_get_lu_name($scfg, $name);
|
||||
my $lun = $class->zfs_get_lun_number($scfg, $guid);
|
||||
|
||||
return {
|
||||
driver => 'iscsi',
|
||||
transport => 'tcp',
|
||||
portal => "$scfg->{portal}",
|
||||
target => "$scfg->{target}",
|
||||
lun => int($lun),
|
||||
};
|
||||
}
|
||||
|
||||
sub create_base {
|
||||
my ($class, $storeid, $scfg, $volname) = @_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user