Generate SAN Zones for Cisco or Brocade with UCS

Version 14

    This script will generate the Aliases, Zones and Zone Sets for either Brocade or Cisco MDS/Nexus.

      The script only build Single Initiator/Single Target Zoning

    It uses a pre-defined CSV file of SAN target information along with information gathered by UCSM.  A sample has been included in this ZIP file.

    It allows you to save the configuration files to your drive or to write directly to your equipment with SSH.

    It will generate the information for either all Service Profiles with vHBAs or selected ones via a multi-select menu.

     

    Prerequisites for this script are:

      PowerShell must be enabled on your client computer. - set-executionpolicy unrestricted -force

      You must be running PowerShell version 3 or above

      You must download and install Cisco PowerTool for PowerShell from http://www.cisco.com A CCO Login is required

      You must download plink.exe and place in the correct folder

           You can download plink here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

                It is assumed plink will be located in this folder: C:\Program Files (x86)\PuTTY\plink.exe

                     But you can change this in the script. Search for $PlinkAndPath and edit

      You must be network connected and have reachability via SSH TCP Port 22 to your SAN Fabric Switches/Directors

      You must be network connected and have reachability via SSL TCP Port 443 to your Cisco UCS Domain

      You must have a login into your UCSM domain

      You must have a login into your SAN Fabric Switches/Directors

      You must have this script and the required CSV file in the same folder

      If outputting configurations to a file they will also be saved in the same folder as this script and CSV file

     

     

    The script supports Service Profiles with vHBAs for:

      Two vHBAs: A & B Fabric

      One vHBA: A Fabric

      One vHBA: B Fabric

      It does NOT support having some Service Profiles with only an A fabric vHBA and some with only a B fabric vHBA or

      where some have two vHBAs and others only have one.

     

     

    The scripts tested limits are building Single Initiator/Single Target Zones is 160 Service Profiles against a 32 Port

    SAN Array (16 A and 16 B controller ports).  This is 2560 Aliases, Zones and Zone Set members per fabric.

      This is not a maximum, but a maximum tested.

    It takes only a few seconds to build configurations written to file

    It took ~1 second to build each zone when pushing to an MDS switch and ~4 seconds to build each zone when pushing to a Brocade switch

      For 2560 zones it took 21 minutes to the MDS and 114 minutes to the brocade for each fabric so be patient when writing to your equipment.

     

    v0.3 - Initial published version

    v0.4 - Added the ability to create all or selected zones

    v0.4.01 - Minor features to adjust screen colors and menu locations for a better user experience

    v0.5 - Added error handling for new zoning menu

    v0.5.01 - Bug fix.  When select only the last item in the Service Profile Menu, it build 2 zones, one correct, one blank.

    v0.5.02 - Now checks that you are running at least PowerShell v3

    v0.5.03 - Fixed issue with single FI deployment

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

    v0.5.0.7 - Added support for different quantities of ports per fabric.  Added support for a saved credentials file

    v0.5.0.8 - Fixed an issue with generating configuration in a UCS with a single Service Profile

     

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

     

    Joe