]> git.proxmox.com Git - qemu-server.git/commitdiff
cloud-init: add manage_etc_hosts to cloud init config
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 12 Mar 2018 15:25:05 +0000 (16:25 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 14 Mar 2018 10:13:25 +0000 (11:13 +0100)
so that we get the hostname there
(e.g. sudo complains that it cannot resolve the hostname)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index 31f8462089106fb92526f24448c80b0ba3720ae2..0e9241293e5b84d153237f4740dfad6450e94182 100644 (file)
@@ -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};