There is a command vmkfstools to extend vmdk volume. Is there a command to shrink vmdk volume? Or any other idea to shrink it?
Thanks,
Tim
I have not actually went through any of these methods to verify them but I foudn a number of methods discussed. I woud definitely suggest trying on a dummy VM to make sure before touching anything in production.
http://professionalvmware.com/2009/09/how-to-shrink-a-vmdk-file-in-esx/
http://www.howtoforge.com/how-to-shrink-vmware-virtual-disk-files-vmdk
www.phdvirtual.com, makers of esXpress
The safest way to shrink is to use the VMware standalone converter. It can be done hot. Use the converter with the source as a powered on server and the destination as the same ESXi host. Once complete and verified you can remove the original. If you are running out of space on the disk you will need to add additional disk space as a datastore first.
It depends which volume you want to shrink, if it is just a data vmdk, then I would normally create a new vmdk of the new size required then copy (robocopy or other) the data across.
If it is just the one vmdk or the boot/system vmdk, then I would use converter as DSTAVERT has said. I would prefer to use the vmconverter coldclone boot CD in preference to the hot converter so as not to run into issues with services running or users accessing it whilst converting.
Hope this helps,
Dan