VMware Cloud Community
microkid
Hot Shot
Hot Shot

Thin provisioned disk moved to other datastore becomes thick provisioned?

I had to move a couple of VM's from one datastore to another because of a disk swap. After copying them back I noticed it took forever. What happened? The VM's had thin provisioned disks, and after being copied to the other datastore they were thick provisioned. So this only cost me must more time to copy, but it also wastes valuable disk space. I would like that thin provisioned disks stay thin provisioned also after copying.

Is this by design or is this a bug?

0 Kudos
26 Replies
crescendas
Enthusiast
Enthusiast

I notice that without vCenter, thin provisioning option won't even show up on paid version of ESX and ESXi Server. It has to be done thru the vCenter. Else you have to use the commandline to do this.

0 Kudos
BenAlcock
Contributor
Contributor

I can't believe this is still a problem 2 years later.  Running a clone using the following command;

vmkfstools -i /vmfs/volumes/datastore/RDSSVR/RDSSVR.vmdk /vmfs/volumes/RD1000/RDSSVR/RDSSVR.vmdk -d thin

Turns this THIN disk into a THICK one.

On the existing datastore (datastore) It is 100GB allocated but only 24GB used.

One the new datastore (RD1000), it appears as 100GB allocated and 100GB used.

Is there really no way to make this work?  I really want to use the CLI because I want to schedule this stuff in crom (as part of ghettoVCB).

0 Kudos
logiboy123
Expert
Expert

What is the block size on each datastore?

0 Kudos
BenAlcock
Contributor
Contributor

They are both set to 1MB and are both VMFS 3.46.

EDIT: Actually, seems to be working now.  I removed the datastore and re-added.

0 Kudos
Knaphie
Contributor
Contributor

Hi,

I use a cheat as follows....

Use the VM vCenter Converter Standalone http://downloads.vmware.com/d/ Install this on a windows PC etc and run from here.

Convert the target machine as though it's a physical machine and set the destination to wherever you require it to end up - i.e. on the new datastore of the ESXi system required. It can be the original ESXi server or indeed any other.

Set the converted machine's disks to Thin Provisioned and preconfigure the IP to a different IP to prevent a clash from the current machine. Leave the "converted machine" switched off when the conversion ends.

When the converstion is complete, the drives on the new machine will be Thin Provisoned. You can of course re-size on route as required.

Switch off the "live" machine when ready and "wake up" the newly converted machine.

Set it's IP to the original IP settings.

I find this "transfer" is faster and gets the desired results of a thin provisioned VM at the end. I've used it for WIndows VMs and Linux VMs.

Hope this helps.

0 Kudos
Simon_H
Enthusiast
Enthusiast

Well, this is certainly a tedious "feature". In my case I just wanted to upgrade a local disk in a lab server and copy the VMs over to a new one before removing the original. Some of my VMs are thin provisioned because they are virtual appliances and often the supplier insists on having large disks as they are sized for production usage (e.g. I've got some load balancers with 100GB disks that only use ~4GB). This has turned what I thought would be a simple job (cp/mv from the console, or a move from the vSphere Client data store browser) into a tedious job using vmkfstools -d thin Smiley Sad (unless I'm missing something - I don't have Storage vMotion).

0 Kudos
LinganV
Contributor
Contributor

I've used the following loads of times and it works

vmkfstools -i /vmfs/volumes/datastore/RDSSVR/RDSSVR.vmdk -d thin /vmfs/volumes/RD1000/RDSSVR/RDSSVR.vmdk


That works on SAN or local disk.


Have you checked in the databrowser to see how much disk space the new vmdk takes?

0 Kudos