WilliamLam.com

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

Exploring VSAN APIs Part 1 - Enable VSAN Cluster

03.04.2014 by William Lam // Leave a Comment

A couple of weeks back I had provided an overview on some the most common VSAN operations and the specific vSphere APIs that were required to perform the operation. It was no surprise to me that there were some folks already interested in automating the management and consumption of VSAN, I know that was one of the first thing I thought about when playing with VSAN in my home lab.

The great thing about having an API is that it can be consumed in a variety of ways, you can use one of the vSphere SDKs supporting languages like Java, .NET, Perl and even PowerShell with the new VSAN specific cmdlets. I thought it might be useful to explore some of these APIs in greater detail and even provide some working sample scripts that can help others looking to automate VSAN. I know for myself, I learn best when I can see working examples.

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

VSAN is enabled at the vSphere Cluster level and just like you do today with vSphere HA/DRS, it is just a couple of clicks. To demonstrate the ability to enable, disable and to check current state of VSAN on a vSphere Cluster, I have created the following sample vSphere SDK for Perl script called vsanClusterManagement.pl

There is a vsanClusterConfigInfo property that is part of a vSphere Cluster (ComputeResource) that specifies whether VSAN is enabled and if it is configured to auto-claim or manual mode. To make changes to a vSphere Cluster, you will need to use the ReconfigureComputeResource_Task() method which is demonstrated in the sample script.

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

./vsanClusterManagement.pl --server vcenter55-1 --operation query --cluster VSAN-Cluster

vsan-cluster-mgmt-0
To enable VSAN, you can run the "enable" operation along with an optional --autoclaim option which defaults to enable for automatic claiming:

./vsanClusterManagement.pl --server vcenter55-1 --operation enable --cluster VSAN-Cluster

vsan-cluster-mgmt-1
If we re-run the query operation, you will now notice there is more information about the VSAN Cluster including VSAN Cluster UUID, the current claim mode and all the ESXi nodes in the cluster along with their VSAN NODE UUID.

vsan-cluster-mgmt-2
If login to your vSphere Web Client, we should see that VSAN has been successfully enabled just like you would if you were to manually perform the operation through the UI.

vsan-cluster-mgmt-3
If you decided to select "manual" instead of having VSAN automatically claim the SSD and HDD for you, then you will probably need to know which disks are eligible for VSAN. In Part 2 of this series, we will take a look a look at how we can identify available SSDs for use with VSAN.

  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

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

virtuallyGhetto gets a bit less ghetto ...

03.03.2014 by William Lam // 9 Comments

Please do not be alarmed with the new look, I promise the content will continue to stay technical and ghetto still 🙂

As some of you may have noticed, I finally took the plunge last Friday and migrated off of Google's Blogger platform and onto WordPress. I have actually been looking at an alternative platform for a couple of years now but never got beyond the research phase as it seemed like a daunting task. I decided to finally make the switch in 2014 and with the help from fellow blogger Ben Thomas, I was able to finally transition to WordPress after two weeks of tinkering around and testing. Do not get me wrong, Blogger is a great platform for anyone looking to quickly get started with blogging and it is very easy to use and best of all, it is free. When I first started virtuallyGhetto back in May of 2010 (wow, almost 4ys ago!), I chose Blogger for two simple reasons, it was easy to use and most importantly I could use a custom domain without paying additional fees.

At the time I really had no idea if this blogging thing would actually take off and whether people would care about the things that interests me. It took me almost another two years to decide if I wanted to start blogging and I really owe it to guys like Duncan Epping and Scott Lowe who convinced me to give this blogging thing a go. Over the years, Blogger has not changed too much and the platform had very small incremental enhancements here and there. I felt that it was really starting to fall behind other blogging platforms and was lacking in several areas, one of which was plugin extensions, which was much richer on other platforms. Another thing that really surprised me was how often the "search" functionality broke on my site; I am not sure how many readers actually noticed this. For a company that is the de-facto standard when it comes to search, I was quite shocked to see this happen on somewhat a frequent basis. It was usually faster and more efficient to search for something on Google than it was to search directly on my blog.

The lack of plugins and enhancements to the platform is what really motivated me to take a look at an alternative solution. Although WordPress was at the top of my list, I also took a look at some of the newer blogging platforms like Medium and Ghost. I decided to go with WordPress as it still has the largest community and these newer platforms were specifically aimed at users who just want to write. Their interfaces were very simplistic which is great for people who just want to write and not get bogged down by too many options but they were still too lacking from a plugin extension point of view that most bloggers expect today.

[Read more...]

Categories // Wordpress Tags // blogger, wordpress

Want a free VMware Fusion 6 Professional License?

03.02.2014 by William Lam //

fusion-6-pro-license Here is an exclusive for my Twitter followers! Last week I had the chance to catch up with Simon Bennett, Product Manager for both VMware Fusion & VMware Workstation and just chat about some random topics. Simon was kind enough to offer me seven free VMware Fusion 6 Professional license keys, each valued at $129 USD. I personally already had a copy of VMware Fusion which I use all the time on my iMac whenever I need to quickly spin up Virtual Machines. I thought I would extend this generous gift from Simon onto my Twitter followers, since several of you mentioned you would like one after I tweeted about the gift.

I had thought about giving it to the first seven followers that responded and realized that would have been unfair to folks who were not watching their Twitter stream at that very moment (which nobody does, least I do not). So, if you want a super easy way to win a free VMware Fusion 6 Professional license key, take a look below an please CAREFULLY READ all directions.

How to Win:

Leave a short comment on this post on what this VMware Fusion license key would enable you to do, whether that is solving a particular problem or challenge.In addition, what is the one feature that you are most excited about for new users or what new feature would you like to see for existing VMware Fusion customers. Simple, right? I will randomly select seven winners from the list of comments in one weeks time, so make sure you leave your Twitter handle in the post else you will not be eligible to win. This is open to everyone, you do not need to reside in the US to win.

How to Qualify:

  • You must be following me on Twitter, I am at @lamw
  • Must not be a VMware employee, I will check 🙂
  • Include your Twitter handle in the comment, that is how I will contact the winners

Winners:

@wozik
@mstone333
@davidahewett
@dkguru
@hippotech
@romankallen
@mralexandr0

Categories // Fusion Tags // apple, fusion, mac

  • « Previous Page
  • 1
  • …
  • 417
  • 418
  • 419
  • 420
  • 421
  • …
  • 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...