Unable to add a virtual machine for replication - "Unable to create base virtual disk '[XXX]XXX.vmdk' for primary virtual disk with key 2001."
search cancel

Unable to add a virtual machine for replication - "Unable to create base virtual disk '[XXX]XXX.vmdk' for primary virtual disk with key 2001."

book

Article ID: 399081

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms

  • When we add a virtual machine for replication, it fails with the error "Unable to create base virtual disk '[XXX]XXX.vmdk' for primary virtual disk with key 2001."

  • When we try to reconfigure the replication, the reconfiguration wizard shows the below warning

  • If we complete the reconfiguration task, it throws the below error

  • Irrespective of whether we configure enhanced replication or legacy replication, it fails with the same error

  • It is observed that the vm replication fails only for 2 specific virtual machines in the environment and these virtual machines are deployed from a template

  • Other virtual machines can be successfully added for replication

Environment

vSphere Replication 8.x

vSphere Replication 9.x

Cause

This issue is caused due to incorrect configuration of the hard disks. In this specific scenario, issue caused due to incorrect hard disk size

Cause Validation

From the virtual machine edit settings view, we can see that the size of the hard disk does not reflect correctly. We can see that the size of hard disk 2 just shows as 2 but does not specify whether it is in KB, MB, GB or TBs

Additionally, from the /opt/vmware/hms/logs/hms.log of the target vSphere replication appliance, we can see that the replica for the first hard disk (key 2000) is successfully created. The issue is seen only for the second disk with key 2001

2025-05-27 15:58:20.211 INFO com. vmware. hms. replication. secondaryGroup [hms-main-thread-3166] (. .hms. replication.SecondaryGroupImpl) [operationID=7c0ae2ca-5ebe-42c6-9048-2f0563304230-HMS-477199, sessionID=E8D66AC2, operationID=7c0ae2ca-
bebe-42c6-9048-2f0563304230-HMS-477199, sessionID=E8D66AC2, task=HTID-6ae1635d-4526-4d6b-b6e7-6439850924c3] | A secondary virtual disk 'com. vmware.hms. db.entities. DiskEntity@2062500120 : replicatedDiskId=RDID-ef7c030c-1441-423d-aa5e-21e4
05fb344e, deviceKey=2000, sourceDiskFileName = [datastore]vm/vm.vmdk, diskUUID = 6000C299-xxxx-xxxxxxxx-xxxxxxxxxx, destinationDatastoreMoid = datastore-x, destinationPath = vm, destinationDiskFileName = vm.vmdk, storageProfileId = null, capacityInKb = 6815744, isExcluded = false, destinationDiskType = preallocate, adapterType = lsiLogic, isOfflineCopy = false, vm = com.vmware.hms.db.entities.SecondaryVirtualMachineEntity: MoId HMSVM-90838983-2311-4f83-86b8-500ae829a3c7' was created for primary virtual disk device with key :2000, Group MOID:'GID-767a0d59-9382-49d7-b10f-8bd9511ec2ea', Group name: 'vm'.

Resolution

Exclude hard disk 2 from replication while adding the virtual machine for replication and the replication will be successful. Please refer the following document for steps to exclude the disk - Exclude a Disk from the Replication

Additionally, validate with your internal team whether the disk is corrupt. If the disk is still required, restore it from backup and then re-add it for replication.