WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple
You are here: Home / VSAN / Exploring VSAN APIs Part 3 – Enable VSAN Traffic Type

Exploring VSAN APIs Part 3 – Enable VSAN Traffic Type

03.06.2014 by William Lam // Leave a Comment

In addition to having a minimum of one SSD and one HDD to contribute to the VSAN Cluster, an ESXi host must also have a VMkernel interface that is enabled for VSAN traffic. In the vSphere Web Client, this is done by going into each ESXi host and under the Networking section and editing the VMkernel adapter to allow for a particular traffic type.

vsan-traffic-type-0
From a vSphere API perspective, this operation is actually exposed at the vSphere Cluster level which took me by surprised since enabling the other types of VMkernel traffic type is done else where. You will need to use the ReconfigureComputeResource_Task() method and specify a list of ESXi hosts using spec->vsanHostConfigSpec->HostSystem and list of VMkernel adapters that you wish to enable VSAN traffic type on using spec->vsanHostConfigSpec->networkInfo->port->device. The neat thing about doing it at the cluster level is you only need to make a single API call versus having to go to each and every ESXi host. To demonstrate the above operation, I have created a vSphere SDK for Perl sample script called vsanHostTrafficTypeMgmt.pl

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

To check the current VSAN configuration for a given vSphere Cluster, you can run the “query” operation:

./vsanHostTrafficTypeMgmt.pl --server vcenter55-1.primp-industries.com --username root --cluster VSAN-Cluster --operation query

vsan-traffic-type-1
As you can see from the output above, there are no VMkernel adapters listed that have VSAN traffic type enabled.

To simplify the sample script, as part of the "enable" operation, I have added a --vihost option which requires you to specify a particular ESXi host in which you wish to enable VSAN traffic type. You will also need to provide the --vmk option to specify the list of VMkernel interfaces you wish to enable VSAN traffic type.

./vsanHostTrafficTypeMgmt.pl --server vcenter55-1.primp-industries.com --username root --cluster VSAN-Cluster --operation enable --vihost vesxi55-1.primp-industries.com --vmk vmk0

vsan-traffic-type-2
The "disable" operation is just the opposite of the enable, providing the same input of ESXi host and VMkernel interface.

We can now re-run our "query" operation and we should now see that all of our ESXi hosts have vmk0 enabled with VSAN traffic type:

vsan-traffic-type-3

  1. Exploring VSAN APIs Part 1 – Enable VSAN Cluster
  2. Exploring VSAN APIs Part 2 – Query available SSDs
  3. Exploring VSAN APIs Part 3 – Enable VSAN Traffic Type
  4. Exploring VSAN APIs Part 4 – VSAN Disk Mappings
  5. Exploring VSAN APIs Part 5 – VSAN Host Status
  6. Exploring VSAN APIs Part 6 – Modifying Virtual Machine VM Storage Policy
  7. Exploring VSAN APIs Part 7 – VSAN Datastore Folder Management
  8. Exploring VSAN APIs Part 8 – Maintenance Mode
  9. Exploring VSAN APIs Part 9 – VSAN Component count
  10. Exploring VSAN APIs Part 10 – VSAN Disk Health

More from my site

  • Extending VSAN capabilities in the vSphere Web Client using vCO
  • VSAN Flash/MD capacity reporting
  • Exploring VSAN APIs Part 6 – Modifying Virtual Machine VM Storage Policy
  • Exploring VSAN APIs Part 5 – VSAN Host Status
  • Exploring VSAN APIs Part 4 – VSAN Disk Mappings

Categories // VSAN, vSphere, vSphere 5.5 Tags // VSAN, vSphere 5.5, vSphere API

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

  • VCF 9.0 Hardware Considerations 05/30/2025
  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/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...