Someone from the field asked me how to do this in a workflow. I am putting it here for everyone's benefit.
Here is the workflow code to list all the virtual servers under an ESX host. This workflow takes the host ID of the ESX server as an input
AllV MsUn derA nESX (in hostid) LocaleInsensitive array serverIDs = DCMQ uery (/Ho stPl atfo rm[@ id=$ host id]/ Virt ualS erve r) var counter = 1 foreach serverID in serverIDs do var serverName = DCMQ uery (/Se rver [@id =$se rver ID]/ @nam e) var statID = DCMQ uery (/Se rver [@id =$se rver ID]/ @ope rati onal Stat us) var statString = DCMQ uery (/op erat iona lSta te[@ id=$ stat ID]/ @des crip tion ) log info counter + ": " + serverName + " : " + statString counter = Jython[int(counter) + 1] done
Note: All information in this entry may
not be 100% accurate, though I
try to keep this most accurate as per my knowledge. Standard disclaimer