Created by: John Kennedy on 31-05-2011 07:56:18 PM For some reason, I can't determine exacly how to take the service profiles I have and attach/assign them to blades or server pools. Documentation isn't guiding me, and I can't seem to guess.
Subject: RE: What's the command to assign a Service Profile to a Blade? Replied by: Joshua Heller on 31-05-2011 09:16:19 PM Hey John -
Thanks for the post. We've scoped a cmdlet called set-spassociation but it didn't make this release. In the meantime, you can use the invoke-xmlcommand cmdlet. That will essentially let you do anything in UCSM via PowerShell - even if we haven't written a specific cmdlet for it. Here's an example of how to do what you're asking:
Assuming you're already connected to a UCS cluster via PowerShell (connect-ucsm), the command would look like this:
You'll obviously want to substitute the service profile name (ls-HyperV-Host2 in my example --- remember to keep the ls- as a prefix to your 'english' SP name) and destination server DN (I used sys/chassis-1/blade-5).
If that's too ugly (which I'd understand), you can try plopping the XML into a text file and calling it via PoSh -- same cmdlet, just use the '-filename' parameter and specify the path to the XML content.
Hope that helps!!
Subject: RE: What's the command to assign a Service Profile to a Blade? Replied by: Kevin Murphy on 01-06-2011 11:16:06 AM Most of my UCS powershell scripts relies on custom functions that would be too much and haven't been tested enough to post here. I am in the process of trying to reformat them to utilize the UCS cmdlets. Here is a section of code that I have used and works. It inputs from a CSV that has headers; Servers,ChassisID,BladeID. Servers is the name of the service profile, the other two are self explanatory...I hope. I utilize the Get-Org cmdlet to save having to input the DN myself incase it was a sub-sub-organization. Note here, I tried using Get-Org with just an org name and the -recursive option and it didn't return anything. Not sure why so I still have to play with but I have only had these for a couple days.
A comment on Joshua's code. I don't think that will work because he doesn't have all the extra quotations escaped with another set of quotes. So to take just a bit of that line the first quote starts the string but then to the cmdlet that string stops after the first equal sign and no is a separate item and so on. Again this is an assumption and I haven't tested it but from my understanding that line won't work as you would think. I would suggest something like my line below where each quote inside the XML is escaped with another quote. Just food for thought as we begin to explore the use of Invoke-Xmlcommand.
Subject: RE: What's the command to assign a Service Profile to a Blade? Replied by: Joshua Heller on 01-06-2011 11:29:12 AM Kevin -
Good point - the text I pasted was from my text file (where the quotes won't escape). I should have replaced those with single quotes within the overall XML string. That works well.
Also - I noticed that you included the cookie in your string - once you've established the connection to UCS, that connection object (and the cookie it holds) gets referenced in subsequent calls from the toolkit. So you don't need to reference the hand....
Subject: RE: What's the command to assign a Service Profile to a Blade? Replied by: Kevin Murphy on 01-06-2011 12:45:45 PM Thanks for the info Josh. I was wondering if that would be handled or not but I figured better safe than sorry. That is good to know going forward.
Following the guideline on 'How To Setup Your Own Computer' @https://developer.cisco.com/learning/modules/intro-to-aci/sbx-intro-aci-02_programmability-options/step/2,came-up with an issue, as per Title, when installing ACI Toolkit after git clone https:/...
Hi All,I have been using Python sdk of UCS, ucsmsdk for managing fi operations.But i could not find the appropriate one for the 'show mac address-table' output which is shown below.fi-B(nx-os)# show mac address-tableVLAN MAC Address Type age Secure NTFY P...
Hi All,I have been using Python sdk of UCS, ucsmsdk for managing fi operations.But i could not find the appropriate one for the 'show flogi database' output.Looked at all mometa classes. But could not find it. Please let me know if the same is availa...
Recently, works have begun to arrive that the free memory on the Cisco Nexus 3064 is running out.Notices have an appearance:CRITICAL. Usage 86% of Available MemoryMemory now has 3 statuses:# show system memory-thresholds
System Memory thresholds:
Hi,The following low-severity issue "Interface-name, No answer from host" is frequently appear in my NMS.Not much information available online about this issue, appreciate if someone can assist interpret this log message?Thanks