VMware Cloud Community
DoDo201110141
Contributor
Contributor

How to convert a thick disk to thin

To convert a thick disk to thin, without using vmware tools.

Instructions based on using an ESXi 4.1 server, with vSphere Client, and a Linux NFS datastore.

1) Zero out free space. Shutdown the machine

2) Copy the vmdk to an NFS datastore. Check that the resulting file is shown in the datastore browser as thin.
If it still shows as thick, double check the '-flat' file is sparse, using 'du' directly on the NFS server.
*DO NOT copy the folder. You must copy the individual VMDK. If you copy the folder, it will be thick on the NFS.

3) Logon to the NFS data store using a tool other than vSphere: i.e samba, or ssh direct to the NFS server

4) You will find you vmdk is in two files: Diskname.vmdk, and DiskName-flat.vmdk. Edit the first one, and add the line:

ddb.thinProvisioned = "1"

Save it.

5) Go back to the datastore browser, and move the vmdk back from the NFS to your local datastore.

Confirm that the disk is now displayed as thin (i.e, you can see 'Provisioned size' is larger than 'Size')

6) Edit the Virtual machine, and remove the old thick hard disk, close settings, go back in, and add the new thin hard disk.

Wella! Thin!

Hope this helps someone Smiley Happy

Message was edited by: DoDo, clarified need to check that the disk has been stored as a sparse file

Edit2, clarified environment, and warned against copying the VM's whole folder.

0 Kudos
5 Replies
MauroBonder
VMware Employee
VMware Employee

Hi DoDo,

If possible create how Document, and delete this discussion.

If you need help i can do it without problems.

Thank you


Please, don't forget the awarding points for "helpful" and/or "correct" answers. 

Mauro Bonder - Moderator

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos
DoDo201110141
Contributor
Contributor

Good idea.

Perhaps someone could confirm my method before making it a how to?

Do I get points ?? :smileysilly:

0 Kudos
continuum
Immortal
Immortal

in my experience your procedure would fail at step 2 - usually a vmdk copied to a NFS datastore arrives as thick.
So your procedure would not work


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

0 Kudos
DoDo201110141
Contributor
Contributor

Well it does work.

Have you actually logged onto the Unix-based NFS server and done a 'du'?

No. I dont think so.

Please do not pollute my post with uneducated answer!

Let me clarify step 2:

2) Copy the vmdk to an NFS datastore. Check that the resulting file is shown in the datastore browser as thin. If it still shows as thick, double check the '-flat' file using 'du' directly on the NFS server, as per the next steps.

0 Kudos
DoDo201110141
Contributor
Contributor

I apologise, you clearly are a vmdk 'Guru', so I retract 'un-educated'.

But a rude 'Guru' at that.

Please discover the procedure for yourself, with an Linux/Unix NFS server

Please do not answer my post as though I am pulling rabits out of a hat!?

You think I am making it up?? lol

Cheers

Michael.

0 Kudos