Configuring vSphere Replication for VM Fails with error "There is one or more pre-existing .vmx files into the replication target vSAN namespace".
search cancel

Configuring vSphere Replication for VM Fails with error "There is one or more pre-existing .vmx files into the replication target vSAN namespace".

book

Article ID: 423878

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms : 

When attempting to configure or reconfigure replication for a virtual machine using vSphere Replication (VR) the task fails with the following error message:

“There is one or more pre-existing .vmx files into the replication target vSAN namespace, where the .vmx file of the recovered VM must be created. To avoid conflict during recovery, you must manually delete the old .vmx files.”

Environment

  • vCenter Server: 8.0.x

  • vSphere Replication: 9.0.x

  • Site Recovery Manager: 9.0.x

  • Storage: vSAN Datastore (Target Site)

 

Cause

This issue occurs when a previous replication for the same VM was removed from Source Site but the target directory on the destination vSAN datastore was not fully deleted.

Even if the replication is no longer visible in the vSphere Replication UI, stale files (specifically the .vmx or configuration files) will remain in the DR vSAN Datastore since there was no proper cleanup performed during the VM Replication removal state.

Resolution

To resolve this issue, you must manually remove the stale configuration files from the target datastore before re-attempting the replication setup.

Refer : Stop Replicating a Virtual Machine

Step 1: Identify the Stale Directory

  • Log in to the vSphere Client at the Target (DR) Site.

  • Navigate to the Storage view and select the vSAN datastore used for replication.

  • Click on the Files tab.

  • Locate the folder corresponding to the VM experiencing the error (e.g., Test_VM).

Step 2: Clear Stale Files

  • Verify that no active replication or registered VM is currently using this folder.

    Note: Before proceeding to next step, ensure you have a backup or are certain the data is no longer needed before deletion.

  • Delete the stale .vmx files or the entire folder if it only contains orphaned data from the previous replication attempt.

Step 3: Reconfigure Replication

  • Return to the Source Site.

  • Right-click the VM and select Configure Replication.

  • Follow the wizard to completion. The task should now succeed as the target namespace is clear.

Refer : Configure a Replication for Virtual Machine