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:

 

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

If you believe you are encountering this issue please gather the below details and open a support request with Broadcom following the below Knowledge base :
https://knowledge.broadcom.com/external/article/142884/creating-and-managing-broadcom-support-c.html 

  • Migration Details (vm name, migration-id, screenshot of error in HCX UI)
  • Orchestration software used
  • Log bundles from source and target HCX appliances. Please select HCX DB dump option when creating log bundles.