Skip to main content

Command Palette

Search for a command to run...

Cisco IMC

Connect KVM-console over Terminal with Python

Updated
1 min readView as Markdown
Cisco IMC
B

I’ve been rocking the DevOps journey for a decade, starting with building Cisco’s software-defined datacenters for multi-region OpenStack infrastructures. I then shifted to serverless and container deployments for finance institutions. Now, I’m deep into service meshes like Consul, automating with Ansible and Terraform, and running workloads on Kubernetes and Nomad. Stick around for some new tech and DevOps adventures!

When operating Cisco UCS servers, one will want to watch and/or troubleshoot the server via KVM-console either in Cisco IMC(CIMC) or UCS Manager(UCSM) because the OS lost connection, filesystem got corrupted or having problem with firmware upgrade, etc. It is always time consuming to open up web browser, login UCS Manager or CIMC Web GUI and then launch KVM-console via Java/HTML5.

Since CIMC 3.x, there is a built-in feature called "CISCO Serial Over LAN" which you can directly connect to CIMC's KVM console through CIMC CLI. The python tool connect_cimc_kvm.py that you can connect KVM-console through your terminal with CLI in few seconds.

The syntax is simple:

[root@linux ~]# python connect_cimc_kvm.py --help 
usage: connect_cimc_kvm [-h] -i HOST -u USERNAME -p PASSWORD

connect Imc KVM console with terminal
optional arguments:

-h, --help show this help message and exit -i HOST, --host HOST CIMC IP address or hostname
-u USERNAME, --username USERNAME
-p PASSWORD, --password PASSWORD

If you want to know more about Python SDK for Cisco UCS, check out this blog.