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
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.
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
Good idea.
Perhaps someone could confirm my method before making it a how to?
Do I get points ?? :smileysilly:
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
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.
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.