cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

UCS Base Configuration Builder PowerShell Script

12668
Views
45
Helpful
11
Comments

This is a ZIP file with four PowerShell scripts inside:

     File one is Data-Blank.ps1 and this is a worksheet to fill out with all the basic requirements for your UCS deployment.

     File two is UCS Base Configuration v0.9.17.ps1 which connects to the Data-<yourUCS>.ps1 file and then configures your UCS system with all the standard parameters needed to build service profiles.

     The third is a sample Data-Laptop.ps1 file to give you good examples for your deployment.  I use this one on my UCS emulator on my laptop.  You will just need to make minor changes to the IP addressing info to match your emulator or system to test.

     The fourth is a customization script template.  It allows someone with advanced PowerShell/PowerTool knowledge to customize their install after the base script has run.

There is a readme file in the ZIP will provide more information.  The script contains many of my 'best practices' and can be adjusted or customized for your needs.  After filling out the data file it generally takes only a few minutes (between 2:30 and 15 minutes) for the script to completely run and configure your UCS.

The script does the following:

     Configures equipment policies

     Configures server, uplink and FC ports

     Creates port-channels if used for LAN and SAN

     Set VLAN and VSAN information

     Set's up all Pools, Policies and Templates required to run a UCS

     Builds a series of Service Profile Templates using created pools, policies and templates

Upon completion there should be very little customization required to get your system running.  If there is, the customization script feature can automate those changes.

The script contains the concept of a UCS Domain ID.  This concept is a two digit hexadecimal number that uniquely represents a UCS system.  It is used to make UUID, MAC, WWPN, WWNN, IQN pools unique and non-overlapping between multiple UCS systems.

The benefit of this script is rapid and consistent provisioning of new UCS deployments.


Let me know if you have any problems, questions or recommendations for changes

Change_Log:

v0.9 - Added Support for Rack Mount Servers under UCSM

v0.9.01 - Added support for LAN and SAN Port Channels

v0.9.02 - Added tons of customizations and better flow and documentation in the answer file (Data-) along with a sample config

v0.9.03 - Added additional documentation into answer file.  Changed Boot Policies for FC to prefix with Boot_from_

v0.9.04 - Fixed logic problem when you don't have a chassis and/or a fex in re-ack creating an infinite loop.  Changed default in answer file to rack immediate discovery

v0.9.05 - Fixed issue of vNIC build where added native vlan name does not match vNIC name

v0.9.06 - Added tons of data file validation checks and corrected a few minor issues.

v0.9.07 - Added the ability to modify the format for the pools.  This requires using the latest script and data file attached.  Also added the ability to add notes to the data file which will appear as the script finishes.  These can be helpful to remind you of special settings to make to UCSM that are outside the scope of this script.

v0.9.08 - Added the ability to run a customization script called from the data file to execute special settings on your UCSM.

v0.9.09 - Added custom background color and coloring in the script to make it more readable.  Fixed typo in answer file.  Added readme file to ZIP.  Added information to the script to help the user understand the script.

v0.9.11 - Validated that you were running at least PowerShell v3 for the script to function

v0.9.12 - Fixed issue with waiting for FI's or Modules to reboot after universal ports converted from Ethernet to Fibre Channel

v0.9.13 - Tested on UCSM 2.1 and 2.2.  Added new features for UCSM 2.2.  RAID50, RAID60, UDLD and DIMM Blacklisting

v0.9.14 - Rolled back support for UCSM 2.2 building UDLD, RAID50 and RAID60 as a new PowerTool is required.  Does configure DIMM blacklisting.  Added checks for UCSM 2.2 to not try to put 2.2 features into 2.1.  Checks PowerTool version to make sure minimum for 2.1 UCSM support.  Create new BIOS policy called "Performance" that has highest performance CPU settings.  It is not applied to Service Profile Templates though as "Basic" is the default.

v0.9.15 - Cleaned up a few minor parsing errors, Changed default BIOS policy from Basic to Performance and Adjusted script to be able to handle non-failover NICs that share VLANs.  Examples for this final feature are in the sample answer files.

v0.9.16 - Added support for a single fabric deployment with a single Fabric Interconnect and single IOMs.  Added delay for re-login to validate that UCSM is up.

v0.9.17 - Fixed issue with single FI check.  Adjusted delay for re-login when system is a UCS emulator to speed up testing

v0.9.18 - Added built in help.  Command line options.  Standard naming convention.

