HCX OSAM Migration fails with error "Invalid input (VM "null" already exists.)"
search cancel

HCX OSAM Migration fails with error "Invalid input (VM "null" already exists.)"

book

Article ID: 387562

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • This error may be seen when utilizing orchestration software like Ansible to create OSAM migrations. Once the OSAM migration is created, user cancels the migration due to changes in plans or switchover window. 
  • When the migration is re-created using Ansible the below error is seen:

 

  • In some versions, the error is just "Migration failed", "Initial Sync Failed Transfer Error", or "Initial Sync Failed Transfer Error (JSONArray[0] not found.)" but you still have matching log entries below: 
    • Source HCX-MGR /common/logs/admin/app.log:
2025-01-08 13:25:25.856 UTC [OsAssistedReplicationService_SvcThread-12351, Ent: HybridityAdmin, , TxId: ########-####-####-####-45edff9bd4e0] ERROR c.v.v.h.s.o.jobs.FailTransferJob- [transferId:'########-####-####-####-994577a6173e' sid:'########-####-####-####-cac7c6bf7386' jobId:'########-####-####-####-990fbfc0fae5' hostname:'#####'] Invalid Input (VM 'null' already exits.)

 

Environment

Ansible

VMware HCX 

Cause

  • When using Ansible to orchestrate OSAM migrations, there is no VM name to pass to HCX as the source VM is not apart of vSphere inventory (non VMware VM) - therefore null is used. When these migrations are canceled, the null entry that was used initially remains on destination HCX DB. This causes second migration attempt to fail due to duplicate name.
  • Below steps can be used to verify if an entry for VM with null name exists in Source/Target HCX DB:

Login to HCX DB.

    • psql -U postgres hybridity

Execute below query. Replace "vm_name" with name of VM as seen via HCX GUI.

    • hybridity=# SELECT "migration_getVmNamesByEntityIdsForValidate_cursor"('{"vmNames": ["vm_name"]}'::jsonb);



Resolution

This issue is resolved in VMware HCX 4.11.1, available at Broadcom downloads.

If you are having difficulty finding and downloading software, please review the Download Broadcom products and software KB.

Additional Information

VMware HCX 4.11.1 Release Notes

Fixed Issue 3513766: OSAM migration fails with "Invalid Input (VM 'null' already exists)."
Attempting to trigger a new migration fails in a case when the VM name is missing.