VMware Cloud Community
vmproteau
Enthusiast
Enthusiast
Jump to solution

VMA 5.0 hostname "localhost"

I deployed VMA 5.0 and despite it asking me for Host name during deployment, it still shows as localhost. What's the proper way to change it's name?

Reply
0 Kudos
1 Solution

Accepted Solutions
durakovicduro83
Enthusiast
Enthusiast
Jump to solution

Change Hostname Permanent

Edit /etc/HOSTNAME, enter:

     vi /etc/HOSTNAME

Delete old name and add new one:


server2.nixcraft.com

Save and close the file. Type the following command:


hostname server2.nixcraft.com

Cheers,

Denis

To err is human - and to blame it on a computer is even more so

View solution in original post

Reply
0 Kudos
8 Replies
vmproteau
Enthusiast
Enthusiast
Jump to solution

I figured this out. For anyone else who happens to see this. I just had to run the network config again.

sudo system-config-network-tui

Reply
0 Kudos
satya1
Hot Shot
Hot Shot
Jump to solution

vmproteau wrote:

I deployed VMA 5.0 and despite it asking me for Host name during deployment, it still shows as localhost. What's the proper way to change it's name?

what platfor you are using ?

Yours,

Satya

Reply
0 Kudos
TK22
Contributor
Contributor
Jump to solution

If it fails you can log in with root and edit the etc/HOSTNAME and etc/hosts files.

If root isn´t enabled..

sudo vi /etc/passwd
When prompted for a password I entered the vi-admin password.

Change the entry for

root:x:0:0:root:/root:/sbin/nologin

to look like

root:x:0:0:root:/root:/bin/bash

If you don´t know the pasword for root

sudo passwd root

And define a password for the root account.

Login as root and edit the files above and reboot the appliance.

Reply
0 Kudos
durakovicduro83
Enthusiast
Enthusiast
Jump to solution

Change Hostname Permanent

Edit /etc/HOSTNAME, enter:

     vi /etc/HOSTNAME

Delete old name and add new one:


server2.nixcraft.com

Save and close the file. Type the following command:


hostname server2.nixcraft.com

Cheers,

Denis

To err is human - and to blame it on a computer is even more so
Reply
0 Kudos
ydjager
Contributor
Contributor
Jump to solution

You can also change the hostname through the web interface. Login at https://<ip address of vma>/ and change it on the Network tab -> Address button.

RaZaKKaZaR
Enthusiast
Enthusiast
Jump to solution

When I changed it in the web management interface, it committed the change.  You may need to logout and login again to the command line to see the change, though.

Here is the management address:

https://<vMA IP>:5480/

VCAP5-DCD,DCA * http://www.vmtrooper.com * If any of my responses have been helpful in any way, please rate accordingly. Thank you and Happy VM'ing! :grinning_face_with_smiling_eyes:
TiloVM
Contributor
Contributor
Jump to solution

thanks

sudo vi /etc/HOSTNAME

worked for me

Reply
0 Kudos
gordonsj99
Contributor
Contributor
Jump to solution

As I discovered in another thread all the above will work BUT you MUST create the DNS entry for the vma first. Otherwise it kepps on reverting to localhost.

Reply
0 Kudos