VMware Cloud Community
kjhurni
Contributor
Contributor

Shrink thick-provisioned vmdk file -only with converter?

I'm not sure if this is the right forum for this (or if under vstorage or converter).

Apparently a "feature" of Vmware is that you can create a max size vmdk (2.0 TB) and then create a snapshot and then you cannot consolidate it because it really needs 2 TB - 512mb or something.

As a result, we have to shrink the VMDK file (Windows 2012 R2 NTFS volume, plenty of free space, so we can use free tools to shrink the NTFS volume/partition).

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100201...

Seems to imply this can be done, but seems to also repeatedly only mention THIN provisioned disks, not THICK provisioned ones.

Further, it says to look at the Converter guide, and I only find the word "shrink" ONCE in the entire manual (page 71), which talks about Synchronizing a physical machine to a virtual machine.  But that's not what we have.

So does anyone know HOW to actually shrink a vmdk file that's thick-provisioned?

If we have to use Converter then HOW exactly?  (Obviously this is a virtual machine, not a physical one).

Thank you

0 Kudos
4 Replies
a_p_
Leadership
Leadership

Prior to vSphere 5.5 the maximum virtual disk size was indeed 2TB minus 512 Bytes. However, in order to be able to create snapshots the maximum virtual disk size was 2,032GB (see http://kb.vmware.com/kb/1012384). With vSphere 5.5 and virtual hardware version 10 things changed and the maximum virtual disk size is now 62TB.

To find out what can be done in your case please provide some information about your environment. Which vSphere/ESXi version/build do you currently use? Do you use vCenter Server to manage the environment? In case of running an older version, is your hardware supported for ESXi 5.5 (see VMware Compatibility Guide), and/or is it an option for you to upgrade?

Btw. the maximum virtual disk size is independent of whether you use thin or thick provisioning. What matters is the provisioned size.

André

0 Kudos
kjhurni
Contributor
Contributor

Hello, we are using ESXi 5.1 Update 1 with Vcenter (this isn't the free VMware version)

We don't really have the ability at this point to upgrade to 5.5

I was more concerned with the VMware KB article that implied that shrinking could only be done with THIN provisioned disks, not THICK ones, and the fact that it references the Vmware Converter manual but that manual only mentions shrinking once when performing a Synchornize from a powered on P to V migration.

Thank you

Kevin

0 Kudos
continuum
Immortal
Immortal

It is possible to downsize existing vmdks with dd. Thick or thin provision does not really matter - only sparse formats will not work.
But when the vmdk in question is using a GPT-format the whole procedure is quite advanced. Here are the steps in short:

1. defragment the disk from inside the guest
2. downsize the partition inside the guest
3. power off the VM
4. cut the vmdk with dd - make sure you really understand what your dd-command does - tripple check it !!!
5. boot the VM into a Linux LiveCD that has the tool gdisk
6. fix the GPT (gdisk will tell you that the backup copy of the GPT at the end of the disk is missing/damaged)
7. boot back into the original Windows


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

kjhurni
Contributor
Contributor

Ugh, that sounds horrible.

Does dd keep the NTFS file rights intact?

In that case, we may just keep things as they are and upgrade eventually to VMware 5.5 and resolve the issue that way.

Although I'd still like an answer to the original question about the fact that the KB says to use Converter, but the Converter manual ONLY mentions shrink (or shrinking) once and only specifically in the event that you are doing a P-to-V and ONLY when using thin-provisioned disks.

If the Converter docs are wrong, then we need to get VMware to change them.

Thank you though.

0 Kudos