"Error: unhashable type: 'dict' " when running the VMware NSX Migration tool precheck command
search cancel

"Error: unhashable type: 'dict' " when running the VMware NSX Migration tool precheck command

book

Article ID: 325678

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Running the migrator precheck command <install-path>/vcdNSXMigrator --filepath=<Path of userInput.yml file> --preCheck fails with the error:

2023-10-23 01:55:47,140 [threadUtils]:[_runThread]:78 [ERROR] [Demo-vmware]| Error: unhashable type: 'dict'
2023-10-23 01:55:49,816 [vcdNSXMigrator]:[run]:1051 [ERROR] [MainThread]| VCD V2T Migration Tool Failed, Please Check the logs for the exceptions

  • In the <install-path>/vcdNSXMigrator/logs/VCD-NSX-Migrator-preCheck-Log log the following error is seen:
2023-10-23 02:14:23,141 [threadUtils]:[waitForThreadToComplete]:172 [DEBUG] [MainThread] | Traceback (most recent call last):
  File "src\commonUtils\threadUtils.py", line 169, in waitForThreadToComplete
  File "concurrent\futures\_base.py", line 432, in result
  File "concurrent\futures\_base.py", line 388, in __get_result
  File "concurrent\futures\thread.py", line 57, in run
  File "src\vcdNSXMigratorAssessmentMode.py", line 321, in execute
  File "src\vcdNSXMigratorAssessmentMode.py", line 131, in initializePreCheck

KeyError: 'targetExternalNetwork'
  • In the YAML file, the Tier 0 gateway is specified in an unsupported format as below:
Tier0Gateways:
default: CD-T0-GW
 


Environment

VMware Cloud Director 10.x
VMware Cloud Director for Service Provider 10.x

Resolution

This issue is caused due to an unsupported configuration for the Tier 0 gateway in the YAML file. To resolve the issue,update the Tier 0 configuration format in the YAML file to the following format:

Tier0Gateways:<Name-of-the-T0-gateway>

Example: Change the following lines

Tier0Gateways:
default: CD-T0-GW

to

Tier0Gateways: CD-T0-GW