I searched for few days to find the option to fetch "I/o imbalance" value set for sdrs cluster using powercli but didn't any options. Request your help.
Like this
Select Name,
@{N = 'IoLoadImbalanceThreshold'; E = {$_.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.PodConfig.IoLoadBalanceConfig.IoLoadImbalanceThreshold}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Could you explain what you mean by "IO imbalance value"?
Where do you see/set that value in for example the Web Client?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD for fast response. Please find the screenshot.
Configure --> Storage DRS --> Advanced Options --> I/O imbalance threshold
You can change that value like this
$newLoadImbalanceThreshold = 10
$dsc = Get-DatastoreCluster -Name $dscName
$si = Get-View ServiceInstance
$storMgr = Get-View -Id $si.Content.StorageResourceManager
$dsc.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.PodConfig.IoLoadBalanceConfig
$spec = New-Object VMware.Vim.StorageDrsConfigSpec
$spec.PodConfigSpec = New-Object VMware.Vim.StorageDrsPodConfigSpec
$spec.PodConfigSpec.IoLoadBalanceConfig = New-Object VMware.Vim.StorageDrsIoLoadBalanceConfig
$spec.PodConfigSpec.IoLoadBalanceConfig.IoLoadImbalanceThreshold = $newLoadImbalanceThreshold
$storMgr.ConfigureStorageDrsForPod($dsc.ExtensionData.MoRef,$spec,$true)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD. Your script is for to modify the value. I'm looking for to fetch the value. Which part I need to modify to achieve it?
Like this
Select Name,
@{N = 'IoLoadImbalanceThreshold'; E = {$_.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.PodConfig.IoLoadBalanceConfig.IoLoadImbalanceThreshold}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD. This worked. I did tried for this for many days and no where in internet this was available. You provided the solution in minutes. Thanks again.
This property is 5 layer down, so please guide me if any method you use to identify deeper properties.
Well, it's all documented in the API Reference (make sure you pick the correct version).
And there is a bit of guess work (and experience).
In this case I "guessed" that the property would be named something like "ioloadImbalanceThreshold".
On the web page (API Reference) you can search, which will point you to one or more hits.
Another option is the follow the path from the top.
In that case you would start from the StoragePod (which is the name of a DatastoreCluster in the API) object.
From there descend: podStorageDrsEntry - storageDrsConfig - podConfig - ioLoadBalanceConfig
A third method is to dump the complete object, redirect the output to a file and then do a search.
Remember we are looking at the API Properties, so we start from the ExtensionData property.
And you might have to play with the Depth parameter, depending on how deep the property is located.
$dsc.ExtensionData | Format-Custom -Depth 7 | Out-File -FilePath C:\Temp\out.txt
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference