VMware Cloud Community
tmaung
Contributor
Contributor

Hot to shrink vmdk volume size

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

Tim
0 Kudos
3 Replies
petedr
Virtuoso
Virtuoso

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

http://itknowledgeexchange.techtarget.com/network-administrator/how-to-shrink-vmware-virtual-disk-fi...

www.phdvirtual.com, makers of esXpress

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos
DSTAVERT
Immortal
Immortal

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.

-- David -- VMware Communities Moderator
0 Kudos
a2alpha
Expert
Expert

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

0 Kudos