From 4f3c1d40efaa929626eadfb5e1843c833cd9e0c6 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier via pve-devel Date: Sat, 19 Jul 2025 14:00:11 +0200 Subject: [PATCH] lvmplugin: find_free_diskname: check if fmt param exist 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 Link: https://lore.proxmox.com/mailman.221.1752926423.354.pve-devel@lists.proxmox.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,