The
mbralign utility increases the size of the disk by X number of sectors (X can be an odd or even number) when aligning the disks. This increase in size is not reported properly by the vSphere API if X is an odd number.
Example for a 20 GB virtual disk:
Before
mbralign, the size returned by the two APIs (vSphere and VDDK) is:
- vSphere API: 20971520 KB = 41943040 sectors
- VDDK API: 41943040 sectors
After
mbralign, the size returned by the two APIs is:
- vSphere API: 20971520 KB = 41943040 sectors
- VDDK API: 41943041 sectors
If the size of the disk is increased by an odd number of sectors, the size of the disk returned by the vSphere API is less than the size of the disk returned by VDDK.
But if the size of the disk is increased by an even number of sectors, the size of the disk returned by the vSphere API is the same as the VDDK returned size.
This is because the vSphere API returns the disk size (that is, the capacity) in KB as a long value. So when the
mbralign utility increases the disk size (for example by 1 sector, which is 0.5 KB), the vSphere API rounds the value down when representing it as a long value.
In this case, the virtual disk size must be repaired by making it a multiple of 4 KB before backing up the Virtual Machine. If the disks are already backed up, then during restore adjust the size of the disk so that it is multiple of 4 KB and then back up the restored disk again.