Category Archives: Cisco

I have been struggling for quite some time with mapping luns from our vnx 5600 to entire clusters in our vCenter. We used to utilize a custom workflow a consultant wrote for us, but that workflow got borked after an update to UCS Director nearly a year ago. Revisiting the issue i found this example from Cisco: That example seems to work for other people but in our case the custom task in it never gave the correct output, so I had to look for a way around it. The solution I came up with is overly complicated and can surely be simplified, but my lacking knowledge of javascript limits me quite a bit. My workflow to map luns to vSphere clusters consists roughly of these steps: A powershell task running a script that does the following: Queries vCenter for esxi hosts in given cluster Queries UCS Directors api for…

Read more

My last post described how to get around some issues with using Powershell tasks in workflows. While that post surely enables you to uilize powershell to do stuff for you, what about if you want Powershell to grab stuff for you and return them in a usable matter? This time I’m going to show you how you can return a string from Powershell and use it further down in the workflow. Cisco has provided an example on how to do that here: The example from Cisco is what I started with, but I have modified it a bit since I didn’t want anything that advanced. So let’s set the stage: Say you have a workflow that uses the execute powershell command task and you want that task to output something you can utilize further down  in the workflow, e.g. sending that output in an email. In this case we will…

Read more

While the Cisco PowerShell Agent (PSA) that can be used in UCS Director isn’t exactly perfect, it can still be put to good use. As long as you now how to use it properly 😉 The major issue with using the PSA is that it doesn’t stick around to see if the commands/script was successful or not. As long as it delivered the commands successfully, it’s happy and your workflow will continue to the next step. Jon Hildebrand describes a nice way around this in one of his blog posts: Using his approach, I was able get the PSA to stick around until the job finishes. However, I ran into a challenge when I wanted to pass multiple arguments to start-job. The solution I came up with was declaring the UCSD inputs I wanted to use as powershell variables in the script, before calling the start-job cmdlet. So the commands/script input…

Read more

I better write this down before I forget it again: ctrl+shift+6 x If this makes absolutely no sense to you I will explain: When you run commands like traceroute, ping and others within Cisco IOS you can abort them. But you can’t use the usual ctrl+c (that would be to logical I guess), you need to press ctrl+shift+6 and THEN press x. There’s probably a good explanation for this, but I still feel that it is horribly cumbersome. Especially since I don’t use it that often, so I forget it from time to time 😛

At work I was recently assigned some more network related task. One of the task I fine myself repeating over and over is locating a computer on the network. The only info you need is the ip-address of the computer. This is how I do it: 1. Telnet core switch 2. show ip arp | include <ip-address> This gives me the mac address of the computer 3. show mac address-table address <mac address> This shows what port the computer is behind 4. show cdp neighbors <port on core> This shows the name of the switch that is connected on that port 5. Telnet to that switch 6. Repeat step 3-5 until step 4 returns no switches, that means the computer is directly connected to that port!