5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-03-10 12:58:25 +03:00

followup: make ISO exists check a bit stricter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-04-30 13:07:55 +00:00
parent b56d56cf3a
commit 6aaf593cfd

View File

@ -33,7 +33,7 @@ sub commit_cloudinit_disk {
my $format = PVE::QemuServer::qemu_img_format($scfg, $volname); my $format = PVE::QemuServer::qemu_img_format($scfg, $volname);
my $size = eval { PVE::Storage::file_size_info($iso_path) }; my $size = eval { PVE::Storage::file_size_info($iso_path) };
if (!$size) { if ($size <= 0) {
$volname =~ m/(vm-$vmid-cloudinit(.(qcow2|raw))?)/; $volname =~ m/(vm-$vmid-cloudinit(.(qcow2|raw))?)/;
my $name = $1; my $name = $1;
my $d = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, 4 * 1024); my $d = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, 4 * 1024);