« Back to Technical Discussions

UCS and vCenter - how are the host correlated

Combination View Flat View Tree View
Threads [ Previous | Next ]
I am trying to figure out how to correlate host from UCS into a host on vCenter programmatically.

Are UUID and name of the service profile mapped into vCenter vmWare API. Specifically
(1)    Is the service profile name of a server in UCS mapped to hostname property of HostInfo on vCenter ?
(2)    Is UUID of service profile on UCS mapped to the UUID of ESX host on vCenter ?

From: Dipti Joshi [mailto:djoshi@infovista.com]
Sent: Tuesday, August 17, 2010 2:24 PM

To: Pramod Borkar (prborkar)
Subject: RE: UCS and vCenter question
What about UUID  ? Does the UUId from UCS Service Profile mapped as UUID of the ESX host on vCenter ?
 
Dipti
 
From: Pramod Borkar (prborkar) [mailto:prborkar@cisco.com]
Sent: Tuesday, August 17, 2010 4:21 PM
To: Dipti Joshi
Subject: RE: UCS and vCenter question
 
I don¿t think there is a mapping from service profile name in UCS to vCenter . The only mapping we do with vCenter is port profiles ? So when you create port profiles in UCS (assuming vCenter plugin is installed and such) you can automatically see the port profiles a.ka port group in vcenter and can assign the same to the VMS.  Hope that explains a little bit.

Using mac-address we can correlate the blade server and host in the vCenter.
 
Apart from this option is ther eany way to correlate which blade server is mapped to which host in the vCenter ?
 
Regards,
Raghu

If you are using HBA's the WWN's would be another way.
From the VC DB:
select e.name, wwn.node_wwn, wwn.port_wwn from vpx_wwn wwn, vpx_entity e where wwn.entity_id = e.id
It's in the DB so you should be able to grab it via API.

If you use DPM via the IPMI policy you could derive that way as well (that is manual though). MAC or WWN is probably best, although that will map to service profile and not directly to the blade but probably gets what you are looking for.

Actually UUID is usable as well...

vCenter DB:
select dns_name, uuid_bios from vpx_host

Again sorry don't have the API calls handy on how to get it, but the data is there...

Actually UUID is usable as well...

vCenter DB:
select dns_name, uuid_bios from vpx_host

Again sorry don't have the API calls handy on how to get it, but the data is there...

 
Use the PowerCLI for VMWare, using the Get-VMHost cmdlet you can get the hosts UUID and then using the UCS API (write your our powershell script) call configResolveClass find the server that has that uuid. Use the abstract class computeItem to search both blade and rack mount servers.
 
<configResolveClass cookie="1305039450/b322bd20-3a35-4ee7-a2ae-da429bc5edf1" inHierarchical="false" classId="computeItem">
  <inFilter><eq class="computeItem" property="uuid" value="00000000-0000-0000-0000-00000000008f" /></inFilter>
</configResolveClass>
 
John