7 Replies Latest reply: May 19, 2017 8:35 AM by christopher.eakin RSS

UCS Central and VLan Groups in UCSM

christopher.eakin

Came across this and thought I'd share.

 

We've got a UCS Central managed environment with one UCS Domain.  We have Port channels created in UCSM between ports that segregates data types across different ports.  VLANs are assigned to vNICs and VLANs are then added to VLAN groups and those groups are tied to send that data across a specific port or port channel, i.e. Management, Production, Storage.  Apparently, UCS Central can not manage VLAN groups in UCSM.  This is a bummer unless someone can show me otherwise.  I've found a work around using PowerTool to accomplish adding VLans very easily.  Below is my syntax.

 

$VLANID = "2000"

$VLANName = "VLAN 2000"

 

#Creates VLAN

Get-UcsCentralOrgDomainGroup -Name "root" | Get-UcsCentralFabricEp -LimitScope | Get-UcsCentralLanCloud | Add-UcsCentralVlan -Id $VLanID -Name $VlanName

 

Get-UcsCentralOrg -Level root  | Add-UcsCentralFabricVlanReq -Name $VlanName

 

#Gets every VNic Template name "Mgmt" and addes the VLAN to the Vnic Template

Foreach ($vNic in Get-UcsCentralVnicTemplate | where {$_.Name -like "*mgmt*"} | select -expand name) {Get-UcsCentralOrg -Level root | Add-UcsCentralVnicTemplate -ModifyPresent -Name $vNic | Add-UcsCentralVnicInterface -Name $VlanName}

 

#Now comes the problem.  I need to assign this VLAN to a VLAN group in UCSM so it gets channeled into the right port channel

 

#Connect to the UCSM instance.  You can connect to multiple UCSM instances at once if you have more than one domain.

Connect-Ucs -Credential $cred $UCSM

 

#Get the VLAN just created in UCS Central and assigned to the Management VNics and add to the VLAN group

Get-UcsLanCloud | Add-UcsFabricNetGroup -ModifyPresent -Name "Mgmt" | Add-UcsFabricPooledVlan -ModifyPresent -Name $VlanName

 

If anyone have a better method of doing this, I'd love to hear it.  Thanks.