01-08-2023 05:53 AM
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
Solved! Go to Solution.
01-10-2023 06:16 AM - edited 01-10-2023 06:16 AM
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 #
01-08-2023 06:22 AM
why not use UCS manager?
01-08-2023 07:05 AM
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
01-08-2023 07:21 AM
connect local-mgmt
.scope org
to enter the default organization.scope service-profile-template
.show-templates
to view a list of all available service-profile templates.show-template
followed by the name of the template that you want to modify. This will show the current configuration of the template.modify-template
followed by the name of the template that you want to modify.add vnic
followed by the name of the vNIC that you want to modify.switch-id
followed by the VLAN ID that you want to add to the vNIC.commit-buffer
.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.
01-08-2023 07:41 AM
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 !
01-08-2023 08:10 AM
- Not sure on that . check if this document can help : https://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.
01-08-2023 08:23 AM
@marce1000 - thanks, but it's g guide for the GUI
01-08-2023 11:13 AM
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,
01-08-2023 10:30 PM
Hi,
Yep, I've tried it
But after enter into the scope "org", I have only :
scope service-profile, and not service-profile-template
01-08-2023 11:36 AM
you can try API and SDK if that is supported.
https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/sw/api/UCSM_API_Guide.html
https://github.com/CiscoUcs/ucsmsdk
01-09-2023 02:03 AM
Hi, Thanks for the advise
I didn't saw this kind of option there...
01-10-2023 06:16 AM - edited 01-10-2023 06:16 AM
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 #
01-10-2023 06:33 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide