I am having trouble with the attached script. I am trying to migrate a VM from a shared LUN into vSphere 4.0 which can have up to 8 hard disks. What I am seeing is that disk 1 - 3 seem to work fine but it always puts disk 4 on the wrong LUN (OS LUN) but reports that it will put it on a DATA LUN. Any help would be much appreciated as I seem to be stuck.
E4F
I think that this line
elseif($dataDiskId -ne $null -and $dataDiskId3 -ne $null) {
should be
elseif($dataDiskId -ne $null -and $dataDiskId3 -ne $null -and $dataDiskId4 -eq $null) {
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I got it fixed by using IF statements.
Thanks