+ my $comment = '';
+ # add description as comment to top of file
+ my $description = $cfg->{description} || '';
+ foreach my $line (split(/\n/, $description)) {
+ $comment .= '#' . PVE::Tools::encode_text($line) . "\n";
+ }
+ delete $cfg->{description}; # add only as comment, no additional key-value pair
+ my $dump = PVE::JSONSchema::dump_config($datacenter_schema, $filename, $cfg);
+
+ return $comment . "\n" . $dump;