]> git.proxmox.com Git - qemu-server.git/commitdiff
cloudinit: make genisoimage only output errors
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Mar 2020 13:47:03 +0000 (14:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Mar 2020 13:50:39 +0000 (14:50 +0100)
avoids a genisoimage output like:
> Total translation table size: 0
> Total rockridge attributes bytes: 417
> Total directory bytes: 0
> Path table size(bytes): 10
> Max brk space used 0
> 178 extents written (0 MB)

on every VM start.

Rather than that useless output, tell genisoimage to be quiet, which
still prints errors but nothing else. Additionally print a short
single line about that we're to create the cloud-init iso.

Reformat while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index 07d4d2db931cddefaa57932090c24d0d9689d6ec..559f331f53cac3cc4e1f63fd40749e52f3b45eb1 100644 (file)
@@ -45,10 +45,12 @@ sub commit_cloudinit_disk {
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
     $plugin->activate_volume($storeid, $scfg, $volname);
 
+    print "generating cloud-init ISO\n";
     eval {
-       run_command([['genisoimage', '-iso-level', '3', '-R', '-V', $label, $path],
-                    ['qemu-img', 'dd', '-n', '-f', 'raw', '-O', $format,
-                     'isize=0', "osize=$size", "of=$iso_path"]]);
+       run_command([
+           ['genisoimage', '-quiet', '-iso-level', '3', '-R', '-V', $label, $path],
+           ['qemu-img', 'dd', '-n', '-f', 'raw', '-O', $format, 'isize=0', "osize=$size", "of=$iso_path"]
+       ]);
     };
     my $err = $@;
     rmtree($path);