VMware Cloud Community
velvetsky
Contributor
Contributor

The DNS configured during guest customization does not persist at reboot for CentOS 6.3.

Hello,

I have made a template out of classic CentOS 6.3 destribution. When I say classic I mean a plain install, without any extra configuration made.

After I provision an instance out of this template everything is apparently good. Just after the first restart the machine looses the configured DNS.

After the provisioning /etc/resolv.conf has the following content:

# generated by customize-guest script
nameserver 8.8.8.8

After I reboot the machine /etc/resolv.conf changes to:

# Generated by NetworkManager


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

Does anyone have any hints about what may cause this behaviour?

Thanks.

0 Kudos
3 Replies
milton123
Hot Shot
Hot Shot

You may nor save your configuration file thats why when you restart the machine your Network configurations including DNS configuration gone. You have to save your configurations like this command :X!= That means save and exit.

Cheers, Udin

0 Kudos
velvetsky
Contributor
Contributor

Thanks for the answer milton123 but I don't really understand what I should save.

Also, note that the machine is provisioned for a client, so he should not be forced to performed further modifications to keep the settings.

It might be worth mentioning that I also have a simillar CentOS 5.6 template and it's working perfectly.

0 Kudos
velvetsky
Contributor
Contributor

The culprit for this was the NetworkManger. Once disabled everything worked as expected.

0 Kudos