ESXi hosts disconnecting after changing IP address of vCenter
search cancel

ESXi hosts disconnecting after changing IP address of vCenter

book

Article ID: 380515

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

  • Managed host disconnects from VMware vCenter Server.
  • Managed hosts enter Not Responding mode for 90 seconds repeatedly.
  • vCenter Server does not receive heartbeats from the ESXi hosts.
  • VirtualCenter.AutoManagedIPV4 points to an incorrect VC IP address.

 

The new IP address of the vCenter is not properly updated in the database of the vCenter. To verify this connect to the VCDB and run the following query:

Connect to the vCenter Server database 
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

Check the IP addresses that vCenter has in the DB for itself and what the hosts have
# select * from vpx_parameter where name like '%Managed%';
# select id, dns_name, management_ip, local_ip_address from vpx_host;

Environment

vCenter 6.x appliances

vCenter 7.x

vCenter 8.x

Resolution

  1. Snapshot and/or backup the vCenter according to best practices
  2. Stop the vpxd service
    service-control --stop vmware-vpxd
  3. Connect to the database
    # /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
  4. Run the below queries to update the old IP with the new, desired IP (where X.X.X.X is the new IP address of vCenter)
    # update vpx_parameter set value = ’X.X.X.X’ where name = ‘VirtualCenter.AutoManagedIPV4’;
    # update vpx_parameter set value = ’X.X.X.X’ where name = ‘VirtualCenter.AutoManagedIpV4’;
    # update vpx_parameter set value = ’X.X.X.X’ where name = ‘VirtualCenter.ManagedIP’;
    # update vpx_host set management_ip = ’X.X.X.X’ where id > '0';
    # update vpx_host set local_ip_address = ’X.X.X.X’ where id > '0';
  5. Exit the database with "\q" and start the vpxd service
    service-control --start vmware-vpxd
  6. Disconnect and reconnect the affected hosts.