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
Hi there,I am interested in finding out about the upgrade options for Nexus 9508. I have the first generation Fabric Module N9K-C9508-FM, SUP N9K-SUP-A, SC N9K-SC-A and the first generation line cards N9K-X9564PX and N9...
Hi there, I am wondering if anyone has configured the 40G line card N9K-X9432PQ with port-channel or vpc-peerlink. I noticed that it requires 'no buffer boost' command and without it you cannot create a port-channel. Does it cause any issue with vpc ...
Using python script I need to mount an ISO image and a USB image to Cisco server IMC over network. Is it supported by Cisco IMC? The images are shared using HTTPS server.I need to mount both ISO and IMG images same time so that when the server is booted i...