WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / vSphere UI behavior change for VM Disk I/O Shares & Limits in vSphere 8.x

vSphere UI behavior change for VM Disk I/O Shares & Limits in vSphere 8.x

06.27.2023 by William Lam // 3 Comments

If you use the vSphere UI to configure individual virtual disk I/O shares or limits for a Virtual Machine, it looks like this functionality has been removed in vSphere 8.x in favor of using VM Storage Policies, which has been around for almost a decade now.

Prior to vSphere 8.x, you could configure both disk shares and limits on an individual VMDK as shown in this screenshot below for a vSphere 7.x environment:


While this capability can be useful, it does come with some operational overhead of having to configure each and every virtual disk that has such a requirement and can certainly be error prone. Fortunately, this problem of defining various storage requirements and attributes for a VM and its virtual disks has already been solved with Storage Policy Based Management (SPBM) and the use of VM Storage Policies.

As early as vSphere 6.5, Storage Policy Components can be used to define both encryption and Storage I/O Control (SIOC) requirements


which can then be consumed when constructing a VM Storage Policy by enabling host based services and then selecting the specific storage policy component profile.


While VM Storage Policy is the preferred way to manage these SIOC requirements on a per-VMDK basis, it looks like the underlying vSphere API for managing these configurations can still be used in vSphere 8.x for those interested in managing this outside of VM Storage Policies, especially for unmanaged ESXi hosts without vCenter Server.

If you have an unmanaged ESXi host, the ESXi Host Client can be used to configure both shares and limits for a specific virtual disk. If the ESXi host is managed, then these settings can not be modified without going through vCenter Server.

If you still wish to manage the SIOC configurations on an VM basis, you can use the StorageIOAllocationInfo vSphere API property on a virtual disk is and here is a quick PowerCLI snippet that demonstrates using the vSphere API to configure a limit for a virtual disk with the label "Hard disk 2" as an example.

$vmName = "Tanzu-Sources-for-Knative-VM-Test"
$vmDiskName = "Hard disk 2"
$diskLimit = 1000

### DO NOT EDIT BEYOND HERE ###

$vm = Get-VM $vmName
$disk = ($vm | Get-HardDisk) | where {$_.Name -eq $vmDiskName}

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.DeviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec[] (1)
$spec.DeviceChange[0] = New-Object VMware.Vim.VirtualDeviceConfigSpec
$spec.DeviceChange[0].Device = $disk.ExtensionData
$spec.DeviceChange[0].Device.Key = $disk.ExtensionData.key
$spec.DeviceChange[0].Device.UnitNumber = $disk.ExtensionData.UnitNumber
$spec.DeviceChange[0].Device.ControllerKey = $disk.ExtensionData.ControllerKey
$spec.DeviceChange[0].Device.Backing = $disk.ExtensionData.Backing
$spec.DeviceChange[0].Device.StorageIOAllocation = $disk.ExtensionData.StorageIOAllocation
$spec.DeviceChange[0].Device.StorageIOAllocation.Limit = $diskLimit
$spec.DeviceChange[0].Operation = 'edit'
# Required in vSphere 8.0 Update 1 and later
if($global:DefaultVIServer.ExtensionData.Content.About.Version -gt "8.0.0") {
    $spec.VirtualNuma = New-Object VMware.Vim.VirtualMachineVirtualNuma
}
$vm.ExtensionData.ReconfigVM_Task($spec)

Here screenshot of the output after running the following snippet:


We can then verify that limit has been set for the specific virtual disk by now running the following command:

(Get-VM $vmName | Get-HardDisk | where {$_.Name -eq $vmDiskName}).ExtensionData.StorageIOAllocation.Limit

Here screenshot of the output after running the following command:

More from my site

  • Quick Tip - vCenter Server Advanced Settings Reference
  • Downgrading new VMware vSphere Foundation (VVF) or VMware Cloud Foundation (VCF) licenses to 7.x
  • Updating handshakeTimeoutMs setting for ESXi 7.x & 8.x using configstorecli
  • Identifying vSphere with Tanzu Managed VMs
  • Quick Tip - New remote version of ESXCLI 8.x

Categories // Automation, PowerCLI, vSphere 8.0 Tags // limit, shares, sioc, vSphere 8.0

Comments

  1. *protectedClaus Nielsen says

    06/28/2023 at 10:25 pm

    Nice, but will the feature also be there in the next version?

    Reply
  2. *protectedDavid Pasek says

    06/27/2024 at 5:36 am

    Hi William,
    first of all, thanks for very valuable information and PowerCLI snippet.

    Now the question ... do you know or can you ask product management or engineering if vSphere API property StorageIOAllocationInfo will stay in the future versions of vSphere and mclock scheduler I/O limits will work? We are IaaS cloud provider providing VMs with vDisks and we are billing by disk capacity and performance (GB/IOPS). We are developing our own Cloud Management Platform which sets VM IOPS limits (mclock scheduler limits) to each particular vDisk based on disk capacity as we know GB/IOPS ratio. Therefore, VM IOPS limit is very important feature for as. We use it almost 13 years. Unfortunately, SPBM IOPS limits (I/O Filter limits) are not scalable for us because at the moment every vDisk can have different limit and we cannot imagine we would create Storage policy for each vDisk in vCenter inventory.

    In vSphere 7 Update 3 Release notes is following statement

    Deprecation of Shares and Limit – IOPS fields in the virtual machine Edit Settings dialog: Starting from vCenter Server 7.0 Update 3, the use of Shares and Limit – IOPS fields in the virtual machine Edit Settings dialog is deprecated, because all I/O settings are only defined by using a storage policy. In a future vSphere release, the two fields are planned to be removed from the virtual machine Edit Settings dialog.

    The statement is only about GUI (Edit Settings dialog) and not about API.

    On the other hand, when I read KB Article 313242 at
    https://knowledge.broadcom.com/external/article/313242/changing-an-existing-inputoutput-operati.html
    it seems to me that there can be some problems with mclock scheduler IOPS limits which might be the reason to remove vDisk IOPS limit from GUI.

    If there are some problems with I/O limiting in mclock scheduler, setting vDisk (mclock) IOPS limits via API would not be the right solution for the future.

    Any answer is highly appreciated.

    Reply
    • *protectedAlexey says

      12/17/2024 at 12:13 pm

      +1, this is madness to remove feature which is mandatory for Service Providers.

      Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...