Add Remote Datastore Source using vSphere Client fails with "Cannot connect to remote VMware vCenter instance"
search cancel

Add Remote Datastore Source using vSphere Client fails with "Cannot connect to remote VMware vCenter instance"

book

Article ID: 445891

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Attempting to configure vSAN HCI Mesh to mount a remote datastore, the task may fail during the Check Compatibility stage

    Check Compatibility

    Remote VMware vCenter instance <remote-vcenter FQDN/IP> has valid network identity.
    Remote VMware vCenter instance <remote-vcenter FQDN/IP> can be connected.
    The client VMware vCenter instance <client-vcenter FQDN/IP> and server VMware vCenter instance <remote-vcenter FQDN/IP> are compatible for HCI Mesh operations.
    Can perform precheck to Remote VMware vCenter instance <remote-vcenter FQDN/IP>.
    Cannot connect to remote VMware vCenter instance: <remote-vcenter FQDN/IP>.



  • /var/log/vmware/vsan-health/vmware-vsan-health-service.log (on client-vcenter server)

YYYY-MM-DDTHH:MM:SS INFO vsan-mgmt[PID] [DSMgmt::PrecheckDatastoreSource opID=agw-#] Prechecking datastore source <remote-vcenter FQDN/IP> for checkCreateDs
YYYY-MM-DDTHH:MM:SS ERROR vsan-mgmt[PID] [utils::IsLocalVC opID=agw-#] Got exception trying to getaddrinfo from host <remote-vcenter FQDN/IP>
Traceback (most recent call last):
  File "bora/vsan/xvc/lib/utils.py", line 61, in IsLocalVC
socket.herror: [Errno 1] Unknown host
YYYY-MM-DDTHH:MM:SS ERROR vsan-mgmt[PID] [DSMgmt::CheckValidateDs opID=agw-#] Failed to validate Datastore Source
Traceback (most recent call last):
  File "bora/vsan/xvc/DSMgmt.py", line 478, in CheckValidateDs
  File "bora/vsan/xvc/lib/utils.py", line 69, in IsLocalVC
  File "bora/vsan/xvc/lib/utils.py", line 61, in IsLocalVC
socket.herror: [Errno 1] Unknown host

Cause

The issue is caused by a failure in DNS name resolution between the vCenter Server instances. The vSAN management service utilizes the getaddrinfo function to verify the remote vCenter's network identity; if the FQDN cannot be resolved to an IP address, the compatibility pre-check fails.

Resolution

To resolve this issue, ensure that both vCenter Servers can resolve each other's FQDN

If updating the DNS server is not immediately feasible, implement a local host entry workaround:

  1. Access the shell of both the Client vCenter
  2. Open the /etc/hosts file using a text editor (e.g., vi /etc/hosts)
  3. Add entries for both vCenter Servers using their respective management IP addresses and FQDNs

    #.#.#.#  remote-vcenter.example.com
    #.#.#.#  client-vcenter.example.com

  4. Save and close the file.
  5. Retry the Add Remote Datastore Source task in the vSphere Client.