52

Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

Embed Size (px)

Citation preview

Page 1: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005
Page 2: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

Managing UCS environments with UCS PowerTool (PowerShell)

LTRCOM-2005

Jason Shaw and Eric Williams

Technical Marketing Engineers

Cisco

Page 3: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Agenda

• Introduction

• What resources are available to get started automating UCS Infrastructure?

• Cisco UCSM’s Programmatic Infrastructure – Cisco UCS PowerTool for UCS Manager

– DEMO / LAB: Using UCS PowerTool for UCSM

• Cisco IMC’s Programmatic Infrastructure – Cisco UCS PowerTool for IMC

– DEMO / LAB: Using UCS PowerTool for IMC

• UCS PowerTool Free-form Coding as a Group

• Conclusion

3

Page 4: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

What resources are available to get started automating UCS Infrastructure?

Page 5: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS User Community

• Web Based End User Community

• Tools, Downloads, Examples • UCS Platform Emulator (UCSPE)

• goUCS Automation Tool

• XML API, PowerShell code Examples

• Cisco UCS PowerTool (PowerShell Module)

• Microsoft SCOM Management Pack for Cisco UCS

• Microsoft SCVMM UI Extension for Cisco UCS

• Microsoft SCO Integration Pack for Cisco UCS

• Documentation • Programming & Developer Guides

• Whitepapers

• Reference Guides (XML Model, Faults)

• Collaboration • Blogs

• Peer to peer forums

• Videos

• Access to Cisco Subject Matter Experts

http://communities.cisco.com/ucs

5

Page 6: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS Platform Emulator (UCSPE)

• No UCS Hardware Needed for API integration Development

• Full featured emulator for the UCS Manager

• Installs as a Virtual Machine

• Provides complete support for all XML API calls

• Object Browser to peruse the UCSM model

• Import & replicate existing live UCS Manager physical inventory

• Share saved physical inventories among UCS Platform Emulators

• Drag-n-drop hardware builder to create custom physical inventory

6

http://communities.cisco.com/ucspe

Page 7: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

What is Cisco UCS Manager’s Programmatic Infrastructure?

Page 8: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco Unified Computing System

8

Cisco UCS™ Manager (Read / Write Configuration Interfaces)

UCS Manager GUI and CLI

Cisco UCS Fabric Interconnects (Read Only / Cut Through Interfaces)

SNMP, Syslog, SMTP, SMASH CLP, CIM XML, Smart Call Home

20, 40, 48, and 96 ports Cisco UCS I/O modules

Cisco UCS Blade Server Chassis

Cisco UCS Blade / Rack Servers (Cut through Interfaces to CIMC)

Serial over LAN, KVM, IPMI

Cisco UCS I/O Adapters

Page 9: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS Manager Programmatic Infrastructure

• Comprehensive XML API, standards-based interfaces

• Bi-Directional access to physical & logical internals

9

XML API

Direct UCS CLI UCS GUI 3rd Party Customer

Self Serve portals

Management Tools

Auditing Tools

System Status

Physical Inventory

Logical Inventory

Broad 3rd party integration support

Faster custom integration for customer use cases

Consistent data and views across ALL interfaces

Page 10: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

Cisco UCS PowerTool for UCS Manager

Page 11: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for UCS Manager Programmatic control over UCS hardware

• Architected for Flexibility and coverage • PowerShell Wrapper

– Cmdlet definition and structure

– Get-help support

• .NET UCS Namespace Library

– XML API call construction

– Class Definition

– Validation

• PowerShell Design • In-line get-help support

• Full Pipelining support

• Fully classed object definition

• All ‘legal’ verbs

• .NET Namespace provides common base for all Microsoft focused integration

• Targeted to support full manageability of UCS across multiple releases

Cisco UCS

PowerTool Module

UCS .NET Namespace

UCS XML API

cmdlets

11

Page 12: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS XML

Schema

Processor

UCSM-IN.xsd

UCSM-OUT.xsd

Augment

Schema

XML Method

& MO Meta

Information

PowerShell

Generator

Microsoft SCO IP

Generator

XYZ

Generator

Cisco UCS

PowerTool

(1850+ cmdlets)

Microsoft SCO

Integration Pack

XYZ

Integration Pack

Cisco UCS PowerTool Automated Code Creation

Automated Activity Generation from UCS XML Schema

12

Page 13: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for UCS Manager Most Commonly Used Objects and Assets

• Chassis – Hardware – Power Supply / Fan

Modules / IO Modules

