VMware Cloud Community
bschonec
Contributor
Contributor

Renaming a Linux Server not only in VCenter but *also* at the OS level

I've got a bunch of new Red Hat 8 systems running open-vm-tools.  As part of a migration from RHEL6 to RHEL8, we have created new RHEL8 systems with the same names as the old RHEL6 systems and appended "-new" to their names.  The IP addresses, host  names, VLAN, etc are different on the RHEL8 systems.

I know how to rename the new systems in VCenter but I have not been able to find out if it's possible to rename the OS files as well.  I know I could use open-vm-tools with Anisible to clone the RHEL8 systems to *yet again new* systems with the proper names, ips, etc, but is there a way to tell open-vm-tools to re-run the configuraition?  I've run the Ansible module vmware_guest and have successfully reconfigured the hardware but I've not found a way to reconfigure the underlying OS files w/o cloning the RHEL8 into new systems.

0 Kudos
1 Reply
scott28tt
VMware Employee
VMware Employee

It may be simpler to do this natively via a script that you execute on the RHEL OSes via SSH, rather than try and do anything through vSphere:

https://www.cyberciti.biz/faq/rhel-8-change-hostname-computer-name-command/


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos