cloud-init is configured with hardcoded manage_etc_hosts: true

Jacolex

New Member
Aug 8, 2019
3
1
1
47
Hello
I'm struggling with issue, that loud-init is configured with hardcoded manage_etc_hosts: true, which causes rewriting of /etc/hosts file every reboot (Centos 8). I don't know, why cloud init configuration was patched to do so:
https://lists.proxmox.com/pipermail/pve-devel/2018-March/030988.html
I think it should be configurable or disabled. Spent many days to find out, why /etc/hosts files on my servers re always rewriting, even when manage_etc_hosts was set to false in cloud.cfg configuration.
 
i found it's hardcoded in `/usr/share/perl5/PVE/QemuServer/Cloudinit.pm`, modify the config in this file, then everything is ok for me~
 
Sorry to resurrect an old thread, but we're running into the same problem.

Would be nice if this could be turned off in the UI or in a config file, as opposed to by editing a random script which could get overwritten during an update.
 
The post is quite old, but as I had the same problem today, I post the workaround I found.
You can delete the line:

`update_etc_hosts` in file `/etc/cloud/cloud.cfg` as it interely disable the module without worried about hardcoded userdata
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!