Knowledge Base

 
Search the Knowledge Base   View by Article ID
 

VirtualCenter displays the error: Failed to connect to host

Symptoms

  • VirtualCenter cannot connect to a host when performing operations such as:
    • Storage VMotion
    • Cold migration
    • Cloning a virtual machine
    • Deploying from template
       
       
  • The vpxd logs contain an entry similar to:

    [2009-06-04 19:27:16.326 'App' 4444 error] [VpxdInvtHost] IP address change for 10.223.122.143 to 10.223.127.197 not handled, SSL certificate verification is not enabled.
     
  • You see errors such as:
    • Failed To Connect to host
    • [2009-06-04 19:27:09.952 'Libs' 3902384 warning] [NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer (numRetries=2). Error: Cannot connect to host 10.223.122.143: Connection timed out
    • [2009-06-04 19:27:10.274 'App' 3902384 verbose] [VpxaDatastoreContext] Resolved URL sanfs://vmfs_uuid:4784ea56-be18e5d8-a82c-001a642549fc/test/test.vmdk to localPath /vmfs/volumes/4784ea56-be18e5d8-a82c-001a642549fc/test/test.vmdk
    • [2009-06-04 19:27:10.274 'App' 3902384 verbose] [VpxaDatastoreContext] No conversion for localpath /vmfs/volumes/4784ea56-be18e5d8-a82c-001a642549fc/test/test.vmdk
       
  • vCenter Server shows virtual machines as being disconnected then connected.

Resolution

Cause

This issue may occur if the IP address of an ESX host is changed while being managed by VirtualCenter.

Verifying the cause

To verify the cause of the issue:
  1. Log in as root to the ESX host using an SSH client.
  2. In the /etc/opt/vmware/vpxa/vpxa.cfg file, locate the Host IP address. The entry looks similar to:

    <vpxa>
    <hostIp>10.21.48.121</hostIp>
    </vpxa>

    Note: For more information on editing files, see Editing configuration files in VMware ESX (1017022).

Troubleshooting

If the IP address is incorrect, perform the following steps in order. If the operation does not solve the issue, proceed to the next step. Do not skip a step.

  1. Disconnect and reconnect the host:
    1. Right-click the ESX host in VirtualCenter and click Disconnect.
    2. Reconnect the ESX host in VirtualCenter.
  2. Restart the VirtualCenter Agent on the ESX host:
    1. Stop the vpxa service with the command:

      # service vmware-vpxa stop
       
    2. Open the /etc/opt/vmware/vpxa/vpxa.cfg file in a text editor and correct the IP address of the ESX host.
    3. Start the vpxa service with the command:

      # service vmware-vpxa start
       
      Note: For VMware ESXi you may need to restart all of the management agents. For more information, see Restarting the Management agents on an ESX or ESXi Server (1003490) .
       
  3. Rebuild the VirtualCenter agent configuration file on the ESX host:

    Caution: This step removes all host and virtual machine historical statistics counters. If the VMware ESX host is running virtual machines that started up in an EVC enabled environment, you may not be able to add the host back without shutting down the virtual machines first.
     
    1. Right-click the ESX host in VirtualCenter and click Disconnect.
    2. Remove the disconnected ESX host from VirtualCenter.
    3. Backup the vpxa.cfg file with the command:

      # mv /etc/opt/vmware/vpxa/vpxa.cfg /etc/opt/vmware/vpxa/vpxa.oldcfg
       
    4. Add the disconnected ESX host to the VirtualCenter inventory.
    5. Run the following command to examine the contents of /etc/opt/vmware/vpxa/vpxa.cfg and confirm that the host IP address is correct:

      # cat /etc/opt/vmware/vpxa/vpxa.cfg

Additional Information

If the above steps do not resolve the issue, attempt to uninstall and install the agents on the VMware ESX host. For more information, see Verifying and reinstalling the correct version of the VirtualCenter Server agents (1003714).   

Update History

26/04/2010 - Added the symptom: vCenter Server shows virtual machines as being disconnected then connected.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • (17 Ratings)

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Email address (optional)
  • (17 Ratings)
Actions