VMware vCenter Server IP address change causes VMware ESX hosts to disconnect
search cancel

VMware vCenter Server IP address change causes VMware ESX hosts to disconnect

book

Article ID: 337654

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • After changing the IP Address of the vCenter Server, all ESXi/ESX hosts are showing as disconnected from VMware Infrastructure/vSphere Client. 
  • When manually reconnecting an ESXi/ESX host, it is disconnected again after a short time


Environment

VMware vCenter Server 7.0.x
VMware vCenter Server 5.0.x
VMware vCenter Server 4.0.x
VMware vCenter Server 6.5.x
VMware vCenter Server 6.0.x
VMware VirtualCenter 2.0.x
VMware VirtualCenter 2.5.x
VMware vCenter Server 6.7.x
VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x

Resolution

Note: Before you begin, see Restarting the Management agents on an ESX Server (1003490) for important information on restarting the mgmt-vmware service.

The ESXi/ESX hosts disconnect because they store the IP address of the vCenter Server in configuration files on each of the individual servers. This incorrect address continues to be used for heartbeat packets to vCenter Server.

There are two methods to get the ESXi/ESX hosts connected again. Try each one in the order specified, testing your results each time.

Before performing either method, ensure that the Managed IP Address of the vCenter Server is updated to reflect the new IP address being used. For more information, see Verifying the vCenter Server Managed IP Address (1008030).
 

Method 1 - edit the vpxa configuration

Up until ESXi 7.0 Update 2e - Edit the vpxa.cfg file on ESXi:

  1. Log in as root to the ESXi/ESX host with an SSH client. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).
  2. Open the vpxa.cfg file using a text editor and change the serverIp parameter to the new IP of the vCenter Server.
    1. In ESXi 5.x up until 7.0 U2e the vpxa.cfg can be found in /etc/vmware/vpxa/vpxa.cfg.
    2. In ESXi 4.1 and earlier the vpxa.cfg is located in /etc/opt/vmware/vpxa/
  3. Save your changes and exit.
  4. Restart the management agents on the ESXi/ESX. For more information, see Restarting the Management agents on an ESX Server (1003490).
  5. Restart the VMware VirtualCenter Server service. For more information, see Stopping, starting, or restarting the vCenter Server service (1003895).
 

In ESXi 7.0 Update 3 and later - Edit the config store:

In ESXi 7.0 Update 3 the vpxa.cfg file no longer exists, as the vpxa configuration was moved to the ESXi config store. Therefore, if you cannot find /etc/vmware/vpxa/vpxa.cfg on your ESXi 7.0, follow these steps instead:

  1. Export the current vpxa configuration from the config store:
    # configstorecli config current get -c esx -g services -k vpxa_solution_user_config -outfile vpxa.json
  2. Create a backup of the file containing the current configuration:
    # rm -f vpxa.json.bak; cp vpxa.json vpxa.json.bak -f
  3. Replace the old vCenter IP address with the new one (replace <vcenter_ip> with the correct IP address):
    # sed -e 's/   "server_ip".*/   "server_ip": "<vcenter_ip>",/g' -i vpxa.json
  4. Import the changed configuration into the ESXi config store:
    # configstorecli config current update -c esx -g services -k vpxa_solution_user_config -infile vpxa.json
  5. Verify that the IP was correctly changed:
    # configstorecli config current get -c esx -g services -k vpxa_solution_user_config
  6. Restart vpxa to apply the change:
    # /etc/init.d/vpxa restart


Note: if method 1 does not work, please apply method 2

Method 2 - disconnect/reconnect the ESXi in vSphere Client

Note: Do not remove the ESXi host from vCenter inventory if the host is attached to a Distributed Switch (vDS).  For more information, see Moving an ESX/ESXi host with vDS from one vCenter Server to another (1029498) .

  1. From the vSphere Client, right-click the ESXi/ESX host and click Disconnect.
  2. From the vSphere Client, right-click the ESXi/ESX host and click Reconnect. If the IP is still not correct, go to step 3.
  3. From the vSphere Client, right-click the ESXi/ESX host and click RemoveCaution: After removing the host from vCenter Server, all the performance data for the virtual machines and the performance data for the host is lost.
  4. Reinstall the VMware vCenter Server agent. For more information, see Verifying and reinstalling the correct version of VMware VirtualCenter Server agent (1003714).
  5. Click New > Add Host.
  6. Enter the information used for connecting to the host.

 

======

If the ESXi keeps reconnecting continuously and "vpxa_solution_user_config" is reverting back to old VC IP: 
# configstorecli config current get -c esx -g services -k vpxa_solution_user_config

Verify that vCenter Server Settings - > Runtime settings -> vCenter Server managed address is reflecting the OLD IP address, update with the new IP address and restart the vCenter Server. 

image.png

    Additional Information

    For related information, see Changing the IP address, default gateway, and hostname of the Service Console in ESX (4309499) and Verifying the VirtualCenter Managed IP Address (1008030).


    Additional Information

    For translated versions of this article, see: