ESXi 4.1 Thin to Thin Command line ?

Tsz109
Tsz109 used Ask the Experts™
on
I was told by the VMware guru here that you can do a Thin to Thin conversion on your VM's to get rid of the white space on the VMDK.
I see all over the place how to do thick to thin but not what he is talking about. Does anyone know about this?
We have 5 VM's, each is running close to 40 gigs but there is only about 10 gigs of space actually used on them after we install all of the software we need.
He told me to go look up the command line formula for doing this and I can't find it.

Thanks for any help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
If you have these in a cluster, you can always just use the vSphere client to migrate the datastore to a temporary location then migrate it back. The migration of a thin provisioned disk should shrink your vmdk too.
The only way I am aware to do it is to use the V2V conversion and that will allow you to shrink them in the process . Wave Dave is right about the storage Vmotion shrink. you may not have a SAN. if you dont then I would use VMware Converter and do a V2V conversion,.

another method I read about uses Sdelete (windows) or DD (linux). It seems this is a lot of work. The Vms are already thin provisioned. I would take comfort in that and call it a day. but here is a link you might find useful:

http://www.jules.fm/Logbook/files/shrink_vmdk_files_in_vmware_vsphere.html

Yea. in reviwing all the information available. it looks like the Sdelte is the way to go:

http://www.virtualizationteam.com/virtualization-vmware/vsphere-virtualization-vmware/vmware-esx-4-reclaiming-thin-provisioned-disk-unused-space.html

it looks like the VMWARE command line only compresses the file. I dont think thats what you want. you can defragment a VM with  vmware-vdiskmanager -d Ubuntu\ 8.04\ Desktop.vmdk.
The file is located at C:\Programme\VMware\VMware Server\vmware-vdiskmanager.exe

supposedly you can remove unneeded files with  apt-get clean

I hope this helps
L
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
So you have Thin Provisioned VMs, the Thin Provisoned disk is 40GB, you have only used 10GB inside the VM.

What does the Datastore browser state is currently in use and provisioned?

In the example screenshot, I've got a Windows XP Thin Provisioned VM, it also has a 40GB DIsk to the OS, but only 3GB is currently in use, in terms of data in the OS, and this is reflected currently in the datastore browser.

 thin disk
do you have something different, or mean something different?

Author

Commented:
No the provisioned size on them are all 80 gigs each but the "Size" are between 40-60gigs. But we know that within the opeorating system itself there are only 10-14 gigs of files.
When i export the OVF it comes out at 40-60 gigs not 10-14.
I have to go through a process of compression of pulling an image out, creating a new VM, putting it back in, then exporting the OVF back out to get it to come out at 10-14 gigs

We use these for deployment and the difference between 40-60 gig VMs and the difference between 10-14 gig vms is great when we are already running low on HD space.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
So your current size in datastore browser is 40-60 when the OS only has 10-14g in use?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
have you tried a clone to thin to a new datastore?

Author

Commented:
that is correct hancocka and no i haven't. because the "size on disk" is so much that we are already close to our datastore limit.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial