WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple

Translating vSAN VM Object IDs (UUID to VM and VM to UUID)

11.21.2017 by William Lam // 2 Comments

I was working on one of my vSAN Clusters a few weeks back and I had noticed a bunch of vSAN Objects being listed under the "Other" category within the vSAN Virtual Objects Health view as shown in the screenshot below.


I could not figure out what files or VMs these vSAN objects were actually associated to and it was especially strange since all VMs that were deployed on my vSAN Cluster were already properly showing up under this view and I could not account for these "Other" vSAN Objects. I had reached out to a few folks to see if anyone knew how to identify these objects and the only suggestion I had received back was try to run this python vSAN Health Status script located on one of the ESXi hosts participating in the vSAN Cluster to see if it provided what I needed.

The script is located at /usr/lib/vmware/vsan/bin/vsan-health-status.pyc and you run it like the following:

python /usr/lib/vmware/vsan/bin/vsan-health-status.pyc > /tmp/output

The above command just runs the script and stores its output (which is quite extensive) to /tmp/output. Once the script finishes, you can then open up the file using vi and search for the specific vSAN Object UUID in question. I was able to eventually identify what these vSAN Object UUIDs were mapped to (more on this later), but the overall experience was not ideal and it required SSH access to ESXi host which most customers disable by default. In addition, the process was pretty manual and tedious if you wanted to check multiple vSAN Object UUIDs.

So what did I do, well I looked for a better way of course! It turns out the output produced by vsan-health-status.pyc is actually all available using the vSAN Management API. Not only can you obtain this information programmatically and remotely but you can also retrieve this information by simply going to vCenter Server rather than having to directly connect to an ESXI host which was huge negative for me regarding the previous solution.

[Read more...]

Categories // Automation, PowerCLI, VSAN Tags // api, PowerCLI, Virtual SAN, VSAN, vsan-health-status.pyc

Cool Docker Container for VMware Utilities

02.17.2015 by William Lam // 11 Comments

Last week during lunch I learned about a cool little project that my colleague Alan Renouf was working on in his spare time at night. He was interested in learning more about Docker and thought the best way to learn about something new was by using it, which is normally how I learn as well. He came up with a nifty idea to create a Docker Image that would house a bunch of useful VMware tools which included several VMware open source projects as well.

UPDATE (11/23/16) - The Docker Container has now been updated with all the latest vSphere 6.5 SDK/CLI/Tools. We also plan to make this new version of the Docker Image available on Docker Hub, so stay tuned for those details shortly.

Some customers in the past have built similar offerings by using a free VMware Appliance called vMA (vSphere Management Assistance). vMA is nothing more than a stripped down version of SLES that has the vSphere CLI (vCLI) pre-installed. In my opinion, vMA is pretty limited and you can not install additional packages without voiding official support. Even if you decide to ignore support and install custom packages, I have often seen this break existing dependencies. When I talk to customers about their use of vMA, most used it because it was just there, but the majority prefer to use their own harden distribution of Linux and install their own admin utilities and packages which may also include non-VMware tools.

I personally have no problem building my own VM appliance that contains the various VMware packages, utilities and scripts that I use on a daily basis. However, not everyone is comfortable with this idea. Wow could this be further simplified and automated? Well, enter vmware-utils a Docker Image that allows you to automatically build a new image that contains some of the most popular and widely used VMware Utilities.

I wanted to enhance the awesome work that Alan had done with couple more VMware open source tools that I thought might be useful to VMware Administrators, which I actually wrote about here in my List of VMware CLIs, SDKS and DevOps Tools article. I have already submitted a pull request for my changes here. If there are other tools or packages you think that are useful and wish to contribute back, feel free to clone the repository and submit a pull request!

The latest vmware-utils now contains the following:

  • vSphere CLI 6.5
  • PowerCLI Core 1.0
  • vSphere Management SDK 6.5
  • vSphere SDK for Perl 6.5
  • vSphere SDK for Ruby (rbvmomi)
  • vSphere SDK for Python (pyvmomi)
  • vSphere Automation SDK for Ruby 6.5
  • vSphere Automation SDK for Python 6.5
  • vSphere Automation SDK for Perl 6.5
  • vSphere Automation SDK for Java 6.5
  • VSAN Management SDK for Ruby 6.5
  • VSAN Management SDK for Python 6.5
  • VSAN Management SDK for Java 6.5
  • VSAN Management SDK for Perl 6.5
  • Virtual Disk Development Kit (VDDK) 6.5
  • OVFTool 4.2
  • PowerCLI Community Repository
  • PowerCLI Core Docker Container Samples
  • William Lam's vGhetto Script Repository
  • Pyvmomi Community Samples
  • Docker Client v1.12.3
  • Docker Compose v1.8.1

For those of you who are new to Docker, a great way to quickly get started is by using an awesome tool called boot2docker which allows you to run Docker Containers on either a Windows or Mac OS X system. This also helps remove any barriers if you do not want to setup a Linux machine to get Docker of if you are like me, running on Mac OS X and rather not have to spin up a VM just to use Docker. Below are the steps on getting boot2docker working and building your own vmware-utils Docker Image.

Step 1 - Download the Docker Client for your specific OS (Windows, Linux or Mac OS X)

