Hey there, I need to limit the iops of the disks connected to my virtual machines via powercli.
I am using the following command :
Get-VM 'vm_name' | Get-VMResourceConfiguration | Set-VMResourceconfiguration -configuration DiskResourceConfiguration -DiskLimitIOPerSecond 100
But this gives an error:
Set-VMResourceConfiguration : Cannot bind parameter 'Configuration'. Cannot convert the "DiskResourceConfiguration" value of type "System.String
" to type "VMware.VimAutomation.ViCore.Types.V1.VM.VMResourceConfiguration".
At line:1 char:86
+ Get-VM $vm | Get-VMResourceConfiguration | Set-VMResourceconfiguration -configuration <<<< DiskResourceConfiguration -DiskLimitIOPerSecond 10
0
+ CategoryInfo : InvalidArgument: (:) [Set-VMResourceConfiguration], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetVMResourceConfiguration
Can someone please suggest me, where am I going wrong ?