Hi there,
Playing around in the vSphere APIs, specifically under the a Hosts config.vsanHostConfig path.
Here is some background
Looking in the MOB at the HostSystems config path
Now, I would expect all hosts to have a value of unset, since no configuration has ever gone on for vSAN. Why are there mixed values?
I believe all hosts should have their value for the vsanHostConfig object under Host\config should be unset if there is no configuration and that this is a bug in vSphere. Anyone else seen this?
Message was edited by: Paul E Davey
Ohhhh, I just noticed you're connected to the vCenter Server MOB. OK, this makes sense now. The behavior you're seeing is expected and there's no issues with the API.
ha-host property is a MoReF which basically points back to the ESXi host you've traverse and you would normally need get a "View" into that MoRef, an example using the Perl SDK:
$esxView = Vim::get_view(mo_ref => $vsanSystem->config->ha-host)
In the MOB, it's unable to perform this operation so you'll just get a blank page. The MOB is mainly to help you visualize the API, but you should not be using it for any type of programmatic access/parsing. You should be using the SDK's to do so and once you get a "View" into that object, then you'll be given back the HostSystem for the ESXi host.
Hi Paul,
If you're referring to HostSystem->configManager->vsanSystem->config then this property should always be set based on the vSphere API documentation http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.host.VsanSyst...
For HostSystem->configManager->vsanSystem->config->enabled the vSphere API documentation mentions this need not be set http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.vsan.host.Con... however, I've always seen this to be the case in as you can see in the screenshot below.
Regarding getting 404 on "ha-host" property, this should just link back to your HostSystem (aka ESXi host you're looking at in the vSphere MOB) https://mini/mob/?moid=ha-host I'm not sure why you're setting a 404, but when I click on the link it takes me back to what I expect. It's possible there might be an issue on the host that's causing this, however it's hard to say with what's been provided so far.
I'll ping a few folks to see if they can chime in but if you have VMware SnS, I would highly recommend you file an SR w/VMware GSS to look into this further and track it, it does seem a bit strange you're getting different results for the different hosts. I've built couple dozen VSAN environments with varying hardware both physical and virtual and have never seen this problem, so wondering if it's particular to your environment or there's something going on in these hosts causing this weirdness.
Hi William,
Thanks for the comments. FYI, I have attached a screenshot. This is from a 5.5 host that is a new build. As you can see the value for enabled is False, however, I don't see the (hostname) like in your screenshot next to the Ha-Host entry (mini.primp....).
Has your host at any point been connected to a vSan that would have caused the entry that you see?
Ohhhh, I just noticed you're connected to the vCenter Server MOB. OK, this makes sense now. The behavior you're seeing is expected and there's no issues with the API.
ha-host property is a MoReF which basically points back to the ESXi host you've traverse and you would normally need get a "View" into that MoRef, an example using the Perl SDK:
$esxView = Vim::get_view(mo_ref => $vsanSystem->config->ha-host)
In the MOB, it's unable to perform this operation so you'll just get a blank page. The MOB is mainly to help you visualize the API, but you should not be using it for any type of programmatic access/parsing. You should be using the SDK's to do so and once you get a "View" into that object, then you'll be given back the HostSystem for the ESXi host.
Thanks William, that actually makes sense now!
Cheers for the help.
Paul