WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Script - Automate VAAI Configurations in vSphere 4.1 (vaaiHWAccelerationMgmt.pl)

07.13.2010 by William Lam // Leave a Comment

With the release of vSphere 4.1, we finally get to see the first revision of the vStorage API for Array Integration (VAAI) features. This initial release provides the following SCSI driver primitives with VAAI supported storage arrays:

  • Write Same/Zero - Eliminating redundant and repetitive write commands, tells array to repeat via SCSI commands.
  • Full Fast/Copy - Leverage array to mass copy, snapshot and move blocks via SCSI commands.
  • Atomic Set and Test - Stop locking LUNs and start locking blocks.
  • Thin Provisioning Stun - Reporting array TP state to ESX.

The above definitions were taken off of an EMC presentation found here. VMware has also published a new VMware KB article regarding VAAI FAQ, take a look here at KB1021976.

Though these features are not specific to any one storage array vendor, the vendors themselves are required to implement these primitives within their array OS software for them to be available. If all prerequisites are met, and you have an ESX or ESXi host running on vSphere 4.1 and VAAI supported storage array, these new storage operations will now offload to the array versus running within the VMkernel.

However, if you do not have an array that supports VAAI, the new version of ESX and ESXi will still try to use these features. As I understand from an earlier discussion of VAAI, there is one additional operation that is performed and it's impact is supposed to be insignificant (please correct me if I'm wrong). Though if you would like to disable these VAAI features or would like to see the difference between a non-VAAI and VAAI operation, it is controlled with the following three advanced host configurations.

VMFS3.HardwareAcceleratedLocking - Atomic Test and Set
DataMover.HardwareAcceleratedMove - Full/Fast Copy
DataMover.HardwareAcceleratedInit - Write Same

By default, all three of these configurations are enabled with a default installation of vSphere 4.1. The following vSphere SDK for Perl script allows a user to enable or disable VAAI configuration on a set of hosts defined in an input file. The script allows you to connect to vCenter if your hosts are being managed by vCenter or directly to a specific ESX or ESXi host and provide the following parameters:

--hostlist = Lists of ESX(i) hosts to perform operation _IF_ they're being managed by vCenter (default is ALL hosts in vCenter)

--operation = Operation to perform (query|enable|disable)

Download: vaaiHWAccelerationMgmt.pl

Here is an example of the host input file:

[vi-admin@makalu scripts]$ cat hosts
esxi4-2.primp-industries.com
esxi4-3.primp-industries.com

Here is an example of querying for VAAI configurations:

Here is an example of disabling VAAI configurations:

Here is an example of disabling VAAI configurations:

For more information about vStorage APIs, take a look here.

Categories // Uncategorized Tags // api, sdk, vaai, vSphere 4.1, vsphere sdk for perl, vstorage api, vstorage api for array intergration

How to unregister vCenter plugin/extension using the MOB

07.09.2010 by William Lam // 20 Comments

I saw a post on the VMTN forums the other day about unregistering a vCenter plugin. The user had a bad installation of an early preview of NetApp's VSC utility. After uninstalling the plugin, the user was still unable to unlink the plugin from vCenter. There is actually a pretty simple solution to this problem which can be accomplished by using the vSphere MOB.

UPDATE (10/16/22) - As of vSphere 8, you can now easily unregister vCenter plugins within the vSphere UI. Select the specific plugin and then click on remove button.

Here are the instructions to remove a specific plugin/extension from your vCenter server:

1. Point your web browser to your vCenter server: https://your_vc_server/mob and login.

2. Click on content:

3. Locate and click on ExtensionManager:

4. Click on the plugin you are interested in removing:

5. Record the plugin key id which will be used to remove the plugin:

6. Now, go back to previous page and at the bottom click on the function "UnregisterExtension". A new window will open and ask for the plugin key id which was recorded from above. Enter the key and click on the "Invoke Method" to remove the plugin

You can now refresh the page and you will see that the plugin is no longer available. You can restart your vSphere Client to see that the plugin has now been removed.

The following operation can also be performed using a script, here is a vSphere SDK for Perl script that does just that: pluginExtensionManager.pl

Categories // Career, vSphere, vSphere Web Client Tags // Managed Object Browser, mob, plugin, vCenter Server, vsphere client, vSphere MOB

Script - Configure VM Disk Shares (vmDiskSharesMgmt.pl)

07.07.2010 by William Lam // 3 Comments

I recently received an email about automating the configuration of VM disk shares. I thought it was an interesting request since I do not know how many people actually make use of this feature. By default, the shares on a virtual disk is set to "normal" or 1000 shares. You can change the value between low (500), normal (1000), high (2000) or a custom value. The following script helps a user to perform a bulk update across multiple VMs and supports multiple virtual disks.

Download: vmDiskSharesMgmt.pl

The script requires that you connect to your vCenter server and provide the following input parameters:

--diskshares_file = Is the name of the diskshares input file that contains the names of the VMs, the hard disks and their corresponding shares value which can be (low, normal, high or custom)

Here is an example of the diskshares input file:

[vi-admin@scofield ~]$ cat diskshares.txt
# [VMNAME];[HDX,SHARES_VALUE]=[HDY,SHARES_VALUE]=[HDZ,SHARES_VALUES]
#
# SHARES_VALUE = low, normal, high, XXXX (custom)
#
# e.g.
# myvm;hd1,low=hd2,high=hd3=2001
#
Synapse;hd1,high
Imager;hd1,low=hd2,1500=hd3,2500=hd4,high
William-XP;hd1,3000

In the above example, we have the following VMs and configurations to be set:

Synapse
Hard Disk1 = high (2000)

Imager
Hard Disk1 = low (500)
Hard Disk2 = 1500
Hard Disk3 = 2500
Hard Disk4 = high (2000)

William-XP
Hard Disk1 = 3000

Here is an example execution:

Here we verify one of the VMs "Imager" and it's configured disk shares:

Hopefully you will find this script to be useful

Categories // Automation Tags // perl, sdk, shares

  • « Previous Page
  • 1
  • …
  • 550
  • 551
  • 552
  • 553
  • 554
  • …
  • 560
  • Next Page »

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...