– Environmental statistical data (Power, cooling, network)

– Config and Hardware Faults

• Fabric Interconnect – Hardware – Power Supply / Fan

Modules / Network Expansion Modules

– Power / cooling / network/ environmental statistical data

– Network Elements (VLAN, VSAN, QoS, Port Profiles)

– Config and Hardware Faults

• Config. Operations – Pools (WWN, UUID, MAC, IP)

– Policy creation, manipulation, deletion, and consumption

– vNIC / vHBA Templates

– Service profile template creation, cloning, deletion, and consumption

• Simplistic service profile creation (with a limited scope of what is available to configure)

• Expert SP creation (use variabilized XML w/ config file)

– Compare Managed Objects across orgs and/or domains

– Sync Managed Objects across orgs and/or domains

• Service Profiles – Policies (Firmware, Boot Order,

vNIC / vHBA config, Storage, IPMI, SoL, BIOS)

– Pools (WWN, UUID, MAC, IP)

– Configuration Faults

– Launch UCS KVM for SP

• Servers – Hardware - CPU, Memory,

Adaptors, CIMC

– Power Operations

– Power / cooling / network /environmental statistical data

– Hardware Faults

13

Page 14: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Root

sys org-root

UCS Manager XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

switch-A chassis-1

fabric

ls-bob

org-prod

blade-1 slot-2

ether fc

port-5 port-1

adaptor-1

eth0

compute board

fc0 temp stats

power stats

macPool

mac pool

block

lsPower lsBinding

boot policy

bios policy

LAN cloud

SAN cloud

bob vsan10

Legend

equipment network logical

14

Page 15: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Root

sys org-root

UCS Manager XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

switch-A

fabric

ls-bob

org-prod

slot-2

ether fc

port-5 port-1

compute board

fc0 temp stats

power stats

macPool

mac pool

block

lsPower lsBinding

boot policy

bios policy

LAN cloud

SAN cloud

bob vsan10

Legend

equipment network logical

Get-UcsChassis -Id 1 | Get-UcsBlade -SlotId 1 | Get-UcsAdaptorUnit -Id 1 | Get-UcsAdaptorHostEthIf

eth0

adaptor-1

blade-1

chassis-1

15

Page 16: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Root

sys org-root

UCS Manager XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

switch-A chassis-1

fabric

ls-bob

org-prod

blade-1 slot-2

ether fc

port-5 port-1

adaptor-1

eth0

compute board

fc0 temp stats

power stats

macPool

mac pool

block

lsPower lsBinding

boot policy

bios policy

SAN cloud

vsan10

Legend

equipment network logical

Get-UcsLanCloud | Add-UcsVlan -name bob -id 222

bob

LAN cloud

16

Page 17: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Get-UcsOrg -name root | Add-UcsMacPool -Name bob123 | Add-UcsMacMemberBlock –From 20:00:00:11:22:00 -To 20:00:00:11:22:10

Root

sys

UCS Manager XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

switch-A chassis-1

fabric

ls-bob

org-prod

blade-1 slot-2

ether fc

port-5 port-1

adaptor-1

eth0

compute board

fc0 temp stats

power stats

lsPower lsBinding

boot policy

bios policy

LAN cloud

SAN cloud

bob vsan10

Legend

equipment network logical

org-root

macPool

mac pool

block

17

Page 18: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

CiscoUcsPS Module Overview

ConvertTo-UcsCmdlet -UcsBackup -

LiteralPath c:\ucs\backup.xml -OutputPath

c:\ucs\output.ps1

18

Page 19: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: ConvertTo-UcsCmdlet

• The best way to discover usage of PowerTool cmdlets and usage

• Usage: Option #1

• Launch UCS GUI & Login

• C:\> ConvertTo-UcsCmdlet

• Usage: Option #2

• C:\> Connect-Ucs 1.2.3.4

• C:\> Start-UcsGuiSession -LogAllXml

• C:\> ConvertTo-UcsCmdlet

• Usage: Option #3

• Create a ‘config-all’ XML backup from UCS Manager

• C:\> ConvertTo-UcsCmdlet -UcsBackup -LiteralPath backup.xml -OutputPath output.ps1

19

Page 20: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: UCS Connections

• Connect-Ucs returns a UcsHandle on a successful connection

– Connect to 1 UCS, by Name/IP

– Connect to ‘n’ UCS, by Name/IP, with the same credentials

– Connect to ‘n’ UCS with information from a file, protected by a key

