vHBA Management

vHBA Template

This template is a policy that defines how a vHBA on a server connects to the SAN. It is also referred to as a vHBA SAN connectivity template.

You must include this policy in a service profile for it to take effect.

Configuring a vHBA Template

Procedure
     Command or ActionPurpose
    Step 1UCSC# connect policy-mgr  

    Enters policy manager mode.

     
    Step 2UCSC(policy-mgr)# scope org org-name  

    Enters organization mode for the specified organization. To enter the root organization mode, type / as the org-name .

     
    Step 3UCSC(policy-mgr) /org # create vhba-templ vhba-templ-name [fabric {a | b}] [fc-if vsan-name]  

    Creates a vHBA template and enters organization vHBA template mode.

     
    Step 4UCSC(policy-mgr) /org/vhba-templ # set descr description   (Optional)

    Provides a description for the vHBA template.

     
    Step 5UCSC(policy-mgr) /org/vhba-templ # set fabric {a | b}   (Optional)

    Specifies the fabric to use for the vHBA. If you did not specify the fabric when creating the vHBA template in Step 2, then you have the option to specify it with this command.

     
    Step 6UCSC(policy-mgr) /org/vhba-templ # set fc-if vsan-name   (Optional)

    Specifies the Fibre Channel interface (named VSAN) to use for the vHBA template. If you did not specify the Fibre Channel interface when creating the vHBA template in Step 2, you have the option to specify it with this command.

     
    Step 7UCSC(policy-mgr) /org/vhba-templ # set max-field-size size-num  

    Specifies the maximum size of the Fibre Channel frame payload (in bytes) that the vHBA supports.

     
    Step 8UCSC(policy-mgr) /org/vhba-templ # set pin-group group-name  

    Specifies the pin group to use for the vHBA template.

     
    Step 9UCSC(policy-mgr) /org/vhba-templ # set qos-policy mac-pool-name  

    Specifies the QoS policy to use for the vHBA template.

     
    Step 10UCSC(policy-mgr) /org/vhba-templ # set stats-policy policy-name  

    Specifies the server and server component statistics threshold policy to use for the vHBA template.

     
    Step 11UCSC(policy-mgr) /org/vhba-templ # set type {initial-template | updating-template}  

    Specifies the vHBA template update type. If you do not want vHBA instances created from this template to be automatically updated when the template is updated, use the initial-template keyword; otherwise, use the updating-template keyword to ensure that all vHBA instances are updated when the vHBA template is updated.

     
    Step 12UCSC(policy-mgr) /org/vhba-templ # set wwpn-pool pool-name  

    Specifies the WWPN pool to use for the vHBA template.

     
    Step 13UCSC(policy-mgr) /org/vhba-templ # commit-buffer  

    Commits the transaction to the system configuration.

     

    The following example configures a vHBA template and commits the transaction:

    UCSC# connect policy-mgr
    UCSC(policy-mgr)# scope org /
    UCSC(policy-mgr) /org* # create vhba template VhbaTempFoo
    UCSC(policy-mgr) /org/vhba-templ* # set descr "This is a vHBA template example."
    UCSC(policy-mgr) /org/vhba-templ* # set fabric a
    UCSC(policy-mgr) /org/vhba-templ* # set fc-if accounting
    UCSC(policy-mgr) /org/vhba-templ* # set max-field-size 2112
    UCSC(policy-mgr) /org/vhba-templ* # set pin-group FcPinGroup12
    UCSC(policy-mgr) /org/vhba-templ* # set qos-policy policy34foo
    UCSC(policy-mgr) /org/vhba-templ* # set stats-policy ServStatsPolicy
    UCSC(policy-mgr) /org/vhba-templ* # set type updating-template
    UCSC(policy-mgr) /org/vhba-templ* # set wwpn-pool SanPool7
    UCSC(policy-mgr) /org/vhba-templ* # commit-buffer
    UCSC(policy-mgr) /org/vhba-templ # 
    

    Deleting a vHBA Template

    Procedure
       Command or ActionPurpose
      Step 1UCSC# connect policy-mgr  

      Enters policy manager mode.

       
      Step 2UCSC(policy-mgr)# scope org org-name  

      Enters organization mode for the specified organization. To enter the root organization mode, type / as the org-name .

       
      Step 3UCSC(policy-mgr) /org # delete vhba-templ vhba-templ-name  

      Deletes the specified vHBA template.

       
      Step 4UCSC(policy-mgr) /org # commit-buffer  

      Commits the transaction to the system configuration.

       

      The following example deletes the vHBA template named VhbaTempFoo and commits the transaction:

      UCSC# connect policy-mgr
      UCSC(policy-mgr)# scope org /
      UCSC(policy-mgr) /org # delete vhba template VhbaTempFoo
      UCSC(policy-mgr) /org* # commit-buffer
      UCSC(policy-mgr) /org # 
      

      Default vHBA Behavior Policy

      Default vHBA behavior policy allow you to configure how vHBAs are created for a service profile. You can choose to create vHBAs manually, or you can allow them to be created automatically.

      You can configure the default vHBA behavior policy to define how vHBAs are created. This can be one of the following:

      • None does not create default vHBAs for a service profile. All vHBAs must be explicitly created.

      • HW Inherit—If a service profile requires vHBAs and none have been explicitly defined, creates the required vHBAs based on the adapter installed in the server associated with the service profile.


      Note


      If you do not specify a default behavior policy for vHBAs, none is used by default.


      Configuring a Default vHBA Behavior Policy

      Procedure
         Command or ActionPurpose
        Step 1UCSC# connect policy-mgr  

        Enters policy manager mode.

         
        Step 2UCSC(policy-mgr)# scope org / 

        Enters the root organization mode.

         
        Step 3UCSC(policy-mgr)/org # scope vhba-beh-policy 

        Enters default vHBA behavior policy mode.

         
        Step 4UCSC(policy-mgr)/org/vhba-beh-policy # set action {hw-inherit [template_name name] | none} 

        Specifies the default vHBA behavior policy. This can be one of the following:

        • hw-inherit—If a service profile requires vHBAs and none have been explicitly defined, Cisco UCS Central creates the required vHBAs based on the adapter installed in the server associated with the service profile.

          If you specify hw-inherit, you can also specify a vHBA template to create the vHBAs.

        • noneCisco UCS Central does not create default vHBAs for a service profile. All vHBAs must be explicitly created.

         
        Step 5UCSC(policy-mgr)/org/vhba-beh-policy # commit-buffer 

        Commits the transaction to the system configuration.

         

        This example shows how to set the default vHBA behavior policy to hw-inherit.

        UCSC# connect policy-mgr
        UCSC(policy-mgr) # scope org /
        UCSC(policy-mgr)/org # scope vhba-beh-policy
        UCSC(policy-mgr)/org/vhba-beh-policy # set action hw-inherit
        UCSC(policy-mgr)/org/vhba-beh-policy* # commit-buffer
        UCSC(policy-mgr)/org/vhba-beh-policy #

        vNIC/vHBA Placement Policies

        vNIC/vHBA placement policies are used to determine the following:

        • How the virtual network interface connections (vCons) are mapped to the physical adapters on a server.

        • What types of vNICs or vHBAs can be assigned to each vCon.

        Each vNIC/vHBA placement policy contains four vCons that are virtual representations of the physical adapters. When a vNIC/vHBA placement policy is assigned to a service profile, and the service profile is associated with a server, the vCons in the vNIC/vHBA placement policy are assigned to the physical adapters and the vNICs and vHBAs are assigned to those vCons.

        For blade or rack servers that contain one adapter, Cisco UCS assigns all vCons to that adapter. For servers that contain four adapters, Cisco UCS assigns vCon1 to Adapter1, vCon2 to Adapter2, vCon3 to Adapter3, and vCon4 to Adapter4.

        For blade or rack servers that contain two or three adapters, Cisco UCS assigns the vCons based on the type of server and the selected virtual slot mapping scheme, which can be Round Robin or Linear Ordered. For details about the available mapping schemes, see vCon to Adapter Placements.

        After Cisco UCS assigns the vCons, it assigns the vNICs and vHBAs based on the Selection Preference for each vCon. This can be one of the following:

        Note


        You can specify the PCI order for the vHBA; however, the desired order works within a class of devices, such as vNICs or vHBAs and not across them. Within an adapter, vNICs are always placed ahead of the vHBAs.


        • all—All configured vNICs and vHBAs can be assigned to the vCon, whether they are explicitly assigned to it, unassigned, or dynamic. This is the default.

        • assigned-only—vNICs and vHBAs must be explicitly assigned to the vCon. You can assign them explicitly through the service profile or the properties of the vNIC or vHBA.

        • exclude-dynamic—Dynamic vNICs and vHBAs cannot be assigned to the vCon. The vCon can be used for all static vNICs and vHBAs, whether they are unassigned or explicitly assigned to it.

        • exclude-unassigned—Unassigned vNICs and vHBAs cannot be assigned to the vCon. The vCon can be used for dynamic vNICs and vHBAs and for static vNICs and vHBAs that are explicitly assigned to it.

        • exclude-usnic—Cisco usNICs cannot be assigned to the vCon. The vCon can be used for all other configured vNICs and vHBAs, whether they are explicitly assigned to it, unassigned, or dynamic.


          Note


          An SRIOV usNIC that is explicitly assigned to a vCon set to exclude-usnic will remain assigned to that vCon.


        If you do not include a vNIC/vHBA placement policy in the service profile, defaults to the Round Robin vCon mapping scheme and the All vNIC/vHBA selection preference, distributing the vNICs and vHBAs between the adapters based on the capabilities and relative capacities of each adapter.

        Configuring a vNIC/vHBA Placement Policy

        Procedure
           Command or ActionPurpose
          Step 1UCSC# connect policy-mgr  

          Enters policy manager mode.

           
          Step 2UCSC(policy-mgr)# scope org org-name  

          Enters organization mode for the specified organization. To enter the root organization mode, type / as the org-name.

           
          Step 3UCSC(policy-mgr) /org # create vcon-policy policy-name  

          Creates the specified vNIC/vHBA placement profile and enters organization vcon policy mode.

           
          Step 4UCSC(policy-mgr) /org/vcon-policy # set descr description   (Optional)

          Provides a description for the vNIC/vHBA Placement Profile.

          Enter up to 256 characters. You can use any characters or spaces except ` (accent mark), \ (backslash), ^ (carat), " (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote).

          Note   

          If your description includes spaces, special characters, or punctuation, you must begin and end your description with quotation marks. The quotation marks will not appear in the description field of any show command output.

           
          Step 5UCSC(policy-mgr) /org/vcon-policy # set mapping-scheme {round-robin | linear-ordered}   (Optional)

          For blade or rack servers that contain one adapter, Cisco UCS Central assign all vCons to that adapter. For servers that contain four adapters, Cisco UCS Central assign vCon1 to Adapter1, vCon2 to Adapter2, vCon3 to Adapter3, and vCon4 to Adapter4.

          For blade or rack servers that contain two or three adapters, Cisco UCS Central assigns vCons based on the selected virtual slot mapping scheme. This can be one of the following:

          • Round Robin round-robin— In a server with two adapter cards, Cisco UCS Central assigns vCon1 and vCon3 to Adapter1, then assigns vCon2 and vCon4 to Adapter2.

            In a server with three adapter cards, Cisco UCS Central assigns vCon1 to Adapter1, vCon2 and vCon4 to Adapter2, and vCon3 to Adapter3.

            This is the default scheme.

          • Linear Ordered Linear-ordered— In a server with two adapter cards, Cisco UCS Central assigns vCon1 and vCon2 to Adapter1, then assigns vCon3 and vCon4 to Adapter2.

            In a server with three adapter cards, Cisco UCS Central assigns vCon1 to Adapter1 and vCon2 to Adapter2, then assigns vCon3 and vCon4 to Adapter3.

          In N20-B6620 and N20-B6625-2 blade servers, the two adapters are numbered left to right while vCons are numbered right to left. If one of these blade servers has a single adapter, Cisco UCS Central assigns all vCons to that adapter. If the server has two adapters, the vCon assignment depends upon the virtual slot mapping scheme:

          • Round Robin round-robinCisco UCS Central assigns vCon2 and vCon4 to Adapter1 and vCon1 and vCon3 to Adapter2. This is the default.

          • Linear Ordered linear-orderedCisco UCS Central assigns vCon3 and vCon4 to Adapter1 and vCon1 and vCon2 to Adapter2.

           
          Step 6UCSC(policy-mgr) /org/vcon-policy # set vcon {1 | 2 | 3 | 4} selection {all | assigned-only | exclude-dynamic | exclude-unassigned}  

          Specifies the selection preference for the specified vCon. The options are:

          • All all—All configured vNICs and vHBAs can be assigned to the vCon, whether they are explicitly assigned to it, unassigned, or dynamic. This is the default.
          • Assigned Only assigned-only—vNICs and vHBAs must be explicitly assigned to the vCon. You can assign them explicitly through the service profile or the properties of the vNIC or vHBA.
          • Exclude Dynamic exclude-dynamic —Dynamic vNICs and vHBAs cannot be assigned to the vCon. The vCon can be used for all static vNICs and vHBAs, whether they are unassigned or explicitly assigned to it.

          • Exclude Unassigned exclude-unassigned—Unassigned vNICs and vHBAs cannot be assigned to the vCon. The vCon can be used for dynamic vNICs and vHBAs and for static vNICs and vHBAs that are explicitly assigned to it.
           
          Step 7UCSC(policy-mgr) /org/vcon-policy # commit-buffer  

          Commits the transaction.

           

          The following example creates a vNIC/vHBA placement policy named Adapter1All, sets the vCon mapping scheme to Linear Ordered, specifies that only assigned vNICs and vHBAs can be placed on adapter 1, and commits the transaction:

          UCSC# connect policy-mgr
          UCSC(policy-mgr)# scope org /
          UCSC(policy-mgr) /org # create vcon-policy Adapter1
          UCSC(policy-mgr) /org/vcon-policy* # set descr "This profile places all vNICs and vHBAs on adapter 1."
          UCSC(policy-mgr) /org/vcon-policy* # set mapping-scheme linear-ordered
          UCSC(policy-mgr) /org/vcon-policy* # set vcon 1 selection assigned-only
          UCSC(policy-mgr) /org/vcon-policy* # commit-buffer
          UCSC(policy-mgr) /org/vcon-policy* # 
          UCSC(policy-mgr) /org # 

          Deleting a vNIC/vHBA Placement Policy

          Procedure
             Command or ActionPurpose
            Step 1UCSC# connect policy-mgr  

            Enters policy manager mode.

             
            Step 2UCSC(policy-mgr)# scope org org-name  

            Enters organization mode for the specified organization. To enter the root organization mode, type / as the org-name .

             
            Step 3UCSC(policy-mgr) /org # delete vcon-policy policy-name  

            Deletes the specified vNIC/vHBA placement profile.

             
            Step 4UCSC(policy-mgr) /org # commit-buffer  

            Commits the transaction.

             

            The following example deletes the vNIC/vHBA placement profile named Adapter1All and commits the transaction:

            UCSC# connect policy-mgr
            UCSC(policy-mgr)scope org /
            UCSC(policy-mgr) /org # delete vcon-policy Adapter1All
            UCSC(policy-mgr) /org* # commit-buffer
            UCSC(policy-mgr) /org #