- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
UCS Manager
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 #
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 06:22 AM
why not use UCS manager?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 07:21 AM
- Connect to the UCS Manager CLI using SSH or a local terminal emulator.
- Enter the command
connect local-mgmt
. - Enter the command
scope org
to enter the default organization. - Enter the command
scope service-profile-template
. - Enter the command
show-templates
to view a list of all available service-profile templates. - 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. - Enter the command
modify-template
followed by the name of the template that you want to modify. - Enter the command
add vnic
followed by the name of the vNIC that you want to modify. - Enter the command
switch-id
followed by the VLAN ID that you want to add to the vNIC. - Enter the command
commit-buffer
. - 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.
-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023 08:23 AM
@marce1000 - thanks, but it's g guide for the GUI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 02:03 AM
Hi, Thanks for the advise
I didn't saw this kind of option there...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 #
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
