[pve-devel] [PATCH qemu-server 2/3] add manage_etc_hosts to cloud init config

Dominik Csapak d.csapak at proxmox.com
Mon Mar 12 16:25:05 CET 2018


so that we get the hostname there
(e.g. sudo complains that it cannot resolve the hostname)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/QemuServer/Cloudinit.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm
index 31f8462..0e92412 100644
--- a/PVE/QemuServer/Cloudinit.pm
+++ b/PVE/QemuServer/Cloudinit.pm
@@ -103,6 +103,7 @@ sub cloudinit_userdata {
     my $content = "#cloud-config\n";
 
     $content .= "hostname: $hostname\n";
+    $content .= "manage_etc_hosts: true\n";
     $content .= "fqdn: $fqdn\n" if defined($fqdn);
 
     my $username = $conf->{ciuser};
-- 
2.11.0





More information about the pve-devel mailing list