VCF 9 Brownfield Import fails with InventoryAlreadyExistsException
search cancel

VCF 9 Brownfield Import fails with InventoryAlreadyExistsException

book

Article ID: 406458

calendar_today

Updated On:

Products

VMware SDDC Manager VMware Cloud Foundation

Issue/Introduction

  • When attempting to import a brownfield Workload Domain into VCF (specifically VCF Operations/SDDC Manager 9.x), the process fails during the inventory synchronization stage.
  • Error message on the SDDC manager UI
    Import operation for import with id ######-###-###-###-############ failed internally. Command was python3 /opt/vmware/vcf/domainmanager/scripts/vcf-import-tool/vcf_brownfield.py import --skip-ssh-thumbprint-validation --sso-user [email protected] --domain-name <domain_name> --vcenter <vCenter> --internal-vcf-auth --nsx-deployment-spec-path /tmp/nsxDeploymentSpec.json --skip-nsx-overlay --output-dir /var/log/vmware/vcf/domainmanager/brownfield/######-###-###-###-############/ --non-interactive. Please check the log files
  • Domain manager logs shows following error /var/log/vmware/vcf/domainmanager/domainmanager.log
    ERROR [vcf_dm,#############] [c.v.e.s.o.model.error.ErrorFactory,dm-###-22]  [####] IMPORT_OPERATION_FAILED Import operation for import with id ######-###-###-###-######## failed internally. Command was python3 /opt/vmware/vcf/domainmanager/scripts/vcf-import-tool/vcf_brownfield.py import --skip-ssh-thumbprint-validation --sso-user  [email protected] --domain-name <Domainame> --vcenter <vCenter FQDN> --internal-vcf-auth --nsx-deployment-spec-path /tmp/nsxDeploymentSpec.json --skip-nsx-overlay --output-dir /var/log/vmware/vcf/domainmanager/brownfield/######-###-###-###-########/ --non-interactive. Please check the log files located in /var/log/vmware/vcf/domainmanager/brownfield/######-###-###-###-########/ on the SDDC Manager appliance
     
  • Error in /var/log/vmware/vcf/domainmanager/brownfield/######-###-###-###-############ /vcf_brownfield.log
    [ERROR] request_helper:31: Result status code from ESC[91minventory import: 500ESC[00m
    [CRITICAL] import_domain:200: Could not import the information for the new domain in SDDC Manager: Could not import inventory into SDDC Manager. Please review '/var/log/vmware/vcf/commonsvcs/vcf-commonsvcs.log' for further details.
  • Error in /var/log/vmware/vcf/commonsvcs/vcf-commonsvcs.log
    ERROR [common,######-###-###-###-############ ,39##] [c.v.e.s.i.s.EsxiInventoryServiceImpl,http-nio-127.0.0.1-7100-###-92] ESXi <hostaname>already exist: ######-###-###-###-############  <Hostname> already exists
    ERROR [common,######-###-###-###-############ ,39##] [c.v.e.s.i.s.e.DomainExtensionsImpl,http-nio-127.0.0.1-7100-###-92] Failed to post domain inventory com.vmware.evo.sddc.inventory.model.InventoryAlreadyExistsException: ######-###-###-###-############  <hostname> already exists

 

Environment

VMware Cloud Foundation 9.x

Cause

This issue is due to the hosts already being a part of SDDC.  

In some cases, a prevously added WLD may have been deleted.  The delete process of a WLD in VCF 9 is a 2 step process in that the hosts are moved to the free pool (Unused) and must be decommissioned from SDDC directly.

 

Resolution

To resolve the issue, decommission the ESX hosts from SDDC.  

  1. In the vSphere Client, click Global Inventory > Hosts > Unassigned Hosts.
  2. Select one or more hosts and click Decommission Selected Hosts.
  3. Activate or deactivate Skip failed hosts during decommissioning.
    This setting is enabled by default. When enabled, hosts that fail are skipped and decommissioning continues on the remaining hosts.

     

  4. Click Confirm.
  5. Once the hosts are removed, re-attempt the Brownfield Import.

Additional Information