I have a free ESX4u1 with one small datastore.
I added a second larger disk disk and now want to copy the vmdks from the small datastore to the new ones.
How do I do this without changing thin vmdks to thick vmdks ?
___________________________________
VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay
Use storage vMotion to migrate them. You'll be given the option, at the "Disk Format" section of the wizard to select if you want to use thin provisioning, thick provisioning, or use the "Same format as source". If the vmdk files are already thin, then you can use either the same format option, or select thin again (won't do any harm selecting thin, just might take a little longer to vMotion). I've done this several times already, without any issue.
VCP4
I don't have storage vmotion or vcenter - I want to do it from commandline
___________________________________
VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay
vmkfstools?
Without vMotion you'll need to power the VM down. After that there are two (or more) methods that can be used:
Should be able to do this in PowerCLI using move-vm:
Get-VM $yourVM | Move-VM -Datastore $yourDatastore
You should also be able use the client, by removing from inventory, moving with the datastore browser, and finally adding back to inventory.
-Cody Bunch
vExpert, VCP
Are you sure ?
I tried to copy with the client but the results are thick
___________________________________
VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay
As written before, vmkfstools could be a solution:
http://communities.vmware.com/message/899630
But you have to enter in the hidden (and unsupported) console.
Andre
Ulli,
this is an interesting question.
To test this, I set up an ESXi with 2 datastores, datastore1 (1 MB block size, 40GB), datastore2 (2 MB block size, 20GB). Then I created a thin provisioned VM on datastore1 and copied/moved it to datastore2 using the datastore browser. The result was a thick provisioned disk. That confused me, because I was sure I did that before and the result was an exact copy.
To make a long (well, not really long) story short, there is a difference in copying a folder or just the files within that folder.
If you copy/move a folder to another datastore, the result is a thick provisioned disk. If you create an empty folder on the target datastore and cut & paste all the files from the source folder to the target folder you will end up with a 1:1 copy.
André
PS: The test was performed on an ESXi 4.0 running on VMware Workstation 7. However this should behave the same way as on physical hardware.
this is really bizzare
Have a look at the screenshot.
I created a new directory on a second datastore and then used the datastorebrowser copy and paste function.
The basedisk really is copied to thin vmdk but a small snapshot which was a few kb in the original now is 1.7 Gb .... weird
___________________________________
VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay
Hi,
maybe if you delete the snapshot before make the copy do the trick?
Regards/Saludos,
Pablo
Please consider awarding any helpful answer. Thanks!! - Por favor considera premiar las respuestas útiles. ¡¡Muchas gracias!!
that is not what I want.
I just want to know how to copy thin to thin without needing to prepare or change the VMs first
___________________________________
VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay
Ulli,
I agree, that's really weird.
Today I had some time to do some more tests on this issue.
Copying the snapshot vmdk resulted in the size of a consolidated vmdk (base + snapshot). So I deleted all files except for the snapshot vmdk (actually the two files which only show up as one file in the data browser). Trying to copy this file resulted in an error message.
I did a couple of other things which all resulted in the large snapshot file, until I finally found a way which seems to work.
First I created a folder on the target datastore and copied all files except for the snapshot vmdk to that new folder. At that point all of the copied files had the same size as the source. Then I created a new dummy folder on the source datastore and moved the snapshot vmdk to this folder (actually you could also delete all of the already copied files from the source folder to isolate the snapshot vmdk). Next I moved the folder containing the snapshot vmdk to the target datastore and finally I moved the snapshot vmdk to the folder containing the other files.
Well, at least in my opinion this is definitely not the way this should work, so it's up to you to try this with production vm's. Make sure you at least have a consistent backup before doing it.
Maybe a VMware employee comes around and gives dev a hint about this issue.
Good luck and keep your fingers crossed
André
I stumbled upon this thread while researching something similar. Figure I'll share as it seems semi-related to what you're seeing.
I have an ESXi 4 update 1 installation with a datastore (local) and a two thick VMDK files running VMs. I setup an NFS share and added it to ESXi and performed a copy of the VMDKs, and then pasted them to the NFS share.
Result? Thin disks.
I actually wanted to perform a Thin conversion eventually but hadn't gotten around to it yet. They boot fine. /shrug
This is by design. What you are seeing is the expected behavior for NFS.
see http://kb.vmware.com/kb/1005418 for details
André