WilliamLam.com

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

VSAN 6.2 extends vSphere API to include new VSAN Management APIs

02.26.2016 by William Lam // 7 Comments

In addition to all the new capabilities and enhancements included in the release of VSAN 6.2 (vSphere 6.0 Update 2) which you can read more about here and here; VSAN 6.2 also introduces a new VSAN Management API which extends the existing vSphere APIs that our customers are quite familiar with.

This new VSAN Management API will allow developers, partners and administrators to automate all aspects of VSAN functionality including: complete lifecycle (install, upgrade, patch), monitoring (including VSAN Observer capabilities), configuration and troubleshooting. There will be two new service endpoints /vsan for an ESXi host and /vsanHealth for vCenter Server respectively which will provide access to the new VSAN Management API interfaces.

UPDATE: (03/17/16) - Check out this article here on how to quickly get started with the new VSAN Management API.

Below are the list of new vSphere Managed Objects that provide the different VSAN capabilities:

Managed Object Functionality ESXi or VC
HostVsanHealthSystem VSAN Health related configuration and query APIs ESXi only
HostVsanSystem VSAN related configuration and query APIs ESXi only
VsanObjectSystem VSAN object related status query and storage policy setting APIs ESXi & VC
VsanPerformanceManager VSAN Performance related configuration and query APIs ESXi & VC
VsanSpaceReportSystem VSAN cluster space usage related query APIs VC only
VsanUpgradeSystem Used to perform and monitor VSAN on-disk format upgrades VC only
VsanUpgradeSystemEx VSAN upgrade and disk format conversion related APIs VC only
VsanVcClusterConfigSystem VSAN cluster configuration setting and query APIs VC only
VsanVcClusterHealthSystem VSAN Health related configuration and query APIs VC only
VsanVcDiskManagementSystem VSAN disks related configuration and query APIs VC only
VsanVcStretchedClusterSystem VSAN Stretched Cluster related configuration and query APIs VC only

Note: There will be a VSAN Management API Reference guide similar to the vSphere API Reference Guide which will be released as part of VSAN 6.2. There, you will find much greater detail on each of the new vSphere Managed Objects and their associated methods and usage.

For customers interested in consuming this new VSAN Management API, there will be initially five language specific bindings also known as an SDK (Software Development Kit) that will be available for download when VSAN 6.2 is generally available:

  • VSAN Management SDK for Python - Extends pyvmomi (vSphere SDK for Python)
  • VSAN Management SDK for Ruby - Extends rbvmomi (vSphere SDK for Ruby)
  • VSAN Management SDK for Java - Extends vSphere SDK for Java
  • VSAN Management SDK for C# - Extends vSphere SDK for C#
  • VSAN Management SDK for Perl - Extends vSphere SDK for Perl

Additional language bindings are being worked on and if you have any feedback on what you might like to see next, feel free to leave a comment.

Categories // Automation, ESXi, VSAN, vSphere 6.0 Tags // C#, java, pyVmomi, rbvmomi, Virtual SAN, vSphere 6.0 Update 2, vSphere API

New vSphere 6.0 API for configuring SMP-FT

02.04.2016 by William Lam // 1 Comment

Symmetric Multi-Processing Fault Tolerance (SMP-FT) is a new feature that was introduced in vSphere 6.0 which allows you to enable FT against a Virtual Machine with up to 4 vCPU. In addition to this new functionality, a new vSphere 6.0 API was also introduced to allow customers to easily manage this from an Automation standpoint. Previously, the CreateSecondaryVM_Task() vSphere API was used to enable Uni-Processing Fault Tolerance (UP-FT). With SMP-FT, there is a now a new vSphere API method called CreateSecondaryVMEx_Task() which supports a few additional parameters which is now required for enabling FT (UP-FT & SMP-FT) compared to the old "Legacy FT" mode.

smp-ft-vsphere-api

Disclaimer: The example script is meant to be used for educational purposes. Please ensure proper testing is done if you decide to use it for Production environments.

I have created a small PowerCLI script called Set-FT.ps1 which exercises this new vSphere 6.0 API and below are examples on how to turn on or off SMP-FT for a VM:
Turning On SMP-FT

Set-FT -vmname "SMP-VM" -Operation on -Datastore "vsanDatastore" -Vmhost "vesxi60-5.primp-industries.com"

Turning off SMP-FT

Set-FT -vmname "SMP-VM" -Operation off -Datastore "vsanDatastore" -Vmhost "vesxi60-5.primp-industries.com"

Categories // Automation, vSphere 6.0 Tags // fault tolerance, FT, PowerCLI, smp-ft, vSphere 6.0, vSphere API

vSphere SDK for JavaScript Fling released

02.03.2016 by William Lam // 2 Comments

The VMware Fling team has just released another cool new Fling, the vSphere SDK for JavaScript. This Fling is especially interesting as it provides the underlying SDK framework used by the popular ESXi Embedded Host Client Fling which was released back in August of last year. I came to learn about this project during last years internal R&D Innovation Offsite (RADIO) conference which is held annually and can be thought of as the VMworld conference for VMware employees.

One of the biggest highlight of the conference for me personally is checking out the expo floor where you get to see what other VMware Engineering teams have been working on whether it is the next big feature, product or new ideas that they might be thinking about. It was during my walk through that I met Rostislav Hristov, one of the Engineers who worked on the vSphere SDK for JavaScript. I was really impressed at what Rostislav built and luckily he was already in touch with the Embedded Host Client Engineers to see how they could leverage his JavaScript SDK as the initial prototype had made calls directly using the vSphere MOB which was not very friendly to develop against.

There has been a number of improvements to the vSphere SDK for JavaScript since I last saw it and although the name contains "vSphere", it definitely supports more than just the vSphere API endpoint. In fact, with this single SDK you can interact with vCenter Server Single Sign-On (SSO) API, vCloud Suite API which covers capabilities like Tagging and Content Library as well as the Site Recovery Manager (SRM) APIs! For customers and partners that are looking to develop their own web portals or interfaces that can integrate with these APIs, this will be a handy tool to have.

To get started, the vSphere SDK for JavaScript contains a README file that contains additional instructions on setting up the SDK as well as a couple of samples that demonstrates each of the supported API endpoints:

  • vimService.js - Sample using the vSphere API
  • stsService.js - Sample using the SSO API
  • cisServices.js - Sample using the vCloud Suite API
  • srmService.js - Sample using the SRM API

Here is the command to run the vimService.js sample which will also require you to set the environmental variable NODE_TLS_REJECT_UNAUTHORIZED=0 if you are using the default VMware self-signed SSL Certificate.

NODE_TLS_REJECT_UNAUTHORIZED=0 babel-node samples/vimService.js

vsphere-sdk-for-javascript-0
Once the sample has started up, you will be prompted with a URL to open in your browser. In the vimService.js example, you will be able to login to either a vCenter Server or ESXi host as seen in the screenshot below.

vsphere-sdk-for-javascript-1
Once logged in, you should see a simple listing of the different inventory objects in your vSphere enviornment.

vsphere-sdk-for-javascript-2
In the stsService.js sample, once logged in by specifying the address to your PSC/SSO instance, you should see that a SAML token was issued.

vsphere-sdk-for-javascript-3
The cisService.js sample exercises several operations using a mixture of both the vSphere API as well as the new vCloud Suite API. It does require connecting to a vCenter Server 6.0 environment as it will be performing operations using the new vSphere Content Library feature as well as some VM operations. Do not worry, once the operations have been completed, the script will automatically clean itself up. This is a great sample if you want to see how you could make use of the different APIs all through this single SDK.

vsphere-sdk-for-javascript-4-new
I did not have an SRM environment up and running to test the srmService.js sample, but you can see from the code that it will list all of the recovery plans and their current state. For more details on how the individual APIs work, you can refer to the documentation included in the vSphere SDK for JavaScript or the official API documentation for the individual products. If you have any feedback or comments about this Fling, please leave a comment on the Fling site here as I am sure the Engineers would love to hear what you think!

Categories // ESXi, vSphere Tags // embedded host client, fling, javascript, node.js, vSphere API, vSphere SDK

  • « Previous Page
  • 1
  • …
  • 14
  • 15
  • 16
  • 17
  • 18
  • …
  • 29
  • 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...