• If -NotDefault isn`t specified, handles go to a Default UcsHandle list

• By default, not more than 1 UcsHandle is allowed in the Default UcsHandle list

– Override with:

Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true

• Refresh of the connection happens in the background

• Get-UcsPSSession to see the Default UcsHandle list

• Export-UcsPSSession to save a set of UcsHandles to file

20

Page 21: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: Get-UcsCmdletMeta Another Great way to learn about the PowerTool cmdlets

21

Page 22: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Transactions in UCS PowerTool for UCS Manager • A set of XML requests can be sent to UCS in a single transaction.

• Only Add-* or Set-* cmdlets can be used in a transaction

• Example of requests without transaction • Get-UcsServiceProfile Server1 | Set-UcsServiceProfile -Descr Description1

– <configConfMos cookie="" inHierarchical="false"><inConfigs><pair key="org-root/ls-Server1"><lsServer

descr="Description1" dn="org-root/ls-Server1" status="modified" /></pair></inConfigs></configConfMos>

• Get-UcsServiceProfile Server2 | Set-UcsServiceProfile -Descr Description2 – <configConfMos cookie="" inHierarchical="false"><inConfigs><pair key="org-root/ls-Server2"><lsServer

descr="Description2" dn="org-root/ls-Server2" status="modified" /></pair></inConfigs></configConfMos>

• Example of same requests within transaction • $sp1 = Get-UcsServiceProfile Server1

• $sp2 = Get-UcsServiceProfile Server2

• Start-UcsTransaction

• $sp1 | Set-UcsServiceProfile -Descr Description1 -Force

• $sp2 | Set-UcsServiceProfile -Descr Description2 –Force

• Complete-UcsTransaction –Xml

– <configConfMos cookie="" inHierarchical="false"><inConfigs><pair key="org-root/ls-Server1"><lsServer

descr="Description1" dn="org-root/ls-Server1" status="modified" /></pair><pair key="org-root/ls-

Server2"><lsServer descr="Description2" dn="org-root/ls-Server2" status="modified"

/></pair></inConfigs></configConfMos>

• Pending transactions can be undone using Undo-UcsTransaction

22

Page 23: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Transactions in UCS PowerTool for UCS Manager

23

Page 24: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS PowerTool Parameter Validations

• PowerShell has native support for parameter validation.

• PowerTool uses this feature to ensure parameter validations before sending XML requests.

• A validation in PowerTool generally falls in one or more of the categories below:

• Length: minimum and maximum length of a string

• Range: minimum and maximum value of an integral type

• Value set: set of all possible values for a parameter

• Pattern: regular expression based validation

• Hybrid: A combination of the above.

24

Page 25: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS PowerTool Parallelism

• When connected to multiple UCS, any request is sent to all systems in parallel.

Get-UcsChassis Get-UcsChassis Parallel Not Parallel

Connected to Multiple UCS Domains

25

Page 26: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS PowerTool Parallelism Connected to Multiple UCS Domains

26

Page 27: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Managed Object (MO) Versioning

• MO Versioning Information is required to be able to inter-operate between versions of UCS

• Assuming a MO with Properties A,B,C,D

• Field A

• Field B

• Field C

• Field D

Version 1

27

Page 28: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Managed Object (MO) Versioning

• MO Versioning Information is required to be able to inter-operate between versions of UCS Schema

• Assuming a field E which was not present in version 1 and was added in version 2.

• Compare-UcsMo method will skip this field while doing a MO comparison

• Sync-UcsMo will also skip this field while sending the diff to Version 1 UCS

• As a generic rule, Sync-UcsMo will skip operational properties, unknown properties and operational MOs, unknown MOs

• Field A

• Field B

• Field C

• Field D

Version 1

• Field A

• Field B

• Field C

• Field D

• Field E

Version 2

28

Page 29: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Compare & Sync Managed Objects (MO)

• Compare-UcsManagedObject & Sync-UcsManagedObject work on a set of MOs, in a generic manner.

• The usage scenarios are many .. esp. when considered with -XlateOrg, - XlateMap, -DeleteNotPresent

• The snippet below shows an unassociated SP from one org to another without losing any identifiers, etc. (done in 2 back to back transactions).

29

Page 30: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

DEMO: Using UCS PowerTool for UCS Manager

Page 31: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

LAB: Using UCS PowerTool for UCS Manager

Page 32: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

What is Cisco IMC’s Programmatic Infrastructure?

Page 33: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Events {xml}

HTTP(S) {xml}

Syslog Server

Events {SNMP Traps}

Polls {SNMP GET}

SNMP-based NMS

Events {Syslog

Messages}

C

I

M

C

Syslog

SNMP

XML API

Memory CPU

PCI Adaptors

Fans

PSU

System Board

Fault Engine

IPMI

Cisco UCS C-Series Server

Storage Daemon

Inventory Sensor Data

Config

Faults

Disk

Storage Controller

Disk Disk Disk

Disk Disk Disk Disk

Architecture of Cisco UCS C-Series IMC UCS PowerTool

33

Page 34: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

Cisco UCS PowerTool for IMC

Page 35: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for IMC Most Commonly Used Objects and Assets

• Server Inventory – Hardware Inventory

• CPU

• Memory

• Motherboard

• Power Supplies

• Hard Disk Drives

• Fans

– Environmental statistical data (Power / Temperature)

– Hardware Faults

• Equipment Operations – Server Power State Change

– Enable / Disable LED

– KVM GUI Launch

– CIMC User Interface Launch

• CIMC Admin Config Operations – Monitoring (SNMP, Syslog, NTP)

– Authentication (Local Users, LDAP, LDAP Group to Role Mapping)

– Firmware Management via Host Update Utility Non-Interactive

– Import / Export CIMC Configuration

• Server Config Operations – BIOS Settings

– Boot Order (Legacy and Precision Boot Config)

– Local Storage Configuration

– Virtual Interface Card Adaptor Configuration

– Compare / Sync Objects across IMC’s

35

• Adaptors

– Storage Controller

– Virtual Interface Card

– LOM’s

– Other PCI devices

Page 36: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

sys

Cisco IMC XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

rack-unit-1

adaptor-1

eth0

biosUnit

fc0

bios settings

bios defaults

compute board

temp stats

power stats

fan module

memory array

boot

definition

LAN storage virt media

EFI

local hyper

threading turbo boost

cpu cores enabled

fan0

power

supply

processor unit-1 memory

unit-1

36

Page 37: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

sys

Cisco IMC XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

rack-unit-1

biosUnit

fc0

bios settings

bios defaults

temp stats

power stats

fan module

boot

definition

LAN storage virt media

EFI

local hyper

threading turbo boost

cpu cores enabled

Get-ImcAdaptorUnit | Get-ImcAdaptorHostEthIf

memory array

adaptor-1

eth0 fan0

power

supply

processor unit-1

compute board

memory unit-1

37

Page 38: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

sys

Cisco IMC XML Hierarchy Overview Managed Object to UCS PowerTool Command Reference

rack-unit-1

adaptor-1

eth0

biosUnit

fc0

bios settings

bios defaults

temp stats

power stats

fan module

boot

definition

LAN storage virt media

EFI

local hyper

threading turbo boost

cpu cores enabled

Get-ImcComputeBoard | Get-ImcMemoryArray | Get-ImcMemoryUnit

fan0

power

supply

processor unit-1

compute board

memory array

memory unit-1

38

Page 39: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

CiscoImcPS Module Overview

39

Page 40: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: ConvertTo-ImcCmdlet

• The best way to discover the UCS PowerTool cmdlets and usage

• Launch IMC GUI, login, and make changes In CIMC GUI (Example: Configure BIOS Settings)

• Connect via UCS PowerTool for IMC and run:

• C:\> Connect-Imc 1.2.3.4

• C:\> $BiosSettings = Get-ImcBiosSettings -Hierarchy

• C:\> $BiosSettings | ConvertTo-ImcCmdlet

40

Page 41: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: IMC Connections

• Connect-Imc returns a ImcHandle on a successful connection

– Connect to 1 IMC, by Name/IP

– Connect to ‘n’ IMC, by Name/IP, with the same credentials

– Connect to ‘n’ IMC with information from a file, protected by a key

• If -NotDefault isn`t specified, handles go to a Default ImcHandle list

