Can't use: -DiskStorageFormat EagerZeroedThick had to use Thick...anyway around this?
Get-PowerCLIVersion
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.0.1 build 581491
#Load PowerCLI module in PowerShell
Add-PSSnapin VMware.VimAutomation.Core
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -Confirm:$False
#Initialize
$vCenterHost = "test.vcenter.com"
$user = "id-goes-here"
$password = "password-here"
#Connect to VCenter server
Connect-Viserver $vCenterHost -user $user -password $password
$vms = Import-CSV ImportVMs.csv
foreach ($vm in $vms){
Get-VM $vm.Name | Move-VM -Datastore $vm.TargetDatastore -DiskStorageFormat EagerZeroedThick
write-host $vm.name $vm.TargetDatastore
Start-Sleep -s 30
}
#Disconnect the VCenter server
Disconnect-VIServer $vCenterHost -Confirm:$False
That is correct.
If you want to convert specific vmdk to other disk formats, you will have to revert to the RelocateVM_Task method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you upgrade to PowerCLI 5.1 R2 ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That took care of it, thanks.
Just a quick question, this process:
Get-VM $vm.Name | Move-VM -Datastore $vm.TargetDatastore -DiskStorageFormat EagerZeroedThick
will migrate ALL the disks associated with the VM being migrated using this format: "EagerZeroedThick".
Is that correct?
That is correct.
If you want to convert specific vmdk to other disk formats, you will have to revert to the RelocateVM_Task method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference