1 Comment

My colleague Venky Deshpande recently published an article about the new VDS Network Health Check feature which was introduced in the new vSphere 5.1 release. Venky provides an in-dept look on how this new feature works and I highly recommend you give it a read if you have not heard of this cool new feature. In his article, he also mentions that the VDS Health Check interval is configurable and I will show you how to do this using the vSphere API to automate the VDS Network Health Check configurations.

The default health check interval for both the VLAN/MTU and NIC Teaming setting is one minute. If you wish to change the default interval or specify a different interval for each setting, you can use the UpdateDVSHealthCheckConfig_Task method which applies to a Distributed Virtual Switch. You would also use this method if you want to enable or disable the health check feature. To demonstrate both of these configurations, I have written a simple vSphere SDK for Perl script called using this API.

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

The script supports two types of operation: query which allows you to check the current settings of a specific VDS and update which allows you to update the settings for either the VLAN/MTU and/or NIC Teaming setting. You will need to connect to a vCenter Server 5.1 to be able to use this script and specify the operation you wish to run and the name of the VDS using the –vds parameter.

To perform the query operation on a VDS called VDS-01, we would run the following:

./ –server vcenter51 –username root –operation query –vds VDS-01

Here is a screenshot running the query operation:

We can see from the screenshot above, the health check feature is currently disabled for both VLAN/MTU and NIC Teaming settings for our VDS. We can also see the default check interval is set to one minute. Let’s go ahead and enable the health check and change the default for VLAN/MTU setting to five minutes and NIC Teaming setting to ten minutes.

To enable or disable, there is the –vlanmtu and —teaming parameter which accepts a value of either true or false. To set the interval for VLAN/MTU, there is –vlanmtuinterval and to set the interval for NIC Teaming there is the –teaminginterval parameter.

To perform the update operation on a VDS called VDS-01 and enable the above mentioned, we would run the following:

./ –server vcenter51 –username root –operation update –vds VDS-01 –vlanmtu true –vlanmtuinterval 5 –teaming true –teaminginterval 10

Here is a screenshot of the update operation:

If you are interested in a PowerCLI solution, Raphael Schitz (famous for his one-liners) has also created a simple PowerCLI one-liner to modify the health check configurations and you can find more details on his blog here.

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

About the Author

William Lam

William Lam is currently a Staff Solutions Architect in the VMware Cloud on AWS team within the Cloud Platform Business Unit (CPBU) at VMware. He primarily focus on Automation, Integration and Operation of our Software Defined Datacenter (SDDC). One of his core responsibilities is driving VMC’s Customer[0] initiative and help provide early feedback on the usability, design and architecture of new VMC features and capabilities. He works closely with Engineering & Product Management on developing new ideas and integrations for VMC. Lastly, through customer interactions and feedback he continues to help champion their challenges and needs to help further improve our products and services.