VMC Sizer Workload Usage Collection
A PowerCLI script to help collect VM workload usage for a specific vSphere Cluster to assist with using the VMware Cloud on AWS Sizer Tool.
Prereq:
- PowerCLI 10.x or greater
- vCenter Server ReadOnly Account
Usage:
Step 1 - Source the PowerCLI function
. ./VMCWorkloadUsageCollector.ps1
Step 2 - Connect to your vCenter Server
Connect-VIServer -Server <VCENTER>
Step 3 - Run the following function and specify the name of a vSphere Cluster
Get-WorkloadUsage -Cluster <CLUSTER>
Here is an example output:
### Cluster Summary ###
Name: Cluster-01
Total Host: 4
Total VM: 247
Total Storage (GB): 24439.8
VM to Host Ratio: 61.75
### CPU Summary ###
Total CPU Cores: 112
Total vCPUs: 334
Total PoweredOn vCPUs: 326
vCPU to Core Ratio: 2.91
CPU Overcommmitment (%): 191.07
### Memory Summary ###
Total Physical Memory (GB): 762.76
Total vMem (GB): 1272.5
Total PoweredOn vMEM (GB): 1246.5
vMem to Memory Ratio: 1.63
Memory Overcommitment (%): 63.42
### VM vCPU Summary ###
Min vCPU: 1
Max vCPU: 8
Avg vCPU: 1.36
### VM vMem (GB) Summary ###
Min vMem: 0.5
Max vMem: 24
Avg vMem: 5.22
### VM vDisk (GB) Summary ###
Min vDisk: 1.07
Max vDisk: 540
Avg vDisk: 102.26
There are two additional arguments to the function that can be used to filter out specific Virtual Machines:
Including specific VMs:
Get-WorkloadUsageAnalysis -Cluster <CLUSTER> -IncludeVMList @("VM-1","VM-2","VM-3")
Excluding specific VMs:
Get-WorkloadUsageAnalysis -Cluster <CLUSTER> -ExcludeVMList @("VM-4","VM-5")
PS C:\Users\william> Get-WorkloadUsageAnalysis -Cluster Cluster-01
### Cluster Summary ###
Name: Cluster-01
Total Host: 4
Total VM: 247
Total Storage (GB): 24439.8
VM to Host Ratio: 61.75
### CPU Summary ###
Total CPU Cores: 112
Total vCPUs: 334
Total PoweredOn vCPUs: 326
vCPU to Core Ratio: 2.91
CPU Overcommmitment (%): 191.07
### Memory Summary ###
Total Physical Memory (GB): 762.76
Total vMem (GB): 1272.5
Total PoweredOn vMEM (GB): 1246.5
vMem to Memory Ratio: 1.63
Memory Overcommitment (%): 63.42
### VM vCPU Summary ###
Min vCPU: 1
Max vCPU: 8
Avg vCPU: 1.36
### VM vMem (GB) Summary ###
Min vMem: 0.5
Max vMem: 24
Avg vMem: 5.22
### VM vDisk (GB) Summary ###
Min vDisk: 1.07
Max vDisk: 540
Avg vDisk: 102.26
Sign in to be able to add comments.