I want to copy large vmdk between datastores.
$DatastoreSource = Get-Datastore -VmHost $VMHost | Where{ $_.Name -like "snap-$VmfsLabel" }
$DatastoreDestination = Get-Datastore -VmHost $VMHost | Where{ $_.Name -like "VM_test" }
New-PSDrive -Location $DatastoreSource -Name dssource -PSProvider VimDatastore -Root "\"
New-PSDrive -Location $DatastoreDestination -Name dsdestination -PSProvider VimDatastore -Root "\"
#VM HDD copy
Copy-DatastoreItem -Item dssource:\VM_test\VM_test_2.vmdk -Destination dsdestination:\VM_test-new\DB_HDD\VM_test_2.vmdk
The size of the vmdk is 80GB, but in the destination only 61kb.
if i use:
Copy-DatastoreItem -Item dssource:\VM_test\*.* -Destination dsdestination:\VM_test-new\DB_HDD\
All item will copy successfully with the full size.
What is the problem to copy one item?