Created by: John McDonough on 02-08-2011 03:05:49 PM A KVM launch link for a UCS blade or rack mount server is accessible via the UCS Manager interface and the url http://<ucs-ip- address>/ucsm/kvm.html
KVM access in 1.4 is improved from 1.3, the 1.4 KVM access institutes KVM session ownership. That is when a second KVM session is launced for a server, the launcher is shown a dialog to request access to the initial session. The owner of the initial session is alerted to the request and can grant access as read-only, as read-write, or can deny access. Both versions of UCS firmware 1.3 and 1.4 support secure access (https KVM link), however even in non-secure interaction one time use tokens are generated for KVM access.
To launch a KVM for a server from a script, a few things must be determined, UCS firmware version, the management interface IP address and the launch url. The launch url is ultimately what provides access to the KVM, it will contain the IP address of the management interface, the one time use tokens, the dn of the Service Profile, if there is one associated. If the dn of the Service Profile is included the the Service Profile properties tab is displayed. Controlling the display of the service profile properties tab is something that only a custom script can do.
I'm going to be script agnostic and provide the calls and output, it's up to you to wrap this up in Perl, PowerShell, Java, VB, etc...
Let's start with getting the management interface for the server. The management interface will provide us with the IP address to connect to, with version 1.4 of UCS firmware the management IP address can now be managed a few different ways, it can come from a pool and stick with the server, come from a pool and stick with the service profile or be statically assigned to the service profile. Whatever method was used the IP address of the management interface is maintained in the mgmtIf object, specifically the mgmtIf object for management interface 1.
The mgmtIf object is a granchild object of the computeBlade object and great-great-grandchild of the topSystem object. The object ancestral liniage is
For a blade -- topSystem --> equipmentChassis --> computeBlade --> mgmtController --> mgmtIf
For a rack mount -- topSystem --> computeRackUnit --> mgmtController --> mgmtIf
For chassis 1 blade 1 the dn of mgmtIf 1 would be
For rack unit 1 the dn of mgmtIf 1 would be
I'll go through this example with computeBlade, since that is what has been in UCS since day 1, however where you see chassis-x/blade-x that can be replaced with rack-unit-x for rack mount servers.
If the mgmtIf object is a grandchild of computeBlade how do you go about getting the mgmtIf object without doing a query on the computeBlade and setting inHierarchical="true". If you need a refresher on UCS queries check out this blog it will tell you all you need to know about queries to get this script going. Assume that I have alread done the <aaaLogin> and have a valid cookie
To get the management interface for a computeBlade you can either go directly to the dn for management interface 1 with a configResolveDn or you could use configScope set the dn to the computeBlade and the inClass to mgmtIf. Doing it the latter way will require parsing multiple returned mgmtIf objects.
Now that we know the IP address, next we'll get the firmware version of UCS Manager, the version we care about is in an object with a class type of firmwareRunning, however there are many of those objects and the one we really care about is sys/mgmt/fw-system so we'll use a configResolveDn query.
Now that I know the UCS firmware version I can use that to determine which token generation method I'll use. Remember before I said where you see chassis-x/blade-x you can replace that with rack-unit-x, that ony works in UCS firmware 1.4, there is no support for rack mount servers in UCS Manager prior to 1.4.
Token generation methods changed from 1.3 to 1.4 to allow for support of rack mount servers. Two tokens are needed for when the KVM launch URL is created.
The last item needed is the Service Profile name, if there is a service profile associated to the server. The service profile name can be retrieved from the computeBlade object, it is the value of the assignedToDn attribute.
Now that we have all the components for the KVM URL, lets construct it, the URL will launch the KVM interface, it can be a single tab interface displaying just the KVM console or a multi-tab interface with the second tab showing either the Server properties or the Service Profile properties.
The single KVM console tab URL for sys/chassis-1/blade-1
The only additional item in the URL is kvmDn which is set to the dn of the Service Profile associated to the blade.
A rack mount server KVM can be launched by using the same URL construction but replace chassisId & slotId with just the dn of the rack mount server for example to launch a single tab interface for a rack-unit-1 the URL would be
Sandbox af205c78-86ac-4be0-a563-a030052f9a0f that is linked from:https://developer.cisco.com/learning/lab/imc-redfish-rest-api-101/step/1seems not longer available.Is there another sandbox with access to the Redfish interface from an C-series system ?Than...
Hi developers, I am trying to install the ACItoolkit into my windows 10 machine. I have downloaded it, but when trying to install it using the power shell, i am getting a permission denied error - PS D:\ACItoolKit\acitoolkit-master> lsDirect...
Hi,I am looking for a way to get the LLDP and CDP information of each ethernet-port of a fabric via REST-interface of DCNM?Infrastructure:DCNM, LAN Fabric, Version 11.3NK9-switchesIs this possible? Can someone give me a hint.... ThanksJuergen
Dear DevNet members.I'm looking for a way to send a REST API query to retrieve the field of "Overall Status" that appears in UCS Manager -> Equipment -> Chassis (see attached). This is just an example of trying to retrieve overall of status of Cisco...