User Tools

Site Tools


vmware:thin_disk

Convert vmdk to thin

Which option to choose to use tick or thin provionning:

zeroedthick (default): Space required for the virtual disk is allocated during creation. Any data remaining on the physical device is not erased during creation, but will be zeroed out on demand the first time the virtual machine writes to disk. The virtual machine does not read stale data from disk.

eagerzeroedthick: Space required for the virtual disk is allocated at creation time. In contrast to zeroedthick format, the data remaining on the physical device zeroed out during creation. It might take much longer to create disks in this format than to create other types of disks.

thin: Thin-provisioned virtual disk. Space required for the virtual disk is not allocated during creation, but is supplied, zeroed out, on demand at a later time. Convert thin-provisioned disks with the -j option.

Example

 # vmkfstools -i HMC7.vmdk -d thin /vmfs/volumes/SAN-DATA01/HMC7.vmdk
Destination disk format: VMFS thin-provisioned
Cloning disk 'HMC7.vmdk'...
Clone: 98% done.

Full procedure:

VM must be powered off.

1. Use vCenter to see what host the VM to be converted is on and note down disks Datastore location.

2. Log into that hosts ILO remote console as root user (or putty in if you have the access).

3. Convert the original thick .vmdk into a thin one

vmkfstools -i SERVERNAME.vmdk -d thin thinSERVERNAME.vmdk

4. Move original .vmdk flat file out of the way.

mv SERVERNAME-flat.vmdk orig-SERVERNAME-flat.vmdk

5. Move new thin .vmdk flat file into place

mv thinSERVERNAME-flat.vmdk SERVERNAME-flat.vmdk

6. Remove VM from vcenter inventory and add back again otherwise disks do not show as 'Thin'

7. Check VM boots up and all drives are available

8. Tidy up by deleting the original files

rm thinSERVERNAME.vmdk
rm orig-SERVERNAME-flat.vmdk
vmware/thin_disk.txt · Last modified: 2021/01/01 21:25 (external edit)