Folks, this blog and others were not hacked. This was part of a fun VMworld "unofficial" marketing/viral video for the upcoming VMware Code Hackathon taking part in VMworld Barcelona. Hopefully you will give the video a watch, we think you will get a nice laugh out of it.
How to tell if an ESXi host is a VSAN Witness Virtual Appliance programmatically?
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.
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
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.
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.
How to tell if your vCenter Server Appliance (VCSA) was migrated from a Windows vCenter Server?
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.
- « Previous Page
- 1
- …
- 311
- 312
- 313
- 314
- 315
- …
- 567
- Next Page »