hi,
using powercli and Move-VM command I can read the VM name and datastore from csv file and migration works.
However all disks remain attached to vSAN default storage policy so I need to change this to Datastore default when I migrate.
How can I achieve this for these VMs? Some of them have multiple disks so need to make sure all disks gets moved to Default datastore policy
Thanks
Did you try like this?
$hd = Get-HardDisk -VM $vm
Get-SpbmEntityConfiguration -VM $vm | Set-SpbmEntityConfiguration -StoragePolicy "NewPolicy" -Confirm:$false
Get-SpbmEntityConfiguration -HardDisk $hd | Set-SpbmEntityConfiguration -StoragePolicy "NewPolicy" -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
sorry did not try it as as these were eventually migrated manually, took note of it however for future use.
Thanks