]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
introduce one global CLOUDINIT_DISK_SIZE constant
[qemu-server.git] / PVE / API2 / Qemu.pm
index 62e654906cfcfccf3f731ae64b13fcc1c71b6f68..a628a20cd51a530cdeaae1e336c1ebaa5b021f6c 100644 (file)
@@ -159,8 +159,8 @@ my $create_disks = sub {
            }
 
            # Initial disk created with 4 MB and aligned to 4MB on regeneration
-           my $ci_size = 4 * 1024;
-           my $volid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, $name, $ci_size);
+           my $ci_size = PVE::QemuServer::Cloudinit::CLOUDINIT_DISK_SIZE;
+           my $volid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, $name, $ci_size/1024);
            $disk->{file} = $volid;
            $disk->{media} = 'cdrom';
            push @$vollist, $volid;