v0.9.19 - Fixed issue with mgmt. pools failing to create due to non-default subnet mask (255.255.255.0).  Added option to add Subnet Masks to iSCSI IP Pools.  If you are using an older answer file the system will use 255.255.255.0.

v0.9.22 - Fixed issue with newer UCSM versions creating boot policy including local hard drive

As always, let me know if you have any questions, comments or concerns.

Joe

Comments
Enthusiast

Joe, Can I easily modify this script to setup an UCS Emulator (possibly adding a "start UCSPE" cmd-let sequence in the beginning)

Br

Jesper

Enthusiast

Sorry I didn't see your note earlier.  You can modify the script without issue.  It does work great to configure a UCSPE.  But when you say that you want to 'start' the UCSPE it makes me think you are looking to manage the UCSPE Virtual Machine itself.  That's not something this script does and I don't know of a way to do that though.

Enthusiast

Joe I need the script for UCSPE configuration only, I can start the UCSPE VM by other means, look forward to checkning it

BR

Jesper

Fra: joemar

Sendt: 26. juni 2014 16:48

Til: Jesper Munk

Emne: Re: - UCS Base Configuration Builder PowerShell Script

Cisco Communities <https://communities.cisco.com/>

UCS Base Configuration Builder PowerShell Script

new comment by joemar<https://communities.cisco.com/people/joemar>

View all comments on this document<https://communities.cisco.com/docs/DOC-36761#comment-15754>

Beginner

Hi Joe'

I have the UCSPE Emulator and am trying to use the Add-UcsDomain and the answer file Data-Laptop Emulator scripts.

I corrected a few bugs in the script pertaining to DNS and NTP.

The script runs fin and completes, but I get the same default configuration in the UCSPE with 2 chassis and 4 rack servers.

You can see the script logging back into the UCSPE.

IP address is correct

What could be wrong? Could it be something that I need to change about the startup inventory?

Powershell 4.0

UCSPE - 2.2(5a)

Beginner

Does anyone have a data file that has been completely filled out? I am having trouble with the data_BLANK getting all of the variable filled out correctly.

I have way too many errors, probably from a lack of knowledge.

Much thanks in advance

Don

Enthusiast

Donald, sorry for my late reply but I'm just back from a 3 month leave.  Did you get this working?  Do you need assistance?

Community Member

Do you have the ntp and dns fixes. I am running into an issue setting the timezone.

Enthusiast

Can you provide me some more information?  I just tested the script in my lab and NTP servers and Timezone properly configured.

Please provide me a snippit of the answer file for the timezone and NTP information.  Validate that you are using the latest build script and answer file from communities.  Also, what UCS system (Standard, Mini, M-Series) and firmware are you running this against?

Community Member

Hi Joe,

Does this script still work with the latest rev's of Powertool & UCSPE 3.1? I'm having some issues with a few parameters in commands such as Add-UcsIpPoolBlock. Specifically  -PrimDns $PriDNS


The new PS Module name is Cisco.UcsManager. That was easy enough to correct.

I'm just playing with the Data_Laptop against the PE to see what I can learn.

WARNING WARNING WARNING-

An error occured in the script and needs to be corrected before it will make further changes to UCS

Error found is:

Add-UcsIpPoolBlock : Cannot validate argument on parameter 'PrimDns'. The argument "" does not match the

"^((([0-9]){1,3}\.){3}[0-9]{1,3})$" pattern. Supply an argument that matches "^((([0-9]){1,3}\.){3}[0-9]{1,3})$"

and try the command again.

At C:\Users\mprunty\Documents\cisco\Add-UcsDomain\Add-UcsDomain.ps1:2314 char:88

+ ... ock -DefGw $iSCSIDefGwB -From $iSCSIIPstartB -PrimDns $PriDNS -SecDns ...

+                                                           ~~~~~~~

    + CategoryInfo          : InvalidData: (:) [Add-UcsIpPoolBlock], ParameterBindingValidationException

    + FullyQualifiedErrorId : ParameterArgumentValidationError,Cisco.Ucsm.Cmdlets.AddUcsIpPoolBlock

I'm just editing the file with the info req'd to connect to my PE.

mike

Beginner

Hi Joe, ( joemar)

it's possible add a sub-org (NO root), and create a Pool, Policy and other, using your script?

Best Regards

Beginner

Joe,

Is there a way to do a UCS Central registration automatically? i tried using register-ucscentral but it did not work at all. 

 

Thanks in advance.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards