I created a thin provisioned vm (version 10), independent disks, persistent, with a disk size of 100GB. I installed SLES11 SP3 x86_64 in this vm. OS, patches, and software takes up approx 6GB of space. Why is the -flat.vmdk file 105GB? My thick provisioned vm's with same O/S and 150GB of disk space results in a 155GB -flat.vmdk file. This makes sense. But I expected thin provisioning to be much smaller. Is version 10 thin provisioning broke, or is this the result of independent disks, persistent (which are the requirements to be able to later shrink this vm)? Anybody have any experience with this? Thank you
Ok, I now see that my vm is taking up 15.8 GB of actual space. I have changed the problem description from "Why is thin provisioned vm no smaller than thick?" to "Why is thin provisioned vm so large?" since my actual O/S is only using 10GB of space (12GB if you count 2GB of empty /swap) but my vmdk file is 50% larger than that. Is this to be expected? I ran vmkfstools --punchzero on this vm so it should be as small as possible. Are there other tools to shrink the vmdk file to something closer to the actual used space?
If you browse the datastore through the GUI and check the .vmdk file it should have "Size" and "Provisioned Size" listed. I suspect the 105GB is the provisioned size. You can also check if it has taken the space out of the datastore by viewing its capacity.
A thin provisioned vmdk with a nominal size of 100 gb cant get as large as 105 Gb.
To find out if you really have a thin provisioned vmdk check if the ddb.thinProvisioned = "1" line is there.
Also check vmkfstools -t0 - maybe the disk is completely filled
Thanks Gav0. Yes, the datastore gui shows that used space is 15GB and provisioned space is 100GB. But through some combination of vmware Client and vmware Web Client, I was exporting the actual <mv vm name>-flat.vmdk file from /vms/volumes/volumeid/<my vm name>/ of the esxi host to the local hard disk on my windows box running vcenter. The size of that file is really 105GB. The size of that file on esxi (using ls -la) is really reported as 105GB. Today I used vmware Converter to copy this vm from my esxi host to my local filesystem - and I get what was hoped for - a 15 GB file (<my vm name>.vmdk, not the <my vm name>-flat.vmdk). So I went back to the vmware Client and the Web Client to figure out how I was saving/moving/migrating the vm to the local hard disk and getting the 105GB <name>-flat.vmdk file that is so big. I was unable to find any function to do it, but last friday I found an export function (I remember two disk icons, one with arrow up and one with arrow down) that allowed me to save to the local storage (not a vm datastore). I did it multiple times and it normally timed out, but on the 3rd attempt it copied all 105GB. I cannot find the same screen again in either Web Client or Client. But the new Web Client is so completely unintuitive I'm not surprised. I wish I could figure out where the bogus export function is...but now that I know that Converter works as I need it to, I can move on. Thanks again.
Thin provisioning is a file system feature, where previously unused data blocks are only represented by a pointer and return zeroes when read. When you download this thin provisioned virtual disk, all these "zero" blocks are read and stored on the local disk which explains the expansion to the full size. By using the Converter, the file format has most likely been changed to a sparse file format, where only used blocks are "downloaded" by the Converter.