Change VM disk from thick to thin with standalone ESX host and no vcenter server connection

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?

Resolution:

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s