VMware Cloud Community
barentz-nl
Contributor
Contributor
Jump to solution

hostname config

Hi,

After a reboot of the ESX 3.5 server, i have to manually set the hostname, by typing hostname <short esx server name>. This will allow me to exit the maintanance mode properly without HA failing the config. Somewhere on the forum is an issue described with this solution. My question is can I set this up somewhere so that I don't have to do it manually each time? Is this a hostname config error I have somewhere?

If you want to remediate a host to update it, it won't complete the cycle for the same reason.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
petedr
Virtuoso
Virtuoso
Jump to solution

I think /etc/sysconfig/network is the correct place for the hostname name change and it is the FQDN name. I believe the short name gets picked up in /etc/hosts.

here is a kb article that mentions it.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=430949...

www.thevirtualheadline.com www.liquidwarelabs.com

View solution in original post

0 Kudos
6 Replies
henrydenhengst
Contributor
Contributor
Jump to solution

Go to your service console, make sure that you are root.

  1. vi /etc/sysconfig/network

edit this file, that' s it.

0 Kudos
barentz-nl
Contributor
Contributor
Jump to solution

The file is filled with a hostname (besides the other stuff), it's the FQDN, not the short name. I'm doubting I need to change it. I read about some issues where the DNS name is capitalized and the hostname isn't or vice versa, does that matter for this configuration file?

0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

I think /etc/sysconfig/network is the correct place for the hostname name change and it is the FQDN name. I believe the short name gets picked up in /etc/hosts.

here is a kb article that mentions it.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=430949...

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos
surfup
Enthusiast
Enthusiast
Jump to solution

You should edit the /etc/hosts file as follow:

x.x.x.x esx-hostname.acme.com esx-hostname

IP address FQDN shortname

barentz-nl
Contributor
Contributor
Jump to solution

Thanks petedr and BacMan

This is exactly what I needed, I checked the hosts file and indeed the shortname was missing. The KB makes an interesting remark:

"...You can also dynamically change the host name using the command:

# hostname newname

Note: This command creates a temporary hostname change. This change is lost when the system is rebooted..."

So I was changing the hostname temporarily each time, while it needed to be set in the hosts file, which I did now. Thanks again for your help.

0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

thanks for the correct, good to hear everything is good now.

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos