Hi LucD, I think I have this pretty close to working properly, I have one more quick question. So the goal is to as you know login to an entire cluster and change thrree parameters on a spe...
See more...
Hi LucD, I think I have this pretty close to working properly, I have one more quick question. So the goal is to as you know login to an entire cluster and change thrree parameters on a specified set of LUNs on all hosts in that cluster. based on our previous threads , heres what I have... my question is now that we have specified the exact LUNS, what do I put in the "naa.00xxxxxxxxxxx" values for the esxcli.nmp values ? is it going to be "$luns" below is the code I think will encompass everything. how does it look ? Connect-VIServer-Server MyVsphereServer -User User1 -Password Password1 foreach($esx in Get-Cluster ProductionCluster02 | Get-VMHost) { Connect-VIServer -Server $esx.Name -User <esx-user> -Password <esx-pswd> $esxcli = Get-EsxCli -Server $esx.Name $luns = "naa.600xxxxxxxxxxxxxxxx0000","naa.600xxxxxxxxxxxxxxxx0001","naa.600xxxxxxxxxxxxxxxx0002", "naa.600xxxxxxxxxxxxxxxx0003","naa.600xxxxxxxxxxxxxxxx0004","naa.600xxxxxxxxxxxxxxxx0005", "naa.600xxxxxxxxxxxxxxxx0006","naa.600xxxxxxxxxxxxxxxx0007","naa.600xxxxxxxxxxxxxxxx0008", "naa.600xxxxxxxxxxxxxxxx0009","naa.600xxxxxxxxxxxxxxxx0010" Connect-VIServer -Server ESXSERVER01 -User root -Password Password01 $esxcli = Get-EsxCli $luns | %{ esxcli.nmp.device.setpolicy($null,$_, "VMW_PSP_RR") esxcli.nmp.device.setpolicy($null,"naa.00xxxxxxxxxxxxxxx", "VMW_PSP_RR") esxcli.nmp.roundrobin.setconfig($null,"naa.00xxxxxxxxxxxxxxx",1,"iops",$null) Disconnect-VIServer $esx.Name .........Since we are calling the luns above, what do I put in for the "Naa's" would it look like this ? Connect-VIServer-Server MyVsphereServer -User User1 -Password Password1 foreach($esx in Get-Cluster ProductionCluster02 | Get-VMHost) { Connect-VIServer -Server $esx.Name -User <esx-user> -Password <esx-pswd> $esxcli = Get-EsxCli -Server $esx.Name $luns = "naa.600xxxxxxxxxxxxxxxx0000","naa.600xxxxxxxxxxxxxxxx0001","naa.600xxxxxxxxxxxxxxxx0002", "naa.600xxxxxxxxxxxxxxxx0003","naa.600xxxxxxxxxxxxxxxx0004","naa.600xxxxxxxxxxxxxxxx0005", "naa.600xxxxxxxxxxxxxxxx0006","naa.600xxxxxxxxxxxxxxxx0007","naa.600xxxxxxxxxxxxxxxx0008", "naa.600xxxxxxxxxxxxxxxx0009","naa.600xxxxxxxxxxxxxxxx0010" Connect-VIServer -Server ESXSERVER01 -User root -Password Password01 $esxcli = Get-EsxCli $luns | %{ esxcli.nmp.device.setpolicy($null,$_, "VMW_PSP_RR") esxcli.nmp.device.setpolicy($null,"$luns", "VMW_PSP_RR") esxcli.nmp.roundrobin.setconfig($null,"$luns",1,"iops",$null) Disconnect-VIServer $esx.Name