When attempting to import a workload domain in VCF Fleet Management, the import task fails. The UI displays an internal failure related to the vcf_brownfield.py script.
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--vcenter vcenter.domain.com --internal-vcf-auth --nsx-fqdn nsx.domain.com --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
Environment
VCF Operations 9.0.x
VMware Cloud Foundation 9.x
Cause
The issue is caused by a communication failure between the SDDC Manager and one or more ESXi hosts. The import tool expects to discover SSH keys for every host identified in the environment. If a host is unreachable via SSH (typically due to firewall restrictions), the script fails to iterate through the key list, resulting in a 'NoneType' fatal exception.
Reviewing the /var/log/vmware/vcf/domainmanager/brownfield/vcf_brownfield.log file on the SDDC Manager appliance reveals the following error:
[WARNING] local_command_utils:123: Discovered only X out of Y SSH keys, retrying... [CRITICAL] vcf_brownfield:62: Fatal exception: ("'NoneType' object is not iterable",)
Resolution
To resolve this issue, you must ensure that the SDDC Manager has unrestricted SSH access to all ESXi hosts being imported.
Log in to the SDDC Manager appliance as the vcf user via SSH.
Switch to the root user: 'su - root'
Manually validate SSH connectivity from the SDDC Manager to each ESXi host using the following command: 'ssh -v root@<esxi-host-fqdn>'
If the connection fails or hangs for any host, verify your network firewalls.
Modify firewall rules to allow SSH traffic (Port 22) from the SDDC Manager IP address to all ESXi host management IP addresses.
Once connectivity is verified for all hosts, retry the workload domain import.