How to change vCenter server appliance IP from command line?
I found a comfortable way of doing this here:
Allocate a static IP address to the VMware vCenter Server Appliance (VCSA) | Ivo Beerens' Blog
It also allows you to change hostname, DNS, default gateway and proxy.
To sum it up:
- Open a console session of the VCSA
- Login as: root
- Default password is: vmware
- Execute the following command:
- After executing the command, a menu is displayed. Within the menu It is possible to change the IP address, hostname, DNS, Default gateway and proxy server.
After allocating a static IP Address to the VCSA, the post configuration can be done by using the following URL:
I can't recall which specific Linix distro the VCA is built on but I think it's a RHEL variant, so just edit
/etc/sysconfig/networking/devices/ifcfg-eth0 as root, it's all very obvious from there. Then just reboot or restart the networking service for the changes to come in.
The correct way of changing vCenter IP is indeed running: /opt/vmware/share/vami/vami_config_net from the console of the vCenter. Another way is from the VAMI itself (https://vcenter:5480) if you have access. Make sure to perform certificate regeneration after the IP change. One of the SANs (subject alternative names) of the certificate is the IP itself, hence you have to regenerate it even if the name does not change.
Login to VAMI , go to "admin" and tick "certificate regeneration enabled" to "yes". Reboot and give it some time to finish the certificate regeneration. Could take 15-20 mins. You can track the progress in the console. Once the process of certificate regeneration is finished and the console gets to the login screen, login to the VAMI again, go to "admin" and set "certificate regeneration enabled" to "no".
Alternative certificate regeneration method is described in Regenerating Self-Signed SSL Certificates in VMware vCenter Server appliance 5.1 or 5.5 (2070603) | VMware Knowledge Base