Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232869

Re: using powercli to control limit disk iops

$
0
0

Just checked again, and there seems to be indeed a problem with the DiskLimitIOPerSecond parameter

Try it like this

 

$vmName="MyVM"
$DiskLimitIOPerSecond
=50
# $DiskLimitIOPerSecond = -1 # Unlimited
$vm=Get-VM-Name$vmName$spec=New-ObjectVMware.Vim.VirtualMachineConfigSpec$vm.ExtensionData.Config.Hardware.Device|
where {$_-is [VMware.Vim.VirtualDisk]} |%$dev=New-ObjectVMware.Vim.VirtualDeviceConfigSpec
  $dev.Operation="edit"
  $dev.Device=$_
 
$dev.Device.StorageIOAllocation.Limit=$DiskLimitIOPerSecond
 
$spec.DeviceChange+=$dev
}
$vm.ExtensionData.ReconfigVM_Task($spec)

 

Note: to set the limit back to unlimited, you have to give the value -1


Viewing all articles
Browse latest Browse all 232869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>