Last week I received a question from a customer asking about configuring shares for a Virtual Machine’s virtual disk (VMDK) as well as setting the IOP limits for a virtual disk. An old script that I had written was shared with the customer to provide an example but they were interested in the functionality being provided through a vCenter Orchestrator (vCO) workflow instead.

Looking through what seems to be several hundred out of the box workflows created by VMware, the configuration of a Virtual Machine’s disk shares and IOP limits was not one of the available workflows. However, with a bit of knowledge of the vSphere API, it was not too difficult to create a custom workflow that would handle this use case and much of the code was already written from the script I wrote earlier. The only addition that I needed to add to the workflow was the configuration of the IOP limits.

Disclaimer: These script are provided for informational/educational purposes only.  It should be thoroughly tested before attempting to use in a production environment.

Download workflow: Set VM Disk Shares & IOP Limits

The workflow accepts four parameters:

  • Name of Virtual Machine
  • Hard Disk Number (as seen in the vSphere Web Client e.g. Hard Disk 1)
  • Share Value
  • IOP Limit Value (-1 for unlimited)

Here is a screenshot of filling in the parameters for the workflow:

Here is a screenshot of the workflow being executed and the log output can be seen below:

The other really cool thing which I am a huge fan of is the tight integration between vCO and the vSphere Web Client which allows you to bind any workflow you have created in vCO to a particular set of vSphere object(s). Here is a screenshot of adding this operation directly to a Virtual Machine object with just 1 click!

I am still amazed at the number of out of the box workflows that are available for both VMware solutions as well as third party solutions for administrators to start using immediately without any additional work. If you happen to stumble onto a workflow that does not exists such as the one mentioned here, the nice thing is you can easily create your own custom workflow!

Get notification of new blog postings and more by following lamw on Twitter:  @lamw

About the Author

William Lam

William Lam works as a Staff Engineer in VMware R&D and focuses Automation, Integration and Operations. William also runs a personal blog at Previous to VMware, he was a Systems Engineer managing large vSphere installations and UNIX/Linux systems.