想修改/etc/hosts,发现文件有一段注释:
问题描述 2018-02-12 23:21:59
我打算修改cvm中etc/hosts文件中节点ip链接
该文件中注释为:
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to eithe
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
意思是 因为 manage_etc_hosts配置为true ,所以如果要永久修改必须将修改写入/etc/cloud/templates/hosts.tmpl 文件中或者修改 /etc/cloud/cloud.cfg 中manage_etc_hosts的值 ?
结果a操作没效果 b那个配置文件根本没有'manage_etc_hosts这一项
所以ubuntu的cvm怎么修改hosts 现在改完只有sudo reboot后马上又被还原了
相似问题