[PATCH pve-storage] lvmplugin: find_free_diskname: check if fmt param exist
Alexandre Derumier
alexandre.derumier at groupe-cyllene.com
Sat Jul 19 14:00:11 CEST 2025
this log have been reported on the forum
"recovering backed-up configuration from 'qotom-pbs-bkp-for-beelink-vms-25g:backup/ct/110/2025-07-17T04:33:50Z'
Use of uninitialized value $fmt in string eq at /usr/share/perl5/PVE/Storage/LVMPlugin.pm line 517.
"
https://forum.proxmox.com/threads/pve-beta-9-cannot-restore-lxc-from-pbs.168633/
Signed-off-by: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
---
src/PVE/Storage/LVMPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index e14f12d..8be2a10 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -514,7 +514,7 @@ sub find_free_diskname {
my $disk_list = [keys %{ $lvs->{$vg} }];
- $add_fmt_suffix = $fmt eq 'qcow2' ? 1 : undef;
+ $add_fmt_suffix = $fmt && $fmt eq 'qcow2' ? 1 : undef;
return PVE::Storage::Plugin::get_next_vm_diskname(
$disk_list, $storeid, $vmid, $fmt, $scfg, $add_fmt_suffix,
--
2.39.5
More information about the pve-devel
mailing list