We'll be using the ESX console to perform this operation.
First, power off the VM.
Use vCenter to find the host the VM is on
and the associated datastore location.
Log into the ESX host's remote console as root user.
Convert the original thick .vmdk into a thin one
vmkfstools -i THEVMNAME.vmdk -d thin thinTHEVMNAME.vmdk
Move the original .vmdk flat file out of the way.
vmkfstools -E THEVMNAME.vmdk orig-THEVMNAME.vmdk
Move new thin .vmdk flat file into place
vmkfstools -E thinTHEVMNAME.vmdk THEVMNAME.vmdk
In vCenter remove the VM from inventory and add it back again,
otherwise the disk may not show as 'Thin'.
Ensure that the VM boots up and all drives are available.
If things test out ok you can remove the original disk file, using vmkfstools is the proper way so the datastore knows it's gone.
vmkfstools -U orig-THEVMNAME.vmdk
No comments:
Post a Comment
Let us know if you found anything helpful, or have an even better solution. Thanks for your participation in the discussion.