RAV fails with "VM creation failed" or "AlreadyExists" error
search cancel

RAV fails with "VM creation failed" or "AlreadyExists" error

book

Article ID: 433368

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

RAV migration failes for specific virtual machines.

  • The destination network for the virtual machine has been set to an NSX segment.
  • The migration passes the initial validation wizard but fails during the execution phase.
  • The HCX Manager app.log displays the following error:
    ERROR c.v.h.s.v.j.CreateTargetShadowVmWorkflow - [migId=...] Error while executing createTargetShadowVmWorkflow state 'CREATE_SHADOW_VM'.
    java.lang.RuntimeException: VM creation failed.
    Caused by: com.vmware.vim.binding.vim.fault.AlreadyExists: The specified key, name, or identifier 'VM_NAME' already exists.

Environment

VMware HCX

Cause

The primary cause is a mismatch between the selected destination NSX segment and the destination ESXi host configuration. The destination ESXi host does not belong to the Transport Zone associated with the NSX segment selected in the migration settings. When the initial migration attempt fails due to network attachment issues, the cleanup of the partially created "shadow VM" or datastore folder on the destination side may be imconplete. Subsequent retry attempts will then trigger on "AlreadyExists" error because vCenter detects a pre-existing object with the same name.

Resolution

  • Confirm that the correct NSX segment is selected in the HCX migration settings. Pay close attention if multiple segments share the same display name; ensure the correct segment ID is mapped.
  • In the NSX Manager and vCenter , verify that the destination ESXi host belongs to the Transport Zone required by the selected NSX segment.
  • Before retrying the migration, check the destination datastore for any residual folders named after the VM from the failed attempt. Delete these folders if they are no longer needed.
  • Once the network configuration is corrected and residual objects are removed, re-initiate the RAV migration.