mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
followup: do not query size of image we just created
we know the size, and even if a storage plugin pads this up (it mustn't alloc something smaller, but something bigger can be OK) we know that our 4MB is OK, and can only be used anyway to make this compatible between storage plugins. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6aaf593cfd
commit
84821d1515
@ -36,8 +36,9 @@ sub commit_cloudinit_disk {
|
||||
if ($size <= 0) {
|
||||
$volname =~ m/(vm-$vmid-cloudinit(.(qcow2|raw))?)/;
|
||||
my $name = $1;
|
||||
my $d = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, 4 * 1024);
|
||||
$size = PVE::Storage::file_size_info($iso_path);
|
||||
$size = 4 * 1024;
|
||||
PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $format, $name, $size);
|
||||
$size *= 1024; # vdisk alloc takes KB, qemu-img dd's osize takes byte
|
||||
}
|
||||
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
|
Loading…
x
Reference in New Issue
Block a user