cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5781
Views
4
Helpful
4
Replies

UCS C240 not recognised by ucsmsdk - what have I missed?

rktem43byr
Level 1
Level 1

I have to automate the configuration of a number of C240 servers and am trying to use ucsmsdk. I am failing at the first hurdle. I can't work out what I am doing wrong. Can somebody help?

When I try to run the basic test script to login and then logout it fails with a "Not a supported server" error.

Environment

Client written in ucsmsdk v0..9.1.1 working on getting v0.9.2.0 installed.

Server UCS C240 M4S

BIOS C240M4.2.0.9b

CIMC Firmware 2.0(9e)

Test code

from ucsmsdk.ucshandle import UcsHandle

conn = UcsHandle('n.n.n.n', '**username**', '**password**')

conn.login()

When I run this it fails with this exception.

  ucsmsdk.ucsexception.UcsLoginError: Not a supportecd server

Debug steps

I have checked that the credentials are correct by altering them and then running the script.

I have also connected to the URI that the ucsmsdk code is using wget.

wget --no-check-certificate http://n.n.n.n:443

I get a compressed (GZIP)  CIMC login page.  Is this expected?

Thanks for the help.

1 Accepted Solution

Accepted Solutions

swwagh
Cisco Employee
Cisco Employee

Hi Michael,

ucsmsdk is used to manage UCSM managed rack servers. If you want to manage standalone rack servers, please use imcsdk.

You can install imcsdk using "pip install imcsdk"

Following is the sample code for logging into a standalone rack server using imcsdk :-

from imcsdk.imchandle import ImcHandle

handle = ImcHandle(ip, username, password)

handle.login()

Hope this helps !

View solution in original post

4 Replies 4

swwagh
Cisco Employee
Cisco Employee

Hi Michael,

ucsmsdk is used to manage UCSM managed rack servers. If you want to manage standalone rack servers, please use imcsdk.

You can install imcsdk using "pip install imcsdk"

Following is the sample code for logging into a standalone rack server using imcsdk :-

from imcsdk.imchandle import ImcHandle

handle = ImcHandle(ip, username, password)

handle.login()

Hope this helps !

And if these are UCS managed C240s, you can use PowerTool to configure anything within UCS.  Cisco UCS PowerTool Suite - PowerShell Modules for Cisco UCS Manager, Cisco IMC, UCS Central

Thanks for the suggestion but Powershell isn't an option.

Thank you for pointing me to the correct Python package. I should get this in the target environment when I am back onsite.

====================

FYI: future readers

In the mean-time, I implemented a quick solution using pexpect to SSH to the IMC but encountered timeouts when attempting to show some Management Objects (e.g. scope chassis, show dimm) despite increasing the timeout to very large values.

Review Cisco Networking for a $25 gift card

Cisco UCS X-Series Energy Efficiency Offer