WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple

How to tell if an ESXi host is a VSAN Witness Virtual Appliance programmatically?

09.26.2016 by William Lam // Leave a Comment

I had received this question awhile back but I was only able to get to it recently. If you are not familiar with the VSAN Witness Virtual Appliance and its purpose, Cormac Hogan did an excellent write-up on the topic which you can find it here.

how-to-tell-if-esxi-is-vsan-witness-vm-0
The reason this question came up was that if you were to simply iterate over all ESXi hosts within your vSphere Inventory from an Automation standpoint, you might find a mix of regular ESXi hosts and potentially this new VSAN Witness Virtual Appliance which is basically an ESXi host that runs in a VM (e.g. Nested ESXi). Although, it may look and feel like a regular ESXi host, it is not and the question was how might you go about distinguishing between the two? You can of course setup specific naming standards, folder structure or separate datacenter objects, but you still may accidentally retrieve a VSAN Witness host without even realizing it.

One quick solution is to check for a specific ESXi Advanced Setting called Misc.vsanWitnessVirtualAppliance which will return a value of 1 if it is the VSAN Witness Appliance. Here is a quick PowerCLI snippet which demonstrates how you can access this property:

$vmhost = Get-VMHost -Name 192.168.1.115
Get-AdvancedSetting -Entity $vmhost -Name Misc.vsanWitnessVirtualAppliance

how-to-tell-if-esxi-is-vsan-witness-vm-1
Although the method described above is one quick way to easily identify whether an ESXi host is a VSAN Witness Appliance, it is also limited in the information that it provides you. Another approach is to actually use the new VSAN 6.2 Management API and specifically the Stretched Clustering System APIs to retrieve the associated VSAN Witness host for a given VSAN Cluster. Not only will you get more information about the specific ESXi host providing the VSAN Witness functionality which will allow you to correlate back to your vSphere Inventory, but you will also get additional VSAN Witness configuration such as the preferred Fault Domain, Node UUID and the VSAN Cluster that it is associated with for example.

Here is a quick VSAN Management SDK for Python sample script that I had created called vsan-stretched-cluster-system-sample.py which implements the VSANVcGetWitnessHosts() API method. The script prints out a few of the WitnessHostInfo properties as shown in the screenshot below.

how-to-tell-if-esxi-is-vsan-witness-vm-2
One other option is if you simply just want to know if a given ESXI host is a VSAN Witness host or not, there is also the VSANVcIsWitnessHost() API that simply returns a boolean value. This might useful if you just have a list of ESXi hosts retrieved through the vSphere API and no knowledge of the underlying VSAN Clusters.

Categories // Automation, ESXi, PowerCLI, VSAN Tags // Misc.vsanWitnessVirtualAppliance, PowerCLI, Virtual SAN, VSAN, vSphere API, witness

How to tell if your vCenter Server Appliance (VCSA) was migrated from a Windows vCenter Server?

09.19.2016 by William Lam // 2 Comments

In case you had not heard, last week VMware had officially released the VCSA Migration Tool which is included in the new vSphere 6.0 Update 2m release. Customers can now easily migrate from a Windows based vCenter Server over to the vCenter Server Appliance (VCSA) all while preserving their existing vCenter Server configurations and integrations. For more details, I highly recommend you check out all the links and resources here related to the VCSA Migration Tool.

One interesting question that came up over the weekend from a troubleshooting standpoint was how do you tell if your VCSA was migrated from a Windows vCenter Server? Besides remembering 😉 there is actually a pretty simple way to check by looking at the install parameters as I have previously written about here. To do so, you will need to SSH to your VCSA and enable the Bash Shell first. Once that has been done, go ahead and run the following command:

install-parameter upgrade.source.platform

If your VCSA was migrated from a Windows based vCenter Server using the new VCSA Migration Tool, you should see a value of windows. If you do not get any results, then it means the VCSA was not migrated and it was freshly deployed as an appliance.

In addition, you can also check whether or not you had migrated over the original vCenter Server's Stats, Events and Tasks (SET) data. To do so, run the following command:

install-parameter upgrade.user.options

You should get back a value of either yes or no for migrating over the SET data.

