mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 22:53:08 +00:00
cloudinit: use detected format in volname parsing
keep the ?, as format is raw if no file ending is there, which we want to handle too. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
84821d1515
commit
92fcaab73a
@ -34,7 +34,7 @@ sub commit_cloudinit_disk {
|
||||
|
||||
my $size = eval { PVE::Storage::file_size_info($iso_path) };
|
||||
if ($size <= 0) {
|
||||
$volname =~ m/(vm-$vmid-cloudinit(.(qcow2|raw))?)/;
|
||||
$volname =~ m/(vm-$vmid-cloudinit(.\Q$format\E)?)/;
|
||||
my $name = $1;
|
||||
$size = 4 * 1024;
|
||||
PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, $size);
|
||||
|
Loading…
Reference in New Issue
Block a user