Step 2 - Take a look at the vmware-utils README, I spent some time updating it to make it more consumable for new users of Docker and follow the "How" section which will have you download the 4 VMware utilities as well as the vmware-utils DockerFile which we will need to build the Docker Container.

Step 3 - Create a directory and place all files into that directory. In this example, I have called the directory "vmware-utils".

vmware-utils-docker-container-0
Step 3 - We are now ready to build our vmware-utils Docker Image. Change into the "vmware-utils" directory that contains the files you downloaded earlier we will need to specify a "tag" for our image as part of the build command. In this example, I have called my image "lamw/vmware-utils" and to start the build process run the following command:

docker build -t lamw/vmware-utils .

Step 4 - The build itself may take some time depending on the speed of your internet connection. You will know when it has successfully completed when it states "Successfully built X" where X will be some unique ID as seen in the screenshot below.

vmware-utils-docker-container-4
Step 5 - Once the Docker Image has finished building, you can then run and connect to the Container by running the following command:

docker run --rm -it lamw/vmware-utils

vmware-utils-docker-container-5
At this point, you are now logged into the vmware-utils Docker Container that you have just built! It contains all the VMware Utilities that I have listed earlier and for more details on what has been installed and the location of the utilities, take a look at the vmware-utils Github documentation. If there are other tools you would like to see, feel free to contribute back by cloning the repository and submitting a pull request. I am definitely looking forward to seeing how this project evolves and providing a more dynamic way of creating a vMA-like experience without the current limitations. Keep up the awesome work Alan!

Categories // Automation, Docker, vRealize Suite, vSphere Tags // api, boot2docker, container, DevOps, Docker, dockerfile, vcloud air, vma, vSphere API

List of VMware CLIs, SDKs & DevOps Tools

01.05.2015 by William Lam // 1 Comment

A frequent question that I get asked from customers and new developers that are looking to get started with VMware Automation is what CLIs (command-line interfaces) or SDKs (programing/scripting specific languages) are available for them to use? I know it is not always easy to find out what is available on the VMware.com website and some times I even have trouble browsing for all the right information as it is located in many different places. I figure it would be helpful not only for myself but also for others if I put together a list of the various VMware CLIs, SDKs and even some of the new DevOps Tools that VMware has been working on that are available to our customers/developers and partners. I have also included a couple of community tools that I think are pretty interesting. If there are others that you think I should add to the list, feel free and leave a comment.

Note: This is by no means a comprehensive list of every single VMware product/toolkit as there are many many more, including gated SDKs specifically for our partner eco-system. For more details on those API/SDKs, be sure to check out the VMware Developer Center.

UPDATE (4/20) - VMware now has an Open Source page on Github http://vmware.github.io/

VMware Cloud Native Apps:

  • VMware Photon
  • VMware Lightwave

VMware DevOps Tools:

  • VMware Docker Machine
  • VMware boot2docker
  • Packer vmware-ovf post processor
  • open-vmdk
  • Vagrant plugin for Photon

vCloud Air:

  • CLIs
    • RaaS (Recovery as a Service) CLI
    • vCloud Air CLI
  • SDKs
    • vCloud Air SDK for Go
    • vCloud Air SDK for Python
  • DevOps Tools
    • Vagrant vCloud Air Provider

vCloud Director:

  • CLIs
    • vCloud Director Tenant and Provider PowerCLI
  • SDKs
    • vCloud Director SDK for .NET
    • vCloud Director SDK for Java
    • vCloud Director SDK for PHP
  • DevOps Tools
    • Vagrant vCloud Director Provider

vSphere:

  • CLIs
    • govc CLI
    • vSphere CLI
    • vSphere PowerCLI
    • vSphere RVC CLI
    • vSphere ovftool CLI
    • vSphere PVC CLI
  • SDKs
    • vSphere SDK for .NET
    • vSphere SDK for Go (govmomi)
    • vSphere SDK for Java
    • vSphere SDK for Perl
    • vSphere SDK for Python (pyvmomi)
    • vSphere SDK for Ruby (rbvmomi)
    • vSphere SDK for JavaScript
    • VSAN Management SDK for .NET
    • VSAN Management SDK for Java
    • VSAN Management SDK for Python
    • VSAN Management SDK for Ruby
  • DevOps Tools
    • VMware Library Puppet Module
    • VMware vCNS Puppet Module
    • VMware vCenter Server Appliance Puppet Module
    • VMware vCenter Server Puppet Module
    • Vagrant Rbvmomi Provider
    • Vagrant vCenter Server Provider

vRealize Management Suite:

  • CLIs
    • vRealize Cloud Client CLI
    • vRealize Automation Center CLI
  • SDKs
    • vRealize Automation SDK for Java
    • vReazlie Orchestrator Plug-In SDK

VMware Community Tools:

  • Vagrant vCenter Simulator Provider
  • Docker Plugin for VMware vRealize Orchestrator
  • VMware VIX API in Go
  • vcloud-tools

Categories // Automation, Cloud Native, vCloud Air, vRealize Suite, vSphere Tags // api, cli, DevOps, Docker, Packer, sdk, Vagrant

  • 1
  • 2
  • 3
  • …
  • 12
  • Next Page »

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

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 © 2023

 

Loading Comments...