Configuring a new replication fails for virtual machines whose disk files don't contain a vmdk extension in Cloud Director Availability 4.x
search cancel

Configuring a new replication fails for virtual machines whose disk files don't contain a vmdk extension in Cloud Director Availability 4.x

book

Article ID: 315029

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:

  • When configuring a new replication, it initially shows in the Cloud Director Availability Portal but then disappears and you see an error similar to:
Operation aborted due to an unexpected error.
  • In the /opt/vmware/h4/replicator/log/replicator.log file on the destination Cloud Replicator Appliance, you see an entry similar to:
2022-10-12 20:14:36.689 ERROR - [UI-a6e59dc3-9fcf-4dbe-b35e-6910ab8db2e9-r6403-g1-44-dE] [job-23] com.vmware.h4.jobengine.JobExecution   : Task f63d8099-####-####-####-########fc9 (WorkflowInfo{type='setupDestination', resourceType='replication', resourceId='H4-05f030be-####-####-####-########c2e', isPrivate=false, resourceName='null'}) has failed

java.lang.RuntimeException: f1bd88f7-be2a-43c3-b940-d6a08224c514 does not have an extension.
    at com.vmware.h4.replicator.util.DatastoreHelper.insertSuffixBeforeExtension(DatastoreHelper.java:308)
    at com.vmware.h4.replicator.replication.util.ReplicaDiskManagerService.getNewDisks(ReplicaDiskManagerService.java:156)
    at com.vmware.h4.replicator.replication.SetupDestinationJob.execute(SetupDestinationJob.java:184)
    at com.vmware.h4.replicator.replication.SetupDestinationJob.execute(SetupDestinationJob.java:82)
    at com.vmware.h4.jobengine.JobEngine.execute(JobEngine.java:174)
    at com.vmware.h4.jobengine.JobEngine.lambda$resume$0(JobEngine.java:140)
    at com.vmware.h4.jobengine.ThrottledExecutorService$1.run(ThrottledExecutorService.java:132)
    at com.vmware.h4.common.mdc.MDCRunnableWrapper.run(MDCRunnableWrapper.java:30)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)


Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware Cloud Director Availability 4.x

Cause

This issue occurs when the virtual machine you are attempting to replicate is missing the .vmdk extension from the disk files.

Resolution

To resolve this issue, add the .vmdk extension to the affected files and ensure the vmx and vmdk descriptor files link to the disk file with the correct extension before attempting to replicate it again.
  1. Power off the impacted virtual machine.
Note: This is done from Cloud Director if the source site is a Cloud Site or vCenter Server if the source site is an On-Premises Site.
  1. SSH to the ESXi host the virtual machine is on.
  2. Navigate to the datastore and directory of the virtual machine.
  3. Take a backup of the vmdk descriptor file and vmx file:
cp vmName vmName.bak
cp vmName.vmx vmName.vmx.bak

Note: Replace vmName with the name of the affected files.
  1. Add the .vmdk extension to the descriptor and flat disk files where it is missing: 
mv vmName vmName.vmdk 
mv vmName-flat vmName-flat.vmdk
  1. Verify that all disk files now contain the .vmdk extension:
ls -l
  1. Edit the vmdk descriptor file:
vi vmName.vmdk
  1. In the # Extent description section, ensure the flat disk file name contains the .vmdk extension.
Example:
# Extent description
RW 8388608 VMFS "vmName-flat.vmdk"
  1. Edit the vmx file:
vi vmName.vmx
  1. For the disk file name entry, ensure the descriptor files contain the .vmdk extension.
Example:
scsi0:0.fileName = "vmName.vmdk"
  1. Reload the vmx file.
  1. Power on the virtual machine.

Once you have verified the virtual machine is working as expected, you can remove the backup files and reattempt configuring the replication.