Lastly, if your VCSA was migrated from a Windows based vCenter Server, you can even tell if the migration was done so using the UI or CLI. To do so, run the following command:

install-parameter upgrade.silent

You should get back a value of either True for a CLI-based migration or False for a UI-based migration.

Here is a quick screenshot of running the three commands on a VCSA that was migrated.
how-to-check-if-vcsa-was-migrated-from-windows

Categories // Automation, VCSA Tags // install-parameter, migrate2vcsa, migration, vcenter server appliance, VCSA, vcva

Few #migrate2vcsa VMworld sessions & HOL worth checking out

09.09.2016 by William Lam // 4 Comments

One thing that I had noticed at VMworld last week was that there was a lot of excitement and buzz coming from our customers/partners around migrating from a Windows based vCenter Server to the vCenter Server Appliance (VCSA). I am pretty sure it had nothing to do with the awesome #migrate2vcsa stickers that my buddy Emad had created.

migrate2vcsa-sticker
or the killer #migrate2vcsa apparel ...

#migrate2vcsa represent w/ @DuncanYB @lamw @alanrenouf #VMworld pic.twitter.com/vsnikHp1Cg

— Emad Younis (@emad_younis) September 2, 2016

In all seriousness, I do think our customers are genuinely excited about this upcoming migration capability and the value of the VCSA over the Windows vCenter Server. This is especially true for simplified lifecycle management from deployment (Day 0), configuration (Day 1), patching and upgrade (Day 2) of the VCSA. Customers not only benefit from the operational aspect of the VCSA, but it also allows them to reduce their overall Windows licensing footprint for both the vCenter Server as well as the backend database which is usually a Microsoft SQL Server or an Oracle Database. I do understand that this is not the goal of all customers, but I also know of many customers who do appreciate this additional CapEx savings.

At VMworld this year, there was a ton of coverage across a variety of topics for the VCSA including Migration, Deployment, Management, Operations and most dearest to my heart, Automation which spans all of these areas. I thought it would be useful to share some of the content in the form of publicly available VMworld sessions that you can view regardless if you attended VMworld or not. I know many of you have been asking about the VCSA Migration Tool and all I can say is check out the resources below and stay tune for an update real soon 😀

#migrate2vcsa Sessions:

  • INF9044 - Journey to the vCenter Server Appliance: A Migration Story
  • INF8260 - Automated Deployment and Configuration of the vCenter Server Appliance

#migrate2vcsa HOL (simulation):

I just found out about this, but it looks like our Hands-On-Labs folks also built a nice VCSA Migration simulation HOL (http://docs.hol.vmware.com/hol-isim/HOL-2017/hol-1710-vcsamigration.htm) that you can try out which gives you a sneak peak at a Tech Preview of the VCSA Migration Tool. You simply follow the instructions to the right and it walks you through the simulation and highlighting what you need to perform via the orange colored icon. I thought this was a very neat solution for folks to get an idea of how something works without having to sit through hours of content. migrate2vcsa-hol

Lastly, here are some of the general vCenter Server / VCSA sessions that are also worth checking out.

General VCSA Sessions:

  • INF9047 - Managing vSphere 6.0 Deployments and Upgrades
  • INF8225 - The vCenter Server and Platform Services Controller Guide to the Galaxy
  • INF9083 - Ask the vCenter Server Experts Panel
  • INF9128 - Day 2 Operations: A vCenter Server Administrator's Diary
  • INF8108 - Extreme Performance Series: vCenter Performance Deep Dive
  • INF9144 - Through the Looking Glass: An Overview of the vCenter Server Appliance Management Interface and API
  • INF9089 - Managing vCenter Server at Scale? Here's What You Need to Know
  • INF9944R - What's New with vCenter Server

Categories // Automation, VCSA, VMworld Tags // migrate2vcsa, vcenter server appliance, VCSA, vcva, vmworld

  • « Previous Page
  • 1
  • …
  • 159
  • 160
  • 161
  • 162
  • 163
  • …
  • 224
  • 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

  • Automating the vSAN Data Migration Pre-check using vSAN API 06/04/2025
  • 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

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...