VMware Cloud Community
Moif_Murphy
Enthusiast
Enthusiast

Resource Pool - Resource Allocation - Storage IOPS

Hi,

I'm looking for a PowerCLI script that will pull the Storage information from the Resource Pool - Resource Allocation - Storage view. There's a column called 'Limit - IOPS' that I'm interested in. I did come across Limit - IOPS values and using powercli to control limit disk iops with the latter seeming to be related to the VM level. I'm looking to pull the report at the Resource Pool level and not actually make any changes.

0 Kudos
3 Replies
LucD
Leadership
Leadership

That Limit - IOPs column is per VM and per Hard disk afaik.

There is no summary, like there is for CPU and memory, for a resourcepool for IOPS.

Or am I looking at the wrong page ?

We could pull a report, and calculate an average per VM/per Hard disk.

But the default is Unlimited, that would make it hard to calculate an average.

An another alternative could be to only list the Hard Disk that do not have Unlimited.


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

0 Kudos
Moif_Murphy
Enthusiast
Enthusiast

I think we're talking about the same thing Smiley Happy

That Storage view will list the VMs in the resourcepool and the Name, Disk, Datastore, Limit - IOPs, Shares, Shares Value and Datastore % Shares. So let's say we have two tiers of storage, one is set to unlimited and the other is set to 200. I'm seeing both in that column:

pastedImage_1.png

I need to be able to pull this view. If it includes the VMs then that's fine as well.

0 Kudos
LucD
Leadership
Leadership

Try like this, it should produce a similar table

$clusterName = 'MyCluster'

$cluster = Get-Cluster -Name $clusterName

foreach($rp in Get-ResourcePool -Location $cluster){

    foreach($vm in Get-VM -Location $rp){

        $vm.ExtensionData.Config.Hardware.Device |

        where{$_ -is [VMware.Vim.VirtualDisk]} |

        Select @{N='Cluster';E={$cluster.Name}},

            @{N='ResourcePool';E={$rp.Name}},

            @{N='VM';E={$vm.Name}},

            @{N='Hard Disk';E={$_.DeviceInfo.Label}},

            @{N='Datastore';E={Get-View -Id $_.Backing.Datastore -Property Name | Select -ExpandProperty Name}},

            @{N='IOPS Limit';E={if($_.StorageIOAllocation.Limit -eq -1){'Unlimited'}else{$_.StorageIOAllocation.Limit}}}

    }

}


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

0 Kudos