lvm plugin: list images: properly handle qcow2 format
In particular, this also fixes volume rescan.
Fixes: eda88c9 ("lvmplugin: add qcow2 snapshot")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250718102023.70591-2-f.ebner@proxmox.com
This commit is contained in:
committed by
Thomas Lamprecht
parent
9b6e138788
commit
aea2fcae82
@ -752,11 +752,17 @@ sub list_images {
|
|||||||
next if defined($vmid) && ($owner ne $vmid);
|
next if defined($vmid) && ($owner ne $vmid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $format = ($class->parse_volname($volname))[6];
|
||||||
|
my $size =
|
||||||
|
$format eq 'qcow2'
|
||||||
|
? $class->volume_size_info($scfg, $storeid, $volname)
|
||||||
|
: $info->{lv_size};
|
||||||
|
|
||||||
push @$res,
|
push @$res,
|
||||||
{
|
{
|
||||||
volid => $volid,
|
volid => $volid,
|
||||||
format => 'raw',
|
format => $format,
|
||||||
size => $info->{lv_size},
|
size => $size,
|
||||||
vmid => $owner,
|
vmid => $owner,
|
||||||
ctime => $info->{ctime},
|
ctime => $info->{ctime},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user