Running a VMware backup job you may face a backup job failure with an error 'Source and destination disk size doesn't match'. The root cause of this issue is that on the VM (Virtual Machine) the source VMDK (Virtual Machine Disk) is not an exact multiple of 1K in size or the disk has an odd number of sectors.
Message Log Sample:
14-Jun-21 08:00:00: sql_find.c:184 No Job record found: ERR=
CMD=SELECT StartTime FROM Job WHERE JobStatus='T' AND Type='B' AND Level IN ('I','D','F') AND Name='VMwareVM+VM:Backup' AND ClientId=59 ORDER BY StartTime DESC LIMIT 1
14-Jun-21 08:00:00: No prior or suitable Full backup found in catalog. Doing FULL backup.
14-Jun-21 08:40:35: BeforeJob: run command "/raider/etc/runBeforeJob.sh 41834 VMwareVM+VM:Backup.2021-06-14_01 8276F9FF-E44B-B707-240B-DF48F6C2BD59 Backup Full"
14-Jun-21 08:54:44: VMware Backup Started
14-Jun-21 08:56:03: VMBackup: creating base storage directory /raid/:bdd:/:vmware:/8276F9FF-E44B-B707-240B-DF48F6C2BD59/VMwareVM+VM:Backup.2021-06-14_01.00.00.59
14-Jun-21 08:56:03: VMBackup: processing VMDK '[VMware_fileserver] VMwareVM/VMwareVM-000002.vmdk'
14-Jun-21 08:56:34: Saving VMDK using CBT from [VMware_fileserver] VMwareVM/VMwareVM-000002.vmdk to /raid/:bdd:/:vmware:/8276F9FF-E44B-B707-240B-DF48F6C2BD59/VMwareVM+VM:Backup.2021-06-14_01.00.00.59/6000C292-9A2E-43AA-D55C-A896E9E43238/6000C292-9A2E-43AA-D55C-A896E9E43238.vmdk
14-Jun-21 08:56:34: Change Id being used for CBT query = *
14-Jun-21 08:56:34: Saving VMDK using CBT: 58.866 GB out of 60.000 GB (98.11%)
14-Jun-21 09:59:02: VMBackup: completed backup of VMDK '[VMware_fileserver] VMwareVM/VMwareVM-000002.vmdk'
14-Jun-21 09:59:02: VMBackup: processing VMDK '[VMware_fileserver] VMwareVM/VMwareVM_1-000002.vmdk'
14-Jun-21 09:59:04: Saving VMDK using CBT from [VMware_fileserver] VMwareVM/VMwareVM_1-000002.vmdk to /raid/:bdd:/:vmware:/8276F9FF-E44B-B707-240B-DF48F6C2BD59/VMwareVM+VM:Backup.2021-06-14_01.00.00.59/6000C29E-B472-0B58-6F25-3C13E15A9247/6000C29E-B472-0B58-6F25-3C13E15A9247.vmdk
14-Jun-21 09:59:04: Change Id being used for CBT query = *
14-Jun-21 09:59:04: Saving VMDK using CBT: 2.199 TB out of 2.200 TB (99.96%)
14-Jun-21 09:59:46: VMwareBackupJobRunner: error encountered during VM backup: com.rvx.vmware.exceptions.VmwareOperationException: io.grpc.StatusRuntimeException: INTERNAL: Source and destination disk size doesn't match: [VMware_fileserver] VMwareVM/VMwareVM_1-000002.vmdk [2418925580800 bytes] != /raid/:bdd:/:vmware:/8276F9FF-E44B-B707-240B-DF48F6C2BD59/VMwareVM+VM:Backup.2021-06-14_01.00.00.59/6000C29E-B472-0B58-6F25-3C13E15A9247/6000C29E-B472-0B58-6F25-3C13E15A9247.vmdk [2418925580288 bytes]. Remote disk [[VMware_fileserver] VMwareVM/VMwareVM_1-000002.vmdk] is not a multiple of 1KB.
14-Jun-21 09:59:46: VMware Backup Finished
14-Jun-21 09:59:46: Job started, firmware version: 18.104.22.168, client id: 8276F9FF-E44B-B707-240B-DF48F6C2BD59, client ip: localhost, agent id: Unknown
14-Jun-21 09:59:47: BeforeJob: A failure has occured, Job is terminating.
14-Jun-21 09:59:47: Runscript: BeforeJob returned non-zero status=1. ERR=Child exited with code 1
The VMware UI (User Interface) does not allow you to create a disk that isn't an exact multiple of 1K, but a disk that wasn't created in the UI can easily be created like this. Some ways this can happen include:
VMDK is created from the command line
The VM was imported from Open Virtualization Format (OVF or OVA)
The VM was converted from another hypervisor
The VM was created as part of converting a physical machine (P2V)
In order to resolve this issue, it is necessary to resize the disk to be an even number of sectors. The easy way to do this is to grow the disk from the VMware UI. Even the smallest amount the UI will allow to grow the disk will be enough.
Step 1 - Searching VM in the vCenter
Run VMware vCenter and find the VM in the vCenter UI.
Step 2 - Editing VM settings
Right-click on the VM in question and select Edit Settings.
Step 3 - Checking VM disks size
Find the Hard Disks section and check if there is a disk that isn't shown as a whole number.
Step 4 - Growing VM disk
Grow the disk to the whole number.
Once disk size is adjusted, the issue should be resolved. Initiate a Full backup job for this VM to confirm that this error doesn't occur anymore.