I am looking for a way, if there is one, to copy a vm from one cluster to another thin provisioned via host to host cli without using vcenter.
I have root for all hosts
There is no shared storage between clusters
all hosts can communicate over 443/22/902
The below command copies the vm folder and contents from source to target datastore but ends up moving it thick provisioned.
scp -r /vmfs/volumes/Source_Cluster_Datastore/vm_folder root@Target_Host_FQDN:/vmfs/volumes/Target_Datastore/
The below command copies the file from source to target datastore folder but ends up moving it thick provisioned.
scp /vmfs/volumes/Source_Cluster_Datastore/vm_folder/file root@Target_Host_FQDN:/vmfs/volumes/Target_Datastore/folder/
I saw this link but I was unable to get vmkfstools
to copy between clusters.
Any help would be appreciated
Yes, vmkfstools wont work here.
1. What happens if you copy from "SCP"? Did you try to upload the files and register the VM?
2. Even if you dont have shared storage you can still do a XVmotion between the clusters, provided they have network connectivity between them.
Try either one of them and let us know.
Step 2 is safest and supported way.
Suggestion #2 is not going to work if you don't have vCenter
SCP command works fine except it goes across thick not thin. Even if the source is thin it moves across thick.
I don't have a stable enough vcenter which is the main reason we are doing CLI
"Thin provisioning" is a file system feature, and requires tools that are aware of this feature. Other tools will see the files as if they were thick provisioned.
What you can if vCenter Server features are not available, is to export/import the VM as an OVF. This will allow you to select the provisioning type on the target.
André
Almost forgot, you can also use "ovftool" to copy VMs directly from host to host.
see e.g. https://www.virtuallyghetto.com/2012/06/how-to-copy-vms-directly-between-esxi.html
André