If you have ever spent any time using the vSphere API, you probably have heard of or have used the vSphere Managed Objected Browser (MOB) which is an extremely useful learning and debugging tool when working with the vSphere API. The vSphere MOB is accessed through a web browser connecting to either vCenter Server or ESXi and provides a graphical interface, allowing you to discovery/explore the underlying vSphere API and its data in a very intuitive manner.
As an avid user of the VSAN Management API since its release, I have always wanted something similar, especially when I first got started. I was quite happy when I found out in vSphere 6.7 and VSAN 6.7, the VSAN team has added a VSAN MOB interface directly on ESXi, for the VSAN specific APIs that are available only on an ESXi host. Just like the vSphere MOB which is also available on ESXi host, it is disabled by default and must be enabled.
The following ESXCLI commands can be used to enable/disable the VSAN MOB on ESXi 6.7:
esxcli vsan debug mob start
esxcli vsan debug mob stop
However, when I tried to enable the VSAN MOB, I ran into the following error message:
hostname 'localhost.localdomain' doesn't match '192.168.30.10'
It turns out there is an issue where it fails to match the IP Address of the ESXi host to the default localhost.localdomain and hence it fails to start the VSAN MOB. This issue is fixed in the upcoming vSphere & VSAN 6.7 Update 1, but in the mean time, there is a workaround.
To enable/disable VSAN MOB, simply run the following command in the ESXi Shell (specify the IP Address of your ESXi host):
python /usr/lib/vmware/vsan/perfsvc/VsanMgmtCli.pyc -H 192.168.30.10 mob --start
python /usr/lib/vmware/vsan/perfsvc/VsanMgmtCli.pyc -H 192.168.30.10 mob --stop
You should see similar output as above stating that the VSAN MOB has been started. To access the VSAN MOB on ESXi, simply open a browser to following URL: https://<ESXi>/vsan/mob
In addition to the VSAN MOB fix for ESXi, the upcoming vSphere & VSAN 6.7 Update 1 release will also include the VSAN MOB for vCenter Server, which will give customers access to the rest of the VSAN Management API. Just like the VSAN MOB on ESXi, it will be disabled by default and you will be able to enable it using RVC.
The following RVC command can be used to enable/disable the VSAN MOB on VCSA 6.7:
vsan.debug.mob --start localhost
vsan.debug.mob --stop localhost
Lastly, you can programmatically enable the VSAN MOB on both vCenter Server and ESXi using the VSAN Management API by using the vanDebugSystem managed object which provides the following three methods:
- VsanQueryMobStatus()
- VsanStartMobService()
- VsanStopMobService()
For more VSAN Automation goodness, Alan Renouf and I recently presented at HCI2522BU Getting Started with vSAN Automation at VMworld US 2018. You can find the online recording here in case you missed it or was not able to attend VMworld. Happy Automating!
Christopher says
Is there any performance penalties by enabling this? If not, is there a reason why I wouldn't I like to always have it enabled?