WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • 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 // 1 Comment

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 - New remote version of ESXCLI 8.x
  • Improved VM Storage Policy (Profile-driven storage) privileges in vSphere 8.x
  • USB Network Native Driver Fling for ESXi 8.0 Update 1
  • Quick Tip - How to deploy vCenter Server Appliance (VCSA) to legacy CPU without VMX Unrestricted Guest feature?
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS)

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

Comments

  1. Claus Nielsen says

    06/28/2023 at 10:25 pm

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

    Reply

Thanks for the comment!Cancel reply

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

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC) across Private, Hybrid and Public Cloud

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • ESXi on Lenovo ThinkStation P3 Ultra 09/29/2023
  • Quick Tip - vSphere 7.0 Update 3o also supports disabling/enabling vSphere Cluster Services (vCLS) in vSphere UI 09/29/2023
  • Heads Up - New image identifier required by VM Service in vSphere 8.0 Update 2 09/27/2023
  • How to setup private GitLab on a Synology for Project Keswick? 09/26/2023
  • ESXi on SimplyNUC Moonstone 09/25/2023

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 © 2023

 

Loading Comments...