• By default, not more than 1 ImcHandle is allowed in the Default ImcHandle list

– Override with: • Set-ImcPowerToolConfiguration -SupportMultipleDefaultImc $true

• Refresh of the connection happens in the background

• Get-ImcPSSession to see the Default ImcHandle list

• Export-ImcPSSession to save a set of ImcHandles to file

41

Page 42: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Transactions in UCS PowerTool for IMC • A set of XML requests that can be sent and applied to IMC in an

optimized fashion, in as few XML transmissions as possible.

– IMC supports full sub-tree manipulation in a single XML transmission for:

• BIOS Settings

• Boot Order

• LDAP authentication settings

• Only Add-* or Set-* cmdlets can be used in a transaction

• Pending transactions can be undone using Undo-ImcTransaction

42

Page 43: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Transactions in UCS PowerTool for IMC • Example of requests without transaction

– $HyperT = Get-ImcBiosSettings | Get-ImcBiosHyperThreading

– $HyperT | Set-ImcBiosHyperThreading -VpIntelHyperThreadingTech enabled • <configConfMo cookie="" dn="sys/rack-unit-1/bios/bios-settings/Intel-HyperThreading-Tech"

inHierarchical="false"><inConfig><biosVfIntelHyperThreadingTech dn="sys/rack-unit-1/bios/bios-settings/Intel-

