How to Shrink a Virtual Machine's .vmdk
In my previous post I explained the art of extending VMDKs and RAW LUNs in the ESX world. Today I will cover shrinking a .vmdk. It is important to resize the volume with a partition tool before you forcefully resize the .vmdk. If you fail to heed this advice you will have a nonfunctional volume whose partitions need to be reformatted.
1) Make sure you have a valid backup of the partition(s) in question.
8) Ensure that you do not shrink too much. In this example I have a 4GB volume with 3GB worth of data. If you shrink beyond 3GB you will need to recover your data. Remember, you can always extend it out a few MB to fill the volume up. Don’t be too stingy.
- Jason Langone