cornelius10
Contributor
Contributor

Why is my vmdk file so large?

Let me start off by saying that I am new to VMware and therefore have no idea what I am doing. I have a test machine that I have been playing around with in order to learn more before attempting to deploy production machines. On my test machine I have carved up my physical disks into logical drives of varying sizes. One of those logical drives in 2,047GB. In VMware (ESXi 4.1.0) I created a datastore using all the space on this drive (8MB block size). I then created a VM with a virtual disk size of 2,000GB. In this VM I installed a very basic CentOS 5.5 server. That is as far as I have gotten. There are no files, applications, etc on the VM. Just the OS. The total size of the CentOS file system is approximately 2.6GB. My vmdk file is approximately 260GB. Why is my vmdk file 100 times larger than the guest machines file system?

Thanks!

Tags (2)
0 Kudos
3 Replies
jgaddi
VMware Employee
VMware Employee

The vmdk size is what you assign to it when you create the VM. If you really want to shrink the vmdks and preserve the current OS, check out http://kb.vmware.com/kb/1002019

0 Kudos
cornelius10
Contributor
Contributor

jgaddi,

Thanks for the response! I forgot to mention in my original post that when I created this VM I set the virtual disk size to 2,000GB with Thin provisioning. I could understand a large vmdk if I had used thick provisioning, but I don't understand why there is such a large difference between the guest file system size and the size of the vmdk in a thin provisioned VM. I have created other VM's on this machine using the same methods and the vmdk has always been very close to the actual VM file system size.

Also, thanks for the link, but it tells me I am not authorized to view the document.

0 Kudos
jgaddi
VMware Employee
VMware Employee

if you run diskfrag or e2fsck, then all the blocks will be written and vmdk disk size will grow. even if actual OS usage is small. that's one possibllity.

0 Kudos