HyperThreading-Tech" status="modified" vpIntelHyperThreadingTech="enabled" /> </inConfig></configConfMo>

– $Turbo = Get-ImcBiosSettings | Get-ImcBiosTurboBoost

– $Turbo | Set-ImcBiosTurboBoost -VpIntelTurboBoostTech enabled • <configConfMo cookie="" dn="sys/rack-unit-1/bios/bios-settings/Intel-Turbo-Boost-Tech"

inHierarchical="false"><inConfig><biosVfIntelTurboBoostTech dn="sys/rack-unit-1/bios/bios-settings/Intel-Turbo-Boost-

Tech" status="modified" vpIntelTurboBoostTech="enabled" /></inConfig></configConfMo>

• Example of same requests within transaction – $HyperT = Get-ImcBiosSettings | Get-ImcBiosHyperThreading

– $Turbo = Get-ImcBiosSettings | Get-ImcBiosTurboBoost

– Start-ImcTransaction

– $HyperT | Set-ImcBiosHyperThreading -VpIntelHyperThreadingTech enabled

– $Turbo | Set-ImcBiosTurboBoost -VpIntelTurboBoostTech enabled

– Complete-ImcTransaction –Xml

• <configConfMo cookie="" dn="sys/rack-unit-1/bios/bios-settings" inHierarchical="false"><inConfig><biosSettings

dn="sys/rack-unit-1/bios/bios-settings" status="modified"><biosVfIntelHyperThreadingTech dn="sys/rack-unit-

1/bios/bios-settings/Intel-HyperThreading-Tech" status="modified" vpIntelHyperThreadingTech="enabled"

/><biosVfIntelTurboBoostTech dn="sys/rack-unit-1/bios/bios-settings/Intel-Turbo-Boost-Tech" status="modified"

vpIntelTurboBoostTech="enabled"/> </biosSettings></inConfig></configConfMo>

43

Page 44: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS C-Series Server

Transactions in UCS PowerTool for IMC

CIMC XMLAPI

Transaction #1:

Create Local User “user14”

Transaction #2:

Create Local User “user15”

Transaction #3:

Configure Three BIOS Settings

44

Page 45: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

DEMO: Using UCS PowerTool for Cisco IMC

Page 46: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

LAB: Using UCS PowerTool for Cisco IMC

Page 47: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

UCS PowerTool Free-form Coding

Page 48: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Participate in the “My Favorite Speaker” Contest

• Promote your favorite speaker through Twitter and you could win $200 of Cisco Press products (@CiscoPress)

• Send a tweet and include

– Your favorite speaker’s Twitter handle @aeroic78

– Two hashtags: #CLUS #MyFavoriteSpeaker

• You can submit an entry for more than one of your “favorite” speakers

• Don’t forget to follow @CiscoLive and @CiscoPress

• View the official rules at http://bit.ly/CLUSwin

Promote Your Favorite Speaker and You Could be a Winner

48

Page 49: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Complete Your Online Session Evaluation

• Give us your feedback and you could win fabulous prizes. Winners announced daily.

• Complete your session evaluation through the Cisco Live mobile app or visit one of the interactive kiosks located throughout the convention center.

Don’t forget: Cisco Live sessions will be available for viewing on-demand after the event at CiscoLive.com/Online

49

Page 50: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Continue Your Education

• Demos in the Cisco Campus

• Walk-in Self-Paced Labs

• Table Topics

• Meet the Engineer 1:1 meetings

50

Page 51: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005
Page 52: Managing UCS environments with UCS PowerTool (PowerShell)d2zmdbbm9feqrf.cloudfront.net/2014/usa/pdf/LTRCOM-2005.pdf · Managing UCS environments with UCS PowerTool (PowerShell) LTRCOM-2005