]> git.proxmox.com Git - qemu-server.git/commitdiff
cloud init: add comment regarding 3 MiB size limit
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Nov 2021 12:14:09 +0000 (13:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Nov 2021 12:14:17 +0000 (13:14 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Originally-by: Mira Limbeck <m.limbeck@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index 420566e798ea607517e5974bdfeb3c87f2e960e3..cc8970cbc97de2d4b28feb5a68347c900da2777c 100644 (file)
@@ -235,6 +235,8 @@ sub generate_configdrive2 {
        $meta_data = configdrive2_gen_metadata($user_data, $network_data);
     }
 
+    # we always allocate a 4MiB disk for cloudinit and with the overhead of the ISO
+    # make sure we always stay below it by keeping the sum of all files below 3 MiB
     my $sum = length($user_data) + length($network_data) + length($meta_data) + length($vendor_data);
     die "Cloud-Init sum of snippets too big (> 3 MiB)\n" if $sum > (3 * 1024 * 1024);
 
@@ -489,6 +491,8 @@ sub generate_nocloud {
        $meta_data = nocloud_gen_metadata($user_data, $network_data);
     }
 
+    # we always allocate a 4MiB disk for cloudinit and with the overhead of the ISO
+    # make sure we always stay below it by keeping the sum of all files below 3 MiB
     my $sum = length($user_data) + length($network_data) + length($meta_data) + length($vendor_data);
     die "Cloud-Init sum of snippets too big (> 3 MiB)\n" if $sum > (3 * 1024 * 1024);