VMware Cloud Community
JohnyBeGood
Enthusiast
Enthusiast

Can't change Hard disk 1 size?

Hi all,

When I created VM a set disk Type Thick provisioned, lazily zeroed to 100GB.
after that using vmkfstools -i FS01-2016.vmdk -d thin FS01-2016-thin.vmdk and converted to thin.

Now, no matter what I can't lower down to reasonable VM disk size ie. 60GB. VM is around 12GB. Any ideas how to change it?

Reply
0 Kudos
4 Replies
basteku73
Enthusiast
Enthusiast

If you want to change the size of the vmdk you can do it only using vcenter converter, but as I can see there is a problem to download this. VMware is working on new version. But I think its possible to find it somewhere in the deepest parts of the Internet 🙂 

Regards, 

Sebastian

Tags (1)
Reply
0 Kudos
JohnyBeGood
Enthusiast
Enthusiast

Thanks for the reply! I will try to look for it 🙂

Tags (1)
Reply
0 Kudos
ObjectifDubai
Enthusiast
Enthusiast

hi,

 Logically, you can extend a disk but it seems impossible to me to shrink it.
How could VMware know which block to delete without risk of losing data.

And I confirm to you that even through the vCenter, you cannot reduce the size of a disk

 

Reply
0 Kudos
continuum
Immortal
Immortal

Lets assume you have a Windows VM vmdk with one 100gb NTFS partition ...
1. boot into a gparted LiveCD and change the size of the partition to 60 gb
2. boot again to gparted and reapair the GPT table - if you use GPT
3. boot into original guestOS and check if it boots - if not fix with a Windows LiveCD
4. if all checks out - cut the vmdk by writing an empty MB block at an offset of 62gb-
5. edit vmdk descriptorfile and provide the new size

Sorry - if that sounds scary - if you dont know how to boot an existing VM from a LiveCD this is not for you.
If your vmdk is encrypted - dont try.
Step 4 is undocumented but works like a charm in 2 seconds. If you miscalculate the vmdk may be toast.
This only works if your VMDK is of type "VMFS" or monolithicFlat so that you can address the flat file.

If the partition you want to resize is not the last on the disk you need a different procedure.

Ulli


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

Reply
0 Kudos