Replication is not supported for disk with device key XXXX
search cancel

Replication is not supported for disk with device key XXXX

book

Article ID: 312693

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

 

Symptoms:


Adding a VM HDD to replication fails with the error below.

ERROR
Operation Failed
Replication is not supported for disk with device key 2011. Capacity, specified in bytes (3408486046208), cannot be converted to capacity, specified in kilobytes (3328599654). Remainder from division is 512 bytes.
5/20/23, 11:55:10 AM -0400


Environment

VMware vSphere Replication 8.x

Cause


vSphere Replication will fail in case replicated VM has a disk resized to value non-divisible by 512. vSphere Replication cannot allow configuring for replication of disk with capacity in bytes that is not visible by 1024. As VR uses VirtualDiskManager API to create the replica base disks at the target site. And VirtualDiskManager API requires capacityInKB. As of today VR cannot switch to FCD API for managing replica base disks due to some missing functionality.

  1. Increasing a VM HDD size from vCenter or host client that’s in TB unit  can lead to a conversion in decimal numbers which is not divisible by 1024. It’s better to change the unit value from TB to GB and then increase the HDD size ensuring that the new RW size in VMDK is divisible by 1024.

  2. Avoid entering fractional values (e.g. 1.2 GB/GiB or TB/TiB) in VM edit settings

  3. VMs were deployed using a scripted installation

hms.log:

2023-05-20 15:55:10.094 INFO  hms.i18n.class com.vmware.hms.response.filter.I18nActivationResponseFilter [tcweb-16] (..response.filter.I18nActivationResponseFilter) [operationID=0fbb1e66-c31d-4eef-9ced-e107b7e1aae5-HMS-157370,sessionID=D138F3577F75048B79DC70AB269CFF7ECCA32090] | The localized message is: Replication is not supported for disk with device key 2011. Capacity, specified in bytes (3408486046208), cannot be converted to capacity, specified in kilobytes (3328599654). Remainder from division is 512 bytes.

Resolution

  1. To begin with, note down all the disks in VM edit settings showing decimal sizes. Look at the example below.
  2. Cat all these VMDK files and check if the RW size under extent description can be multiplied by 512 bytes and divided by 1024 (3 times)
  3. If you come across a disk that shows a decimal value after performing step 2, then this is the faulty disk that requires a disk size change to match Tib/Gib
  4. Increase the HDD size from host client by converting Tebibyte to Gibibyte (Where Gib is an integer/whole number)

NOTE: The values reported for hard disk sizes in vSphere Client (and across vSphere) are base-2 values, so they are technically GiB/TiB not base-10 GB/TB. It's like this for all vSphere components not just UI (VPXD, ESXi, vSphere/Host UI, PowerCLI, etc).

Example:

Datastore1 :

HDD1: [Datastore1] Test/Test.vmdk     - 3.516 TB
HDD2: [Datastore1] Test/Test_1.vmdk - 1.465 TB
HDD3: [Datastore1] Test/Test_2.vmdk - 1.465 TB

Datastore2 :

HDD4: [Datastore2] Test/Test.vmdk   - 3.1 TB
HDD5: [Datastore2] Test/Test_1.vmdk - 1.465 TB
 
Datastore3 :

HDD6: [Datastore3] Test/Test.vmdk   - 1.465 TB
HDD7: [Datastore3] Test/Test_1.vmdk - 1.465 TB
HDD8: [Datastore3] Test/Test_2.vmdk - 1.465 TB



The error is complaining about HDD4: [Datastore2] Test/Test.vmdk - 3.1 TB which translates to 3,174.400000095367 in GiB when multiplied by 512 & divided by 1024 (3 times).

Now, change the size of HDD4 to 3200 GB (whole number) from the host client. Login to host client > Edit VM settings > Change the unit of size from TB to GB > Input the correct HDD size. 



RW is 6657199309 before increasing the disk size – Multiply this value by 512 & divide it by 1024 (3 times). Which will give us 3,174.400000095367. We need to round-off this number to a whole number without decimals. For example: 3175 or higher. 

[root@esxi01:/vmfs/volumes/62582428-0e00c5d7-7eab-0025b501cc07/Test] cat Test.vmdk
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=084d6a1c
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 6657199309 VMFS "Test-flat.vmdk"

RW is 6710886400 after increasing the disk size to 3200 GB which is divisible by 1024 

[root@esxi01:/vmfs/volumes/62582428-0e00c5d7-7eab-0025b501cc07/Test] cat Test.vmdk
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=c27f09f8
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 6710886400 VMFS "Test-flat.vmdk"

Now, reconfigure or remove and re-add (retain replica seeds) this VM to replication.