VMware Cloud Community
AliSarreshteh
Enthusiast
Enthusiast
Jump to solution

Can't use: -DiskStorageFormat EagerZeroedThick had to use Thick...anyway around this?

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Can you upgrade to PowerCLI 5.1 R2 ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
AliSarreshteh
Enthusiast
Enthusiast
Jump to solution

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?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos