Squeezing the Hard Drive on ESX Guest VM

This is a trick I use to squeeze a .vmdk file for a guest VM on ESX.

The process is pretty straight forward. What is good with it, that you do not need to shut down the guest machine (if you have VMotion, of course ;o))

  1. Delete all files you do not need, empty recycle bin and defragment all the drives on guest machine
  2. Run SDelete to clean up the free space on all the drives. Use SDelete -c X:\ and do not forget about backslash after colon. Otherwise you’ll get the error:  Could not determine disk cluster size
  3. In VI center right click on the machine and select Migrate
  4. Select Change Datastore -> select storage -> Thin Provisioned Format

No, the disk size visible from Windows will not be changed. However, the .vmdk file will be converted to a thin provisioned format and will be squeezed to the size the data really take


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: