Wednesday, September 9, 2015

How to get your Cisco UCS server serial number via esxcli

As much as I love Cisco UCSM, running the Java client on a MAC can be a hassle. So it's great to just be able to ssh into the system and get the info you need.

In this case, the info I need is the serial number of the server, a C220 M4. It is running in managed mode, so I can ssh into the UCSM and run a command to get the serial number thusly:

ucsm-A /server # show detail 

Server:
    ID: 1
    Name:
    User Label:
    Overall Status: Ok
    Oper Qualifier: N/A
    Service Profile: Cseries_vSAN_1
    Association: Associated
    Availability: Unavailable
    Discovery: Complete
    Conn Path: A,B
    Conn Status: A,B
    Managing Instance: A
    Admin Power: Policy
    Oper Power: On
    Admin State: In Service
    Product Name: Cisco UCS C220 M4S
    PID: UCSC-C220-M4S
    VID: 0
    Vendor: Cisco Systems Inc
    Serial (SN): FCH1838V0FW

    HW Revision: 0

BUT, you can also do it with VMware's famous esxcli  command. 

[root@esx1:~] esxcli hardware platform get 
Platform Information
   UUID: 0x48 0xfa 0x8a 0x6a 0x87 0xc3 0xe4 0x11 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x8f 
   Product Name: UCSC-C220-M4S
   Vendor Name: Cisco Systems Inc
   Serial Number: FCH1838V0FW
   IPMI Supported: true