By the virtual machine settings, we can know whether the disk is preallocated or not in the disk information.
Once decide to do this, we have to shut down the virtual machine because the disk can’t be converted if it’s powered on or suspended.
To convert the virtual disk by using the following command
$ vmware-vdiskmanager -r < original disk >
Note:
1). The
2). In using the -t flag, VMware virtual disk (vmdk) types has the following choice.
- 0 : single growable virtual disk (single .vmdk file)
- 1 : growable virtual disk split in 2Gb files (multiple 2GB files)
- 2 : single preallocated virtual disk (single file)
- 3 : preallocated virtual disk split in 2Gb files (multiple 2GB files)
- 4 : preallocated ESX
- 5 : compressed for streaming
When successfully finish the convert, we need to replace the original Disk file with the new disk. The action flow is as follows:
AS-IS
TO-BE
Now we can boot it normally.