VMware Cloud Community
ktwebb68
Contributor
Contributor

hostname question

HA was failing after changing IP and hostname of a server that was moved to a different location. deleted and re-created the vswif and edited /etc/hosts and /etc/sysconfig/network. Bounced the server. The error became pretty obvious when I ran hostname on the server acting funky and it was appended with a = character. =blah.blah.com Well that was actually in the /etc/hosts file where I fat fingered it. But I fixed that and bounced the server. But the problem persists. If I run hostname I get the appended name even though that character is not in the hosts or sysconfig/network file. Trying to figure out where else that might be. Any help is appreciated. Thanks.

Reply
0 Kudos
11 Replies
oreeh
Immortal
Immortal

Make sure the hostname and FQDN are resolved correctly using DNS.

Also make sure you use the right DNS server and (if set) the search-domain in /etc/resolv.conf is configured correctly.

Reply
0 Kudos
bretti
Expert
Expert

I think you have eddited all the proper files.

Try setting the hostname directly with the hostname command.

hostname <proper hostname>

juchestyle
Commander
Commander

I think Oreeh is right on target. Additionally, HA if I remember correctly depends on proper DNS settings. Make sure in VC you are using the correct hostname as it appears in your DNS, not the DNS on your ESX but where ever you run DNS for your environment, IE Active directory or other? In VC, make sure you are not using IP, but hostname.

Respectfully,

Matthew

Kaizen!

Kaizen!
Reply
0 Kudos
ktwebb68
Contributor
Contributor

The HA failing is just a symptom of the problem. What I am trying to figure out here is why after editing those two files and checking them repeatedly to make sure they are in fact correct now, and rebooting the server, I still get a = character in appended to the hostname. The HA problem will get resolved once I figure this out. I am not too worried about that. I'll try using the hostname <servername> command from the CLI and see if that makes any difference. Thanks.

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

Your post has been moved to the ESX Server 3.x Configuration forum

Dave Mishchenko

VMware Communities User Moderator

Reply
0 Kudos
ktwebb68
Contributor
Contributor

Thanks. Navigating the boards since the format change is like pulling teeth. I appreciate you moving to the correct forum.

Reply
0 Kudos
ktwebb68
Contributor
Contributor

Nope. Didn't work though I haven't bounced the server yet. It's a pretty strange problem. Here is the copy/paste for reference.

# hostname nocesxbl07

#

I just can't get the dang = to go away.

Reply
0 Kudos
juchestyle
Commander
Commander

Hey there,

Try removing the esx completly from VC, make sure all DNS entries are correct then add back.

R,

Matthew - Kaizen!

Kaizen!
Reply
0 Kudos
ktwebb68
Contributor
Contributor

Ok, again, VC and HA is not the problem here. An appended = character on the hostname is the issue. Once I solve that the VC/HA problem dissapears.

Here is what I need to know. Is there somewhere else this value added to the hostname could be found besides /etc/hosts and/or etc/sysconfig/network?

Thanks

Reply
0 Kudos
ktwebb68
Contributor
Contributor

Looks like pixie dust was spread. Thanks all for the suggestions.

Reply
0 Kudos
bretti
Expert
Expert

Hello, are you still having the problem with the hostname?

Can you look at the Virtual Infrastructure Client and see what shows up for hostname in that interface? It should be on the configuration tab, DNS and Routing, Properties.

Try changing it to something new, rebooting, and changing it back using the VIC interface.

Reply
0 Kudos