VixDiskLib_Rename() changes the name of a virtual disk. Use this function only when the virtual machine is powered off.
VixDiskLib_Grow() extends an existing virtual disk by adding sectors. This function supports hosted disk, but not managed disk.
VixDiskLib_Defragment() defragments an existing virtual disk. Defragmentation is effective with
SPARSE type files, but might not do anything with
FLAT type. In either case, the function returns
VIX_OK. This function supports hosted disk, but not managed disk.
VixDiskLib_Shrink() reclaims unused space in an existing virtual disk, unused space being recognized as blocks of zeroes. This is more effective (gains more space) with
SPARSE type files than with pre-allocated
FLAT type. On success, the function returns
VIX_OK. This function supports hosted disk, but not managed disk.
In VMware system utilities, “prepare” zeros out unused blocks in the VMDK so “shrink” can reclaim them. In the API, use VixDiskLib_Write() to zero out unused blocks, and
VixDiskLib_Shrink() to reclaim space. Shrink does not change the virtual disk capacity, but it makes more space available.
VixDiskLib_Unlink() deletes all extents of the specified virtual disk, which unlinks (removes) the disk data. This is similar to the remove or erase command in a command tool.