vNIC Template
The vNIC LAN connectivity policy defines how a vNIC on a server connects to the LAN.
Cisco UCS Manager does not automatically create a VM-FEX port profile with the correct settings when you create a vNIC template. If you want to create a VM-FEX port profile, you must configure the target of the vNIC template as a VM. You must include this policy in a service profile for it to take effect.
You can select VLAN groups in addition to any individual VLAN while creating a vNIC template.
Note |
If your server has two Emulex or QLogic NICs (Cisco UCS CNA M71KR-E or Cisco UCS CNA M71KR-Q), you must configure vNIC policies for both adapters in your service profile to get a user-defined MAC address for both NICs. If you do not configure policies for both NICs, Windows still detects both of them in the PCI bus. Then because the second eth is not part of your service profile, Windows assigns it a hardware MAC address. If you then move the service profile to a different server, Windows sees additional NICs because one NIC did not have a user-defined MAC address. |
Creating vNIC Template Pairs
Procedure
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
UCS-A/ org # create vnic-templ vnic-primary . |
Creates a Primary vNIC template. |
||
Step 2 |
UCS-A/ # org vnic-templ set type updating-template . |
Set the template type to updating, which drives the configurations in the Primary vNIC template for shared configurations to the peer vNIC template. See the shared configurations listed below. |
||
Step 3 |
UCS-A/ # org vnic-templ [set fabric {a | b}] . |
Specifies the fabric for the Primary vNIC template. If you specify Fabric A for the Primary vNIC template, the Secondary vNIC template must be Fabric B or vice versa. |
||
Step 4 |
UCS-A/ # org vnic-templ set descr primaryinredundancypair . |
Sets the template as the Primary vNIC template. |
||
Step 5 |
UCS-A/ # org vnic-templ set redundancy-type primary . |
Sets the redundancy template type as the Primary vNIC template. Following are descriptions of the Redundancy Types: Primary—Creates configurations that can be shared with the Secondary vNIC template. Any shared changes on the Primary vNIC template are automatically synchronized to the Secondary vNIC template. Secondary — All shared configurations are inherited from the Primary template. No Redundancy— Legacy vNIC template behavior. Following is a list of shared configurations:
Following is a list of non-shared configurations:
|
||
Step 6 |
UCS-A/ # org vnic-templ exit . |
|
||
Step 7 |
UCS-A/ # org vnic-templ create vNIC-templ vNICsecondary . |
Creates the Secondary vNIC template. |
||
Step 8 |
UCS-A/ # org vnic-templ set type updating-template . |
Sets the template type to updating, which automatically inherits the configurations from the Primary vNIC template. |
||
Step 9 |
UCS-A/ org # vnic-templ [set fabric {a | b}] . |
Specifies the fabric for the Secondary vNIC template. If you specify Fabric A for the Primary vNIC template, the Secondary vNIC template must be Fabric B or vice versa. |
||
Step 10 |
UCS-A/ # org vnic-templ set descr secondaryredundancypair . |
Sets the secondary vNIC template as a redundancy pair template. |
||
Step 11 |
UCS-A/ # org vnic-templ set redundancy-type secondary . |
Sets the vNIC template type as Secondary. |
||
Step 12 |
UCS-A/ # org vnic-templ set peer-template-name vNIC-primary . |
Sets the Primary vNIC template as the peer to the Secondary vNIC template. |
||
Step 13 |
UCS-A/ # org vnic-templ commit-buffer . |
Commits the transaction to the system configuration. |
Example
The following example configures a vNIC redundancy template pair and commits the transaction:
UCS-A /org* # create vnic-template vnic-primary
UCS-A /org/vnic-templ* # set type updating-template
UCS-A /org/vnic-templ* # set fabric a
UCS-A /org/vnic-templ* # set descr primaryinredundancypair
UCS-A /org/vnic-templ* # set redundancy-type primary
UCS-A /org/vnic-templ* # exit
UCS-A /org* # create vnic-templ vnicsecondary
UCS-A /org/vnic-templ* # set fabric b
UCS-A /org/vnic-templ* # set descr secondaryinredundancypair
UCS-A /org/vnic-templ* # set redundancy-type secondary
UCS-A /org/vnic-templ* # set peer-template-name vnic-primary
UCS-A /org/vnic-templ* # commit-buffer
UCS-A /org/vnic-templ #
What to do next
After you create the vNIC redundancy template pair, you can use the redundancy template pair to create redundancy vNIC pairs for any service profile in the same organization or sub- organization.
Undo vNIC Template Pairs
You can undo the vNIC template pair by changing the Peer Redundancy Template so that there is no peer template for the Primary or the Secondary template. When you undo a vNIC template pair, the corresponding vNIC pairs also becomes undone.
Procedure
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A /org # scope vnic-templ template1 . |
Specifies the name of the vNIc template that you want to undo from the template pair. |
Step 2 |
UCS-A /org/ vnic-templ # set redundancy-type no redundancy . |
Removes the paring between the peer Primary or Secondary redundancy template used to perform the template pairing. |
Step 3 |
UCS-A /org/vnic-templ* # commit-buffer . |
Commits the transaction to the system configuration. |
Example
The following example shows how to undo a template pairing:
UCS-A /org # scope vnic-templ template1
UCS-A /org/vnic-templ # set redundancy-type no-redundancy
UCS-A /org/vnic-templ* # commit buffer
Configuring a vNIC Template
Procedure
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
UCS-A# scope org org-name |
Enters the organization mode for the specified organization. To enter the root organization mode, enter / as the org-name . |
||
Step 2 |
UCS-A /org # create vnic-templ vnic-templ-name [eth-if vlan-name] [fabric {a | b}] [target [adapter | vm]] |
Creates a vNIC template and enters organization vNIC template mode. The target you choose determines whether or not Cisco UCS Manager automatically creates a VM-FEX port profile with the appropriate settings for the vNIC template. This can be one of the following:
|
||
Step 3 |
(Optional) UCS-A /org/vnic-templ # set descr description |
(Optional)
Provides a description for the vNIC template. |
||
Step 4 |
(Optional) UCS-A /org/vnic-templ # set fabric {a | a-b | b | b-a} |
(Optional)
Specifies the fabric to use for the vNIC. If you did not specify the fabric when creating the vNIC template in Step 2, you have the option to specify it with this command. If you want this vNIC to be able to access the second fabric interconnect if the default one is unavailable, choose a-b (A is the primary) or b-a (B is the primary) .
|
||
Step 5 |
UCS-A /org/vnic-templ # set mac-pool mac-pool-name |
The MAC address pool that vNICs created from this vNIC template should use. |
||
Step 6 |
UCS-A /org/vnic-templ # set mtu mtu-value |
The maximum transmission unit, or packet size, that vNICs created from this vNIC template should use. Enter an integer between 1500 and 9000.
|
||
Step 7 |
UCS-A /org/vnic-templ # set nw-control-policy policy-name |
The network control policy that vNICs created from this vNIC template should use. |
||
Step 8 |
UCS-A /org/vnic-templ # set pin-group group-name |
The LAN pin group that vNICs created from this vNIC template should use. |
||
Step 9 |
UCS-A /org/vnic-templ # set qos-policy policy-name |
The quality of service policy that vNICs created from this vNIC template should use. |
||
Step 10 |
UCS-A /org/vnic-templ # set stats-policy policy-name |
The statistics collection policy that vNICs created from this vNIC template should use. |
||
Step 11 |
UCS-A /org/vnic-templ # set type {initial-template | updating-template} |
Specifies the vNIC template update type. If you do not want vNIC 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 vNIC instances are updated when the vNIC template is updated. |
||
Step 12 |
UCS-A /org/vnic-templ # commit-buffer |
Commits the transaction to the system configuration. |
Example
The following example configures a vNIC template and commits the transaction:
UCS-A# scope org /
UCS-A /org* # create vnic template VnicTempFoo
UCS-A /org/vnic-templ* # set descr "This is a vNIC template example."
UCS-A /org/vnic-templ* # set fabric a
UCS-A /org/vnic-templ* # set mac-pool pool137
UCS-A /org/vnic-templ* # set mtu 8900
UCS-A /org/vnic-templ* # set nw-control-policy ncp5
UCS-A /org/vnic-templ* # set pin-group PinGroup54
UCS-A /org/vnic-templ* # set qos-policy QosPol5
UCS-A /org/vnic-templ* # set stats-policy ServStatsPolicy
UCS-A /org/vnic-templ* # set type updating-template
UCS-A /org/vnic-templ* # commit-buffer
UCS-A /org/vnic-templ #
Deleting a vNIC Template
Procedure
Command or Action | Purpose | |
---|---|---|
Step 1 |
UCS-A# scope org org-name |
Enters the organization mode for the specified organization. To enter the root organization mode, enter / as the org-name . |
Step 2 |
UCS-A /org # delete vnic-templ vnic-templ-name |
Deletes the specified vNIC template. |
Step 3 |
UCS-A /org # commit-buffer |
Commits the transaction to the system configuration. |
Example
The following example deletes the vNIC template named VnicTemp42 and commits the transaction:
UCS-A# scope org /
UCS-A /org # delete vnic template VnicTemp42
UCS-A /org* # commit-buffer
UCS-A /org #