VMware Cloud Community
admin
Immortal
Immortal

DNS Suffix

Please what is the correct method to change the DNS Suffix on a load of Vi3 Hosts, as my domain dns suffix is changing - is there a white paper, please - thanks

Reply
0 Kudos
15 Replies
virtualdud3
Expert
Expert

I am not sure if this is what you had in mind, but I think the best way is to do so through the VI client.

Configuration->DNS and Routing

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
merse
Hot Shot
Hot Shot

This info is held in the /etc/resolv.conf file so you could script it if you had lots to do.

Reply
0 Kudos
BryanMcC
Expert
Expert

This is what I used to rename my hosts... More of a manual process but thorough none the less.

In VI Client

- Disconnect and remove host from VC

In your DNS solution

- Verify no previous DNS (A) Record and delete if necessary

- Rename current A Record to new host name

In The Service Console

- Edit /etc/hosts to conform to new hostname

- Use hostname command to set new hostname

- Edit /etc/sysconfig/network to reflect new hostname

- Rename the current SSL certs for backup

- Restart mgmt-vmware service to generate new SSL certs

In the VI Client

Add the host back to VC






Help me help you by scoring points... Smiley Happy

Help me help you by scoring points.
Reply
0 Kudos
virtualdud3
Expert
Expert

The /etc/resolv.conf holds the nameserver (DNS server) information, but it does not contain configuration files for the domain suffix. As Bryan stated, the configuration information for the hostnaem and therefore domain suffix is contained in the /etc/sysconfig/network location.

The steps that Bryan outlined will certainly work, but personally I have always had better luck (and find it faster) just changing it through the VI client. Also, changing it through the VI client allows you to change/update only the domain.



###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos
jonathanp
Expert
Expert

But changing through VI will not make any changes to the /etc/hosts file.. if you set up entry manualy there before you will have to change those manualy or with a script.

Regards

Jon

Reply
0 Kudos
virtualdud3
Expert
Expert

Actually, changing the hostname/domain suffix through the VI client will in fact update the /etc/hosts file.

This is one of the reasons I prefer changing it this way - all of steps outlined above are completed "automagically".

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos
BrianRTS
Enthusiast
Enthusiast

I have 10+ servers in one of my ESX Datacenters currently registered under their IP address.. Is this a HA breaker? DNS currently does work via ping/nslookup but VI sees them as IP's. Is there a way to change the entry in VI other than removing and readding the host back in? If I HAVE to do that what happen to any DB/performance info stored under the "old" ESX hostname?

Reply
0 Kudos
admin
Immortal
Immortal

how do I do the SSL certs bit!

Reply
0 Kudos
BryanMcC
Expert
Expert

Just cd into /etc/vmware/ssl and rename your certs to orig.rui.crt and

orig.rui.key. Once you restart the mgmt-vmware service it will recreate

them.

Bryan

Help me help you by scoring points.
BryanMcC
Expert
Expert

Just cd into /etc/vmware/ssl and rename your certs to orig.rui.crt and orig.rui.key. Once you restart the mgmt-vmware service it will recreate them.



Help me help you by scoring points... Smiley Happy

Help me help you by scoring points.
Reply
0 Kudos
virtualdud3
Expert
Expert

In order for HA to function, you NEED to have name resolution (DNS) for BOTH the "long"/FQDN and "short"/hostname.

The only way I know of to change the appearance of the host within VC is to remove the host, configure name resolution on the VirtualCenter server, then re-add the host. Whether or not you will lose old performance information, that is a good question. I'll play around with that shortly.

At the worst, you can always save the performance information for all of the counters to Excel spreadsheets for historical purposes.

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos
merse
Hot Shot
Hot Shot

The /etc/resolv.conf holds the nameserver (DNS server) information, but it does not contain configuration files for the domain suffix.

Ah ok, is 'search' not used in resolv.conf for additional search domain suffixes?

Reply
0 Kudos
virtualdud3
Expert
Expert

Well, by default, there are no "search" entries/suffixes in /etc/resolv.conf.

You are correct in that, if you place a "search" entry/domain name in /etc/resolv.conf, then you should change it. However, the /etc/resolv.conf does not contain any configuration files that alter the DNS suffix of the ESX host.

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos
merse
Hot Shot
Hot Shot

Nice one, thanks for the info Smiley Happy

Reply
0 Kudos
virtualdud3
Expert
Expert

No problem.

And, good "catch".



###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Reply
0 Kudos