cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1236
Views
5
Helpful
12
Replies

add a vlan to multiple service-profile remplates vNIC via CLI

robad
Level 1
Level 1

Hi,

From time to time, we have a need to :

1. Create a new VLAN on FIs

2. Add this VLAN to all of our Service-Profile Templates [around 8]

And we want to make it automated.

I tried few CLI commands to get info about our Templates, and then try to use "set" command for it, but with no success

 

Can you please give me a clue ? and if it's possible at all via CLI, or we must use API ?....

Thanks in advance

1 Accepted Solution

Accepted Solutions

Wes Austin
Cisco Employee
Cisco Employee

UCS# scope org

UCS /org # scope vnic-templ test-vnic-a

UCS /org/vnic-templ # create eth-if VLAN10

UCS /org/vnic-templ/eth-if* # commit-buffer
UCS /org/vnic-templ/eth-if #

 

https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/CLI-User-Guides/Network-Mgmt/4-2/b_cli_ucsm_network_management_guide_4_2/b_CLI_UCSM_Network_Management_Guide_chapter_01011.html 

View solution in original post

12 Replies 12

balaji.bandi
Hall of Fame
Hall of Fame

why not use UCS manager?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Maybe I wasn't clear

 

Of course WE ARE USING UCSM

But instead of do it manually via UCS-M, We are looking for a we are looking for a way to do it automatically via UCS-M CLI 

 

Thanks 

 

  1. Connect to the UCS Manager CLI using SSH or a local terminal emulator.
  2. Enter the command connect local-mgmt.
  3. Enter the command scope org to enter the default organization.
  4. Enter the command scope service-profile-template.
  5. Enter the command show-templates to view a list of all available service-profile templates.
  6. Enter the command show-template followed by the name of the template that you want to modify. This will show the current configuration of the template.
  7. Enter the command modify-template followed by the name of the template that you want to modify.
  8. Enter the command add vnic followed by the name of the vNIC that you want to modify.
  9. Enter the command switch-id followed by the VLAN ID that you want to add to the vNIC.
  10. Enter the command commit-buffer.
  11. Enter the command exit to exit the template modification mode.

Repeat these steps for each service-profile template that you want to modify.

Note: The VLAN ID that you specify in the switch-id command must already exist on the switches in your UCS domain.

 M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Hi !

Thanks for the answer ! sounds exactly what we need.

But, after enter the command connect local-mgmt, I have no command "scope" .....

and if I not entering the 'local-mgmt', I have 'scope' but not scope service-profile-template

my version is : System version: 4.2(2a)

 

thanks !

 

 

 - Not sure on that . check if this document can helphttps://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-central/GUI-User-Guides/Server-Mgmt/1-5/b_CiscoUCSCentral_Server_Management_Guide_1-5/b_CiscoUCSCentral_Server_Management_Guide_1-5_chapter_0100.pdf

 M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

@marce1000  - thanks, but it's g guide for the GUI

Hi @robad ,

Little mistake by @marce1000 there - you DON'T use the connect local-mgmt command before issuing the scope commands, and I think you need to specify and object too - like

FI-A# scope org MyOrg
FI-A /org #

But not too sure about the object bit,

 

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Hi,

Yep, I've tried it

But after enter into the scope "org", I have only :

scope service-profile, and not service-profile-template

Hi, Thanks for the advise

I didn't saw this kind of option there...

Wes Austin
Cisco Employee
Cisco Employee

UCS# scope org

UCS /org # scope vnic-templ test-vnic-a

UCS /org/vnic-templ # create eth-if VLAN10

UCS /org/vnic-templ/eth-if* # commit-buffer
UCS /org/vnic-templ/eth-if #

 

https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/CLI-User-Guides/Network-Mgmt/4-2/b_cli_ucsm_network_management_guide_4_2/b_CLI_UCSM_Network_Management_Guide_chapter_01011.html 

Wes, thanks !

It's not exactly what I asked, because we are not using vNIC templates, but, it's a good idea to move to use vNIC templates !

Then, we can update our whole service-profile templates to get the new vlan just once ! to add it in the vNIC policy, and it'll change it all

 

So it's better than what I've asked

Review Cisco Networking products for a $25 gift card