When initiating a vApp Template Replication in VMware Cloud Director Availability (VCDA), the workflow finishes without showing explicit errors in the UI, but it fails to replicate all the virtual machines contained within the template.
Example: A source template contains seven VMs, but only three VMs appear or are successfully processed on the destination site.
The issue persists even if the source and destination environment configurations (such as vSAN storage profiles, thin provisioning, unique UUIDs, and account permissions) are validated and correct.
com.vmware.h4.manager.api.exceptions.LockTimeoutException: Lock acquisition timed out for object: 'C4VAPP-########-####-####-####-########' at com.vmware.h4.cloud.job.VmReplicationJob.lambda$persistRtVm$32(VmReplicationJob.java:972)
INFO - [...] [job-71] com.vmware.h4.cloud.service.RtVmService : Moving RT VM into existing vApp ########-####-####-####-################-####-####-####-########
VMware Cloud Director (VCD) does not natively support concurrent recompose operations. When a vApp template replication workflow starts, individual VM replications must sequentially acquire a lock on the destination parent vApp object.
If the underlying VCD environment experiences performance issues or slow RT VM management operations, the concurrent VM replications will queue up waiting for the vApp lock. By default, the lock acquisition timeout is set to 20 minutes. If a VM replication cannot obtain the lock within this 20-minute window, it fails silently in the UI, causing only the first few VMs (those that successfully acquired the lock in time) to be visible and replicated.
Increase the C4 vApp Lock Timeout to configuration to 60 minutes (3,600,000 milliseconds) by following the steps below
default.lock.timeout=3600000
systemctl restart cloud