VMware Cloud Community
JDMils
Enthusiast
Enthusiast
Jump to solution

How do I shrink a virtual disk?

I have a virtual server (Win2K8 R2) with a 40GB System drive and 100GB data drive but I want to reduce the data drive to 50GB.

I booted my virtual server using GParted boot DVD, shrunk the disk down to 50GB and confirmed that Windows is OK with the modification, which it is, but VMware console is still showing the data disk as Provisioned = 100GB.

My question is, how do I change the Provisioned value to 50GB to match the disk size?

ESX 4i

| +-- JDMils | +-- ESXi 4.1.0, clustered hosts, HA, DRS & VMotion enabled. |
0 Kudos
1 Solution

Accepted Solutions
aravinds3107
Virtuoso
Virtuoso
Jump to solution

Suggest to use VMware Converter and reduce the disk size as required during the conversion

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful |Blog: http://aravindsivaraman.com/ | Twitter : ss_aravind

View solution in original post

0 Kudos
6 Replies
kummi143
Contributor
Contributor
Jump to solution

Hi Guys,

i am also facing same issue. Suggestion please?.

Regards

0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

Have a read of the following Blog post on the subject,

http://professionalvmware.com/2009/09/how-to-shrink-a-vmdk-file-in-esx/

but be aware that this is not supported. and it is at your own risk.  so before this is done on a production guest. TEST TEST and TEST again,  better still, if you need to reduce the size of the VMDK just do a Conversion of the Guest and select the resize disk option during the configureation stage.  this is Tested, and more importantly SUPPORTED.

the ability to resize VMDKs was removed from VMFSTools in VI3.x because of the number of issues caused by users resizing VMDK's and chopping of data from the end of disks.

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
aravinds3107
Virtuoso
Virtuoso
Jump to solution

Suggest to use VMware Converter and reduce the disk size as required during the conversion

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful |Blog: http://aravindsivaraman.com/ | Twitter : ss_aravind
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

For production yes as that is fully supported, but for playing and education/knowledge purposes the blog post is useful

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
JDMils
Enthusiast
Enthusiast
Jump to solution

First I ran gparted to shrink the partition and then I used the VMware converter to do the job properly. Maybe I didn't need to run gParted in the first place?

Unfortunately the process using VMware converted creates a new virtual server with the new disks and you need to then take the ONE newly sized disk and move it into the same folder as the original virtual server then you can delete the destination virtual server folder, then edit the original server's properties to include the new disk. Quite a lot to do just to shrink a volume!

I hope VMware can improve this process in the future!

| +-- JDMils | +-- ESXi 4.1.0, clustered hosts, HA, DRS & VMotion enabled. |
0 Kudos
antonioredding
Contributor
Contributor
Jump to solution

This isn't nearly as bad as it could be.  Why did you need to resize the disk to a smaller size to begin with?  If you start small, it's much easier to make the disk larger in both the guest OS and in the vmdk settings using the vSphere client.

0 Kudos