Just got an interesting request from user regarding a datastore that ran out of space on a standalone ESXi host. This is a Dell R720 server with local attached storage and all drives filled.
Debugging the problem:
Upon further investigate i found they create a disk on VM with thick provisioning when they not even using half of the disk space within the vmdk.
However since ESX host is not attached to VCenter server we cannot perform a clone or migration from the console, what to do?
Using The Command Line (SSH)
If you don't have any space available on current datastore like in my situation then you would have to add a temporary datastore. NFS easiest to quickly configure.
SSH to host and run the following command:
vmkfstools –i “<ThickDiskName.vmdk” -d thin “NewDiskName.vmdk”
After this is completed you have to remove the thick disk and add the newly create thin disk to the VM.
For removal options i would recommend selecting "remove from virtual machine" only and NOT yet permanently delete the disk just yet. Wait until you have new disk configured within the VM operating system and verify it works as expected.