VMware Cloud Community
thakala
Hot Shot
Hot Shot

Windows Server 2012 VM thin VMDK won't shrink

I am having strange issue with thin provisioned Windows Server 2012 VM on vSphere 5.1.I have wiped free NTFS block on this VM with sdelete -z but thin VMDK file won't shrink no matter how many times I storage VMotion migrate it across datastores.

- I have tried migrating VM from VMFS to NFS and vice versa

- I have set DataMover.HardwareAccelleratedInit to 0

- I have set DataMover.HardwareAccelleratedMove to 0

- I have tried migrating disk to thick and thin again

- I have tried migrating disks while VM is powered on and off

- I have tried Guest Reclaim Fling in this VM

Nothing works with this VM, thin VMDK won't shrink at all.

I tried sdelete -z and storage VMotion with Windows 2008 R2 VM on same ESXi host and on that VMDK did shrink to match size of data on VMDK, so this issue seems to be specific to Windows Server 2012.

Windows 2012 installation is completely basic; VM is set to use BIOS instead of uEFI, disk has MBR partition table and file system is standard NTFS.

Any clues what might be wrong with thin VMDKs and Windows Server 2012?

Tomi http://v-reality.info
0 Kudos
2 Replies
a_p_
Leadership
Leadership

Not sure what's causing it. Another option to shrink a thin provisioned disk, is to use vmkfstools with the --punchzero option (see e.g. http://www.yellow-bricks.com/2011/07/15/punch-zeros-2/). Can you try this to see whether this works?

André

thakala
Hot Shot
Hot Shot

Hey, "vmkfstools -K" actually did work with this Windows Server 2012 VM, VMDK is now at expected size! Thank you André!

Tomi http://v-reality.info
0 Kudos