vSphere 4 and Thin Provisioning

I'm running vSphere 4 Update 1 on an HP Dl585 G5 with local storage. In vCenter i tried to take a power off VM and use he Migrate feature to chage the HD type from thick to thin. After the process completely sucessfuly the properties to the Vm still show the VM as THICK ??

What up wit this>
LVL 20
compdigit44Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bgoeringCommented:
You indicated that you are using local storage. Are you trying to migrate it to the same datastore? Or do you have multiple local datastores. Reason I ask is that I believe any migration to the same datastore doesn't actually do anything, yet it completes normally - that is my experience on 4.1 anyway.

What you can do if only a single local datastore exists is to clone the machine and specify thin format, then if you wish to keep the original name and folder structure you can delete the original then clone it back.

Good Luck
0
jlprasadreddyCommented:
Try this
To convert a thick format disk to a thin format disk, clone the virtual disk with the destination disk type set to thin.   To clone a disk and convert it to thin format, run this command from the Service Console or from the VMware Command-Line Interface:   vmkfstools -i <srcDisk> -d thin <dstDisk>
For example:
vmkfstools -i vDiskName.vmdk -d thin vDiskNameThin.vmdk
 http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013052
 
 JLP
0
Kevin_LeadbeaterCommented:
Note also that thin provisioned disks cannot exist on NFS volumes - a disk will always be fat there, even if you specify thin in the Storage VMotion or vmkfstools command line.

In case you are using ESXi, the command will need to be issued on the management server (where the CLI is installed), be aware you need to specify the server name as well:

# ./vmkfstools.pl --username root --password "" --server <ip> --diskformat thin --clonevirtualdisk /vmfs/volumes/local-storage/source/vm.vmdk /vmfs/volumes/iscsi-storage/target/vm.vmdk
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

First how you did this migration? From thick to thin? With vmkfstools?

Jail
0
compdigit44Author Commented:
ALl of my ESX server are using a local data source and I'm trying to migrate and change the VM's from thick to thin using the same source and desentation source
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

You to clone the disk; not migrate

Go to console and vmkfstools -i <srcDisk> -d thin <dstDisk>

Just clone to another disk(vmdk) that will use the thin option. This can be done to the same Storage.

Just go to the vfms volume and in the VM folder create the new disk with thin

Hope this can help

Jail
0
compdigit44Author Commented:
OK..
What will I gain by using thin provisioning?
Is there more I/O over head?
If I clone the disk, can I clone the vm to the same name on the same data store?
0
Kevin_LeadbeaterCommented:
"When a virtual machine is created, the thin-provisioned disk only consumes what’s needed. Then, the virtual disk grows over time when more storage space is required."

The vmfstools.pl script just clones the vmdk file.  So yes, you can clone to the same name on the same datastore, but you also need to copy the other files as well (using Browse on the datastores).  Once you have copied the files, remove the first VM from the inventory and add the second one - with the same name if you wish.  You can also rename the folders.  Then you have the same VM taking up a lot less disk space - depending on how much is used in the operating system.

Check here for videos
http://www.vmware.com/products/vstorage-thin-provisioning/

I can't find any definitive answer to the performance question, but writing to a fat disk (that is zeroed) will be marginally faster - so for best performance you'd be best sticking with a fat disk.
0
bgoeringCommented:
Thin provisioning gains you the ability to overcommit space on your datastore. You can run more vms, but you have to keep a good eye on the actual space utilization.

Any penalty you might pay is minimal, the default thick format reserves all the space, but when you go to write into new areas VMware writes zeros first to prepare the space, then allows the OS level write to go through. With thin provisioning the space is not reserved, but VMware incurs the same overhead of writeing the zeros before the OS write.

There is another way of provisioning disks called eagerzeroedthick (or someething like that) where VMware allocates all the space and writes the zeros when the disk is created, so you don't incur that tiny bit of overhead at run time when the space is written to.

Hope this helps
0
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

You are not cloning the VM but only the Virtual Disk and yes you can into the same Storage, but with different name. Regarding the VM clone, no the VM name must be different(the VM machine name i another issue) in the same Storage and also in the same ESX host or Virtual Center

Regarding gain by using thin or thick, have advantages and disadvantages. Depending on the type of server, APP, Database, File Server etc. But thin principal advantage is the space that can

Take a look at this

http://virtualgeek.typepad.com/virtual_geek/2009/04/thin-on-thin-where-should-you-do-thin-provisioning-vsphere-40-or-array-level.html

http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1348873,00.html

Hope this can help you

Jail
0
chkdsk01Commented:
Thin provisioning a disk will not incur a lot of additional overhead.  I try to thin provision most of my virtual disks.  The only problem I see a lot of admins running into is over allocating storage and then having problems down the road.  

Getting back to the issue, changing the provision type during the migrate should work.  Just a quick question, is this a standalone host or is this managed by vCenter?  If it is a standalone host, you should try using the VM converter.  Changing the provisioning type during migration utilizes the converter agent in vCenter.  If you don't have it, or it's not installed, the migration will work but the provisioning change won't.  If this is managed by vCenter, check to make sure the converter plugin is installed and enabled.

Just as a side note @Kevin Leadbeater, on NFS all disks are thin provisioned by default.  
0
compdigit44Author Commented:
Here is some additional information...
1) All of my vSphere servers are managed by vCenter
2) I do not see the I have Converter Standalone installed on other workstation but I do not see it installed on my vCenter server.
3) I rean Conver on a power off VM and changed the disk type from thick to thin with the source and destination ESX server being the same. ONce the clone completed, I removed the orginal VM and powered on my new one which listed the disk a thin provisioned yet I noticed by over all disk space on my ESX server stayed the same?? I also noticed when i removed the Vm from dsik I still see the old VM's folder and VMDK file present?

What's going on?
0
chkdsk01Commented:
When you removed the old VM, did you just remove it from inventory or remove it and delete it?  Also, you only see a benefit with thin provisioning when there is free space inside the VMs virtual hard disk.  If your 20 GB Data drive has 20 GB of data, the disk can be set thin all you want, but you won't see any size difference in the vmdk.  Can you confirm how large the vmdk file is, the capacity of the virtual disks, and the free space inside the guest OS.
0
compdigit44Author Commented:
My vm that I changed to thin was orgianlly slated to used 50GB but the OS was only using 25GB!!!
0
chkdsk01Commented:
And the vmdk file it is currently using is how large?  50 GB?
0
chkdsk01Commented:
Ok.  It just dawned on me.  Your disk was originally 50 GB.  Then you converted it to thin, but the conversion doesn't reclaim that empty space.  You need to reclaim the free space back.  Had you started with a thin disk you would notice the size difference right away.  
Check out this link http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1360516,00.html
0
compdigit44Author Commented:
ALso when I did the clone I did it with the Vm powered on should I do a cold clone in order for this to work properly....

Current VMDK file size when I SSH to the server is 50GB yet the vCenter GUIis shoing it only using 25???

I did get an error I I tried to remove the orginal VM stating the if other vm are reference this VM not all of the files will be deleted
0
compdigit44Author Commented:
The article you provide doesn't tell me what tools to use.
0
chkdsk01Commented:
You need to scroll down to the bottom to read the rest of the article.

Is this a test VM?  Also, take a look at the link I posted above.  I'm pretty sure this is the reason your seeing what you're seeing.  

Did you take a clone or a snapshot?  If this is a test VM, I would get rid of any clones, snapshots, and any other changes you made and go back to the original VM.  Reference the link I posted.  You can reclaim the free space by a storage vMotion or sDelete.  I havent used sDelete so I can vouch for its succesfullness.  But there's no harm in a storage vmotion.
0
compdigit44Author Commented:
I cannot read the article becuase I do not have a login to few the full article
0
bgoeringCommented:
The article pointed to the SDelete tool from Sysinternals. The Sysinternals (now part of Microsoft) tools are available from http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx.

Look into SDelete with the "-c" option.

The article also mentioned using the "Shrink" option in VMware Tools - but I am not sure if that even works in an ESX environment, though I have used it on both VMware Workstation and Server.

Good Luck

From the article:
"Using sdelete to reclaim space
The tool I used next is from Sysinternals called sdelete. To reclaim space on a Windows VMDK, download sdelete to the local hard disk. In my example, I used sdelete to clean the E: drive of the VM. Running sdelete with the following command will clear all lost space: "sdelete - c E:". Since this is a rather heavy I/O operation, you should plan this action very carefully in a production environment. Also note that after clearing, the blocks will really be empty. If a file is deleted by accident, it is almost impossible to use data recovery tools on that disk. So have good backups available before experimenting with this.

After sdelete has cleared your drive, vCenter will still show maximum disk usage, so the last step in reclaiming space is to use Storage VMotion. Since the disk is already in thin-provision format, you can choose the wizard to "Keep Disk Format" or "Change to Thin Provisioned Disk." Both options will now really free unused space. After the Storage VMotion has finished, you might have to press "Update storage usage" to force vCenter to recalculate storage usage, but after that, the VM will use far less storage then previously."
0
chkdsk01Commented:
Like I stated before.  You need to scrool all the way down the page to the very bottom.  I don't have an account either.
And @bqoering... yes, you're correct.  The shrink does not work in ESX.  
Also, a storage vMotion is supposed to do the trick too.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.