VMware Cloud Community
gr99
Enthusiast
Enthusiast

Host disconnected from vCenter Appliance after IP Address Change

    I've changed the IP address of the vCenter (& external PSC) machines. vCenter is fine, but all the hosts keep disconnecing from vCentre. I updated the vCenter servers IP address in the VPXA.CFG (as per article 1001493), but the address keeps on getting reverted back to the old address. I've checked the vCenter's IP address (As per article 1008030) and even restarted vCenter, but still the same: The vCenter server's IP address gets reverted.

What else can I do to try to fix this?

Thank you.

Reply
0 Kudos
10 Replies
RickVerstegen
Expert
Expert

Can you provide details about which type you use, Windows vCenter or VCSA?

And which version?

Changing IP address is supported since VCSA 6.5:

Edit the DNS and IP Address Settings of the vCenter Server Appliance

Was I helpful? Give a kudo for appreciation!
Blog: https://rickverstegen84.wordpress.com/
Twitter: https://twitter.com/verstegenrick
Reply
0 Kudos
HassanAlKak88
Expert
Expert

Hello,

Are you using an FQDN to communicate between vCenter and ESXi hosts ? or IP addresses ?

As per the below, you cannot change the IP address if it was used:

pastedImage_0.png

Anyway, try to remove and connect hosts again (one by one).

Please consider marking this answer "CORRECT" or "Helpful" if you think your question have been answered correctly.

Cheers,

VCIX6-NV|VCP-NV|VCP-DC|

@KakHassan

linkedin.com/in/hassanalkak


If my reply was helpful, I kindly ask you to like it and mark it as a solution

Regards,
Hassan Alkak
Reply
0 Kudos
gr99
Enthusiast
Enthusiast

Can you provide details about which type you use, Windows vCenter or VCSA?

And which version?

Sorry. VCSA with external PSC on version 6.5

Reply
0 Kudos
gr99
Enthusiast
Enthusiast

Are you using an FQDN to communicate between vCenter and ESXi hosts ? or IP addresses ?

FQDNs.

Gordon

Reply
0 Kudos
daphnissov
Immortal
Immortal

If you've deployed your vCSA using FQDN you ​cannot change IP addresses​.

Reply
0 Kudos
palloveverma
Contributor
Contributor

The main reason for an ESXi host to disconnect is because they store the IP address of the vCenter Server in a configuration file.

For ESXi, navigate to the folder /etc/vmware/vpxa and with vi open the file: vpxa.cfg.
Search for the line that starts with: <serverIP> and the change this parameter to the new IP address of the vCenter Server.

Restart the management agents on the ESXI hosts with this command:
# services.sh

Return to the vCenter Server and restart the “VMware VirtualCenter Server” Service.

Try re-connecting the hosts if not done automatically.

Reply
0 Kudos
Jerrylax
Contributor
Contributor

Fixed !!!

   I experienced the exact same issue, finally got it fixed.

    1. Logon to the vCenter server (I use webClient)

    2. Highlight center server,  usually the top of the tree (not the vcenter server VM)

    3. click Configure tab, General, click Edit

    4. click Runtime settings, make sure vCenter Server managed address is vCenter server's IP.

    click OK.

    Then:

   1. Putty to the host, login as root.

   2. edit \etc\vmware\vpxa\vpxa.cfg

   3. towards the end of the file, change <serverIP> xxx.xxx.xxx.xxx to correct ip. save and exit.

   4. restart vpxa serverice by running below command

        /etc/init.d/vpxa restart

        /etc/init.d/vpxa start

Reply
0 Kudos
RajeevVCP4
Expert
Expert

This is not recommended by vmware ,  only old IP will be there or you required re-installed vcenter server

if you have snapshot before change IP revert snap shot,other wise it will create other issue in your infra

Rajeev Chauhan
VCIX-DCV6.5/VSAN/VXRAIL
Please mark help full or correct if my answer is use full for you
Reply
0 Kudos
szemmali
Contributor
Contributor

All the hosts showed the old ip .. the vcenter db showed the old ip .. below seems to have resolved the issue

  1. Created a snapshot while the vCenter Server is in a powered off state for easy roll-back if need be. 
  2. Powered on the vCenter Server and allowed services to start
  3. Stopped the vCenter Server vmware-vpxd service

 

service-control –stop vmware-vpxd​

 

4. Log into the vCenter Server database

 

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres​

 

5. Check the value stored in VPX_PARAMETER’s “VirtualCenter.AutoManagedIPV4”:

 

VCDB=# select * from vpx_parameter where name = ‘VirtualCenter.AutoManagedIPV4’;​

 

6. Change this to the correct value, and check the value again:

 

VCDB=# update vpx_parameter set value = ‘2.4.6.8’ where name = ‘VirtualCenter.AutoManagedIPV4’;
VCDB=# select * from vpx_parameter where name = ‘VirtualCenter.AutoManagedIPV4’;​

 

7. Check the value for the “management_ip” for all hosts in the vpx_host table:

 

VCDB=# select management_ip,dns_name from vpx_host;​

 

8. Change this value to “NULL” and check the value again:

 

VCDB=# update vpx_host set management_ip = NULL where management_ip IS NOT NULL;
VCDB=# select management_ip,dns_name from vpx_host;​

 

9. Exit the database

 

VCDB=# \q​

 

10. Start vCenter Server services

 

service-control –start vmware-vpxd​

 

 

a_p_
Leadership
Leadership

@szemmali 

When replying with copied contents from a blog, please consider adding a reference to the source (most likely https://vninjadfw.github.io/esxidisconnect_vCSAIPchange/ in this case).

André