---
isPrivate: true
title: Troubleshooting duplicated hosts with vSphere
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Integrations > FAQ Integrations > Troubleshooting duplicated hosts with
  vSphere
---

# Troubleshooting duplicated hosts with vSphere

{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Duplicated hosts issue context{% #duplicated-hosts-issue-context %}

The [vSphere integration](https://docs.datadoghq.com/integrations/vsphere.md) is configured to crawl into the different resources of a vCenter, such as VMs or ESXi. The integration flags the VMs and ESXi as separate hosts, and they appear in your [Infrastructure List](https://app.datadoghq.com/infrastructure) as `<vsphere-hostname>`. Inside a vCenter, a guest VM can run an Agent. This Agent submits metrics and attaches `<guest-hostname>` metadata to them. A host appears in the Infrastructure List as `<guest-hostname>`. Depending on the vSphere integration configuration and the guest Agent configuration, `<vsphere-hostname>` and `<guest-hostname>` can be different. For example, `<vsphere-hostname>` can be a Fully Qualified Domain Name (FQDN) and `<guest-hostname>` a Short Name. In this case, a single VM can appear twice in the Infrastructure List.

## Workaround{% #workaround %}

- In the vSphere integration configuration file, set [`use_guest_hostname: true`](https://github.com/DataDog/integrations-core/blob/21a90b00f603b00250c4baa6534e47ee5529ed3c/vsphere/datadog_checks/vsphere/data/conf.yaml.example#L301-L308) for the vSphere integration to use the guest hostname instead of the VM name given by the vCenter.
- If the previous step does not resolve the issue, change the value of [`hostname_fqdn`](https://github.com/DataDog/datadog-agent/blob/6ba10dc8cd0c1aa89adcebe6b5941571caf25d50/pkg/config/config_template.yaml#L56-L61) in the guest VM Agent configuration `datadog.yaml`.
- If the previous steps do not resolve the issue, manually set a host alias between `vsphere-hostname` and `guest-hostname`.

Note: The old host in the Infrastructure List takes time before disappearing.
