Link to home
Start Free TrialLog in
Avatar of abhijitm00
abhijitm00Flag for United States of America

asked on

Shrinking disk size in 2008 R2 VM

Hi Experts, have a 2008 R2 VM which has a 2TB disk size on the C:\ but is actually only using 100GB i.e. under My Computer it shows up as 100GB but under Computer Management C:\ drive is 2TB. The .vmdk for this file is 2TB as well. Is there a way to shrink this file both from the OS as well as VmWare?

TIA
Avatar of abhijitm00
abhijitm00
Flag of United States of America image

ASKER

I have tried shrink volume but it only shows 1151MB that can be freed up. Thanks
Your best bet would be to do V2V. Use vmware converter and resize the disk when you convert.
Avatar of Bryant Schaper
before that route you can try this.  Do a vstorage migration to another datastore and choose thin provision as the conversion.

This can fail however, and if it does take a look at the below knowledge base.  I just had this problem a couple weeks ago and the storage migration didnt work, I ran sdelete -z d:\ (d drive in my case) and then from shell ran teh vmfstools -K /pathtodisk and it worked perfectly, went from 600GB to 90GB.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004155
There is no other way than to do V2V, because you can't shrink thick provisioned vmdks, only thin provisioned. Even if you shrink the OS partition, the disk remains at 2TB. FWIW, you can shrink the OS partition after performing a full defrag (usually not recommended for VMs, but OK in this case).
if we are shrinking the file, it is not think is it?

In the OS you can shrink the volume, this should give the space back, the vm is think, it will never reclaim the space, so convert it to thin provisioned and you can reduce it.

From the sounds, it is a thin provision consuming more than it should.
SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial