jdittric
Contributor
Contributor

Trying to find out, which services are enabled for vmkernel

Hello,

 

I'm trying to find via the API the information (https://<vCenter>/mob/), which services are enabled for a specific vmkernel, but I can locate it.

Looking how this is done in the html ui, I see a call:

https://<vCenter>/ui/data/properties/urn:vmomi:HostSystem:host-33:xxx?properties=vnic:virtualAdaptersData

containing:

{"vnic:virtualAdaptersData":{"items":[{"device":"vmk0","connectedTo":"standardNetwork","networkLabel":"Management Network","virtualSwitch":"vSwitch0","firstIpAddress":"xx.xx.7.70","networkStackName":"Default","dvPortGroupVlanId":0,"isVmotionEnabled":false,"isFtEnabled":false,"isProvisioningNfcTrafficEnabled":true,"isManagementTrafficEnabled":true,"isVrTrafficEnabled":false,"isVrNfcTrafficEnabled":false,"isVsanEnabled":false,"isVsanWitnessTraficEnabled":false},{"device":"vmk1","connectedTo":"standardNetwork","networkLabel":"vMotion","virtualSwitch":"vSwitch0","firstIpAddress":"192.168.107.133","networkStackName":"Default","dvPortGroupVlanId":0,"isVmotionEnabled":true,"isFtEnabled":true,"isProvisioningNfcTrafficEnabled":false,"isManagementTrafficEnabled":false,"isVrTrafficEnabled":false,"isVrNfcTrafficEnabled":false,"isVsanEnabled":false,"isVsanWitnessTraficEnabled":false}],"hostFeatures":{"provider":{"serverGuid":"xxx","type":"HostSystem","value":"host-33"},"isVrTrafficSupported":true,"isVrNfcTrafficSupported":true,"isProvisioningNfcTrafficSupported":true,"isTcpIpStackSupported":true,"isVsanSupported":true},"isVsanWitnessTrafficSupported":true},"id":"urn:vmomi:HostSystem:host-33:xxx"}

How can I get this info via API? Can anyone point me in the right direction for the nomal API? I'm trying to display the info in JavaScript (vRO)

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

Hi,

I don't think there is a single vCenter API call to collect this information. I suppose the UI client is making multiple calls to various vCenter API to fetch host information (most of it probably from 'config' property of VcHostSystem object) + some custom code to compute the values of the various properties shown in the response data.

Another option you could try is to invoke this call (https://<vCenter>/ui/data/properties/urn:vmomi:HostSystem:host-33:xxx?properties=vnic:virtualAdaptersData), passing the correct host ID, using vRO HTTP-REST plug-in.

0 Kudos
jdittric
Contributor
Contributor

Hi iiliev,

yeah, I guess so to, but I would still like to get it to work via the API, but I don't even see, how I can interpret, that vSAN is running on a specific vmkernel or which one vmotion and provisioning is actually using.

0 Kudos