<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>HOWTO: Multiple UCS search/KVM launcher, blade and chassis inventory...</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>HOWTO: Multiple UCS search/KVM launcher, blade and chassis inventory...</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=</id>
  <updated>2013-05-23T05:25:06Z</updated>
  <dc:date>2013-05-23T05:25:06Z</dc:date>
  <entry>
    <title>RE: vBlock and UCS system</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3872461" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3872461</id>
    <updated>2011-05-12T19:27:33Z</updated>
    <published>2011-05-12T19:27:33Z</published>
    <summary type="html">[quote]

Hi Adam,

Thanks for the replay, two questions regarding vBlock and UCS

1) Can I get from UCS manager information regarding nexsus connections?
2) Is there emulator for the vBlock UIM?

Thanks again
Gil


 
HI Gil - 
 
1.UCS Manager gets all the information from blades up to fabric interconnect switch but will not know anything above fabric interconnect like Nexus upstream .
2. I am not aware of vBlock UIM emulator.
 
Thanks
Pramod[/quote]
 
That's a good thought on the UCSM having information on north switching.  You can get some info out of the CLI using 'show cdp neighbor' i believe.  But it would be handy to have this data available in UCSM as well as through the API.  I'm going to request this feature to our account team and would suggest folks that would like that functionality to ask for it as well...
 
Chris</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-05-12T19:27:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: FC uplink into a VSAN</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3690568" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3690568</id>
    <updated>2011-04-15T21:12:08Z</updated>
    <published>2011-04-15T21:12:08Z</published>
    <summary type="html">Is this what you are looking for?
 
Changing from Default VSAN to HDSTest1:
&lt;configConfMos cookie="YOURCOOKIE" inHierarchical="false"&gt; 
&lt;inConfigs&gt; 
&lt;pair key="fabric/san/net-HDSTest1/phys-switch-A-slot-2-port-1"&gt; 
&lt;fabricFcVsanPortEp adminState="enabled" dn="fabric/san/net-HDSTest1/phys-switch-A-slot-2-port-1" name="" portId="1" slotId="2" switchId="A"&gt; 
&lt;/fabricFcVsanPortEp&gt; 
&lt;/pair&gt; 
&lt;/inConfigs&gt; 
&lt;/configConfMos&gt;


Changing back to Default VSAN:
&lt;configConfMos cookie="YOURCOOKIE" inHierarchical="false"&gt; 
&lt;inConfigs&gt;
&lt;pair key="fabric/san/net-default/phys-switch-A-slot-2-port-1"&gt; 
&lt;fabricFcVsanPortEp adminState="enabled" dn="fabric/san/net-default/phys-switch-A-slot-2-port-1" name="" portId="1" slotId="2" switchId="A"&gt; 
&lt;/fabricFcVsanPortEp&gt;
&lt;/pair&gt;
&lt;/inConfigs&gt; 
&lt;/configConfMos&gt;

Hope this helps!

Chris Atkinson</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-04-15T21:12:08Z</dc:date>
  </entry>
  <entry>
    <title>RE: UCS and vCenter - how are the host correlated</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169914" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169914</id>
    <updated>2011-03-15T16:02:46Z</updated>
    <published>2011-03-15T16:02:46Z</published>
    <summary type="html">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...</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-03-15T16:02:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: UCS and vCenter - how are the host correlated</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169887" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169887</id>
    <updated>2011-03-15T15:54:54Z</updated>
    <published>2011-03-15T15:54:54Z</published>
    <summary type="html">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.</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-03-15T15:54:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Fish the UCS API with Wireshark</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169863" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169863</id>
    <updated>2011-03-15T15:44:45Z</updated>
    <published>2011-03-15T15:44:45Z</published>
    <summary type="html">Hah, I just posted on having to use wireshark because the API wasn't fully mapped and came upon your post.  The thing I was looking for was how the Flash KVM page was being launched.  BTW it is this:

http://UCSM-URL/ucms/kvm.jnlp?kvmIpAddr=THEKVMIP&amp;kvmdN=org-root/org-BLAH/ServiceProfileName

If you use balboa (1.4) with LDAP you need to prepend 'ucs-' to the domain(provider group)...

Chris</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-03-15T15:44:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: WSDL for UCS XML API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169842" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169842</id>
    <updated>2011-03-15T15:37:21Z</updated>
    <published>2011-03-15T15:37:21Z</published>
    <summary type="html">I second Edward's request.  I understand your reasons Serge, but what about creating something external to the UCSM that gateways the SOAP into raw http posts/gets.  I'm working on an internal cloud initiative and relying on http posts and gets is less attractive then being able to easily query a WSDL to see what I can do.  The API isn't fully mapped so I'm relying on reading java logs and doing packet captures to find out what is really going on.  The recent post I did with the KVM IP I had to use wireshark to learn what class held the property I needed (mgmtIf | extIp).

I don't want to sound to harsh when you know exactly what you want to do, the API rocks!

Chris</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-03-15T15:37:21Z</dc:date>
  </entry>
  <entry>
    <title>HOWTO: Multiple UCS search/KVM launcher, blade and chassis inventory...</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169794" />
    <author>
      <name>Chris Atkinson</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=3169794</id>
    <updated>2011-03-15T15:29:35Z</updated>
    <published>2011-03-15T15:29:08Z</published>
    <summary type="html">I've attached a script to generate blade inventory for all UCS systemes in our datacenter (23 and growing).  It uses a compiled java jar that is used in the command line to do the http post to the UCS systems.

 
Extract and modify sendmulti.cmd, add your userid and password for your ucs systems, change YOURUCSPOD1 and YOURUCSPOD2 to (2) different UCS¿s (or remove the second YOURUCSPOD2 section if you only have 1 [or add others if you have many more]).  Run the BladeInventory.cmd and it should produce multi_out.xml which will be an XML Inventory of the 2 pods.  Obviously you can add as many UCS pods/systems as you want.
 
If you add the mgmtIf class and the fabricComputeSlotEp class to the AllBlades.xml you can do a few extra cool things.
 
The mgmtIf class will allow you to resolve the blades KVM IP address which you can use to inject into KVM launch page.  After many packet captures I derived how the KVM launcher worked.  All it really needs is the dn of the service profile and the kvm ip address.
 
[color=#0000ff][u][url=http://ucsm-url/ucms/kvm.jnlp?kvmIpAddr=THEKVMIP&amp;kvmdN=org-root/org-BLAH/ServiceProfileName]http://UCSM-URL/ucms/kvm.jnlp?kvmIpAddr=THEKVMIP&amp;kvmdN=org-root/org-BLAH/ServiceProfileName[/url][/color][/u][u][/u][u][/u]
 
Above shows the syntax to directly login to a server knowing the Service Profile dn and the KVM IP.  The mgmtIf class will get you the extIP (kvmIPaddr) and the computeBlade class will get you the service profile names.  I pump all this into SQL and render queries on a portal (nothing fancy just something that can render a datagrid).  I like to think of each class as a table, I get all the blade (computeBlade class) info in one table, the chassis/slot (fabricComputeSlotEp class) info in another table, and lastly the KVM details in another table (mgmtIf class).  I then join them with the field I generate  (POD) in the attached files along with chassisid and slotid.  


The cool thing using the fabricComputeSlotEp is you can now tell how many open/vacant slots there are or how utilized (percent of associate blades) your UCS systems are.
 
Here is some SQL queries I use against that data:
 
SEARCHABLE KVM LAUNCHER

select '&lt;A href="http://' + b.pod + '/ucsm/kvm.jnlp?kvmIpAddr=' + k.extip + '&amp;kvmdN='+b.assignedtoDN +'" target=blank&gt;' +b.pod + '&lt;/A&gt;'as 'Pod Name', assignedtoDN as 'Server/Profile Name', serial as 'Serial Number' , b.dn as 'Chassis/Slot Location', model as 'Server Model' , '&lt;A href="http://' + b.pod + '/ucsm/kvm.jnlp?kvmIpAddr=' + k.extip + '&amp;kvmdN='+b.assignedtoDN +'" target=blank&gt;' +k.extIp + '&lt;/A&gt;'as 'KVM IP Address' 
from inv_cisco_ucs_blade b, inv_cisco_ucs_kvm k 
where b.pod+b.slotid+b.chassisid = k.pod+k.slotid+k.chassisid
and assignedtodn like '%[Search:Text]%'
 
POD USAGE/AVAILABILITY:
select [UCS Pod], cast(
(cast([Total Slots in Pod]as decimal(4))- cast([Open Slots in all Chassis] as decimal(4))) / cast([Total Slots in Pod] as decimal(4)) * 100
as decimal (10,0)) as 'Percent of UCS POD Used'
,
[Unassigned blades],[In use blades], [Open Slots in all Chassis], [Total Slots in POD]
from (
select c.pod as 'UCS Pod',
sum(case when b.availability = 'available' then 1 else 0 end) as [Unassigned blades],
sum(case when b.availability != 'available' then 1 else 0 end) as [In use blades],
sum(case when b.availability is null and c.presence != 'equipped-not-primary' and c.presence != 'reserved' then 1 else 0 end) as [Open Slots in all Chassis],
sum(case when b.availability != '' or b.availability is null then 1 else 0 end) as [Total Slots in POD]
from inv_cisco_ucs_chassis c left outer join
inv_cisco_ucs_blade b on (b.pod+' chassis '+b.chassisid + ' slot ' +b.slotid) = (c.pod+' chassis '+c.chassisid + ' slot ' +c.slotid)
group by c.pod
) as a
order by [UCS Pod]
 
AVAILABLE BLADES THROUGHOUT ENTIRE COMPLEX (MODEL AND LOCATION)
select pod as 'UCS Pod', model as 'Blade Model', dn as 'Chassis and Blade slot'
from inv_cisco_ucs_blade
where availability = 'available'
 
This was many weeks of work but once I started down this path it all fell in line.  I did the KVM piece in about a day.
 
I realize not everyone will be super excited to use SQL but the techniques could be used in really any language.</summary>
    <dc:creator>Chris Atkinson</dc:creator>
    <dc:date>2011-03-15T15:29:08Z</dc:date>
  </entry